Hi,
i'm trying to reference some objects using reflection and Late Binding
accessing.
The Object API to his methods it's easy to understand, and it's as
"Object.Met hod" - aka. "Clientes.Exist e"-
So, to reference this object, it was simplier to me resolving this
with reflection, and it was something like this:
Type motorPriBS = Type.GetTypeFro mProgID("GcpBS6 01.GCPBS");
object clientes = motorPriBS.i .InvokeMember(" Clientes",
System.Reflecti on.BindingFlags .GetProperty,
null,
hMotorPriBS,
null);
bool existeAl = (bool)motorPriB S.InvokeMember( "Existe",
System.Reflecti on.BindingFlags .InvokeMethod,
null,
comercial,
new object[] {"0002"});
And it works well.
Now, the present situation changed the object API, and it's
referencing to "Object.Propert y.Method" -aka
"Comercial.Clie ntes.Existe"-
The code that i wrote is like this:
Type motorPriBS = Type.GetTypeFro mProgID("GcpBS6 01.GCPBS");
//invoke object
object comercial= motorPriBS.Invo keMember("Comer cial",
System.Reflecti on.BindingFlags .GetProperty,
null,
hMotorPriBS,
null);
//invoke propertie
object clientes = motorPriBS.Invo keMember("Clien tes",
System.Reflecti on.BindingFlags .GetProperty,
null,
comercial,
null);
//invoke method
bool existeAl = (bool)motorPriB S.InvokeMember( "Existe",
System.Reflecti on.BindingFlags .InvokeMethod,
null,
comercial,
new object[] {"0002"});
And, this don't work. When i invoke the method, it returns a error
"Unknown Name" and it seems that the object don't recognize the method
name "Existe". And i've sure it really exists.
Can anyone give a help in this matter? 1 2092
On Jan 21, 2:04 pm, nelsoni...@clix .pt wrote:
<snip>
And, this don't work. When i invoke the method, it returns a error
"Unknown Name" and it seems that the object don't recognize the method
name "Existe". And i've sure it really exists.
Can anyone give a help in this matter?
It would be a lot easier to follow this if you could produce a short
but complete program to demonstrate the problem.
Looking at the chaining though, I'd have expected the 4th parameter to
your last InvokeMember call to be clientes instead of comercial.
Jon This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Robert |
last post by:
did you solve this problem? It seems to be still present here with
py2.3.5.
Robert
--
From: Manish Jethani <manish.j@gmx.net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b)
Gecko/20031205 Thunderbird/0.4
X-Accept-Language: en-us, en
|
by: Marcus |
last post by:
I'm running into a situation that has me adding a value of "Unknown" to
a reference table. I am being pulled between two trains of thought, and
was curious to get other's input on in. I give an example below.
1-) Adding "Unknown" to a reference table is bad. Doing so effectively
changes the Nullability option of every FK that references...
|
by: John Baker |
last post by:
Hi:
I have two systems, one a W98 and the other XP Home. I have Access 2000 installed on both,
and have run into a difference in the way the two behave.
I have a table on which I wish to reset an "auto number" field so the counter goes back to
zero. The procedure I have used is to copy the contents of the table to a temp table,
empty the...
|
by: Bill Coan |
last post by:
NOTE: This was posted earlier to vsnet.vstools.office under a different
subject line but received no response.
I'm having a problem automating Word's Find object from a .NET application,
using late binding.
If I use early binding, my code runs fine on most systems, but it is
vulnerable to a known bug explained here:...
|
by: jdanoz |
last post by:
Hello,
i have a vb.net project with a reference to an ActiveX object (ocx).
If i try to use the ocx from vb6 project (adding the reference) it
works ok (using CreateObject).
In vb.net,
the CreateObject works ok, the object gets initialized...
| |
by: Shaun |
last post by:
Hi all,
I'm trying to implement a custom session handler that writes session
data to a MySQL database. It works fine about 99% of the time. Trouble
is, at random intervals, I get entries like the following in my
php-error.log:
PHP Warning: Unknown: A session is active. You
cannot change the session module's ini settings at this time....
|
by: Paul W |
last post by:
I attempted to find the solution and came close
(http://blogs.msdn.com/robgruen/archive/2005/01/24/359660.aspx) but cannot go
any further. I have an ASP.NET (2003/C#) app that calls a VB 6 DCOM on a
remote server. Identity used on DCOM is the same identity as used for the IIS
app.
Line of code that throws error:
object obj =...
|
by: John |
last post by:
Hi Everyone,
I'm having this extremely annoying problem with Internet Explorer 6,
giving me an error message saying "unknown runtime error" whenever I
try to alter the contents of a <divelement using innerHTML.
Now, I've researched this problem on the web, and found many references
to it, but none of them quite addressed my specific...
|
by: Armin Zingler |
last post by:
<Just_a_fan@home.netschrieb
After having longer discussions about a similar issue, I ask you to
provide an example of the source and destination value(s) and their data
types. Thanks.
Example (of an example):
Source: byte array, content=243 123 45 98 12
Destination: a string containing hex representation of the values,
seperated by...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |