pro_vb thread: Replacing object name in a dinamic way...
I will do... And if it don't help... you would know... :-)
Thanks again.
|-----Original Message-----
|From: Donald C.Burr [mailto:dburr@n...]
|Sent: Friday, September 22, 2000 3:29 PM
|To: professional vb
|Subject: [pro_vb] RE: Replacing object name in a dinamic way...
|
|
|There is no "MACRO" ability in VB. Most other languages (
|like Clipper )
|allow you to execute a command stored as a string. You may
|want to look at
|the VB CallByName function (Executes a method of an
|object, or sets or
|returns a property of an object. )
|
|
|Hope this helps
|
|
|
|-----Original Message-----
|From: Sebastian Pittari [mailto:mailing@3...]
|Sent: Friday, September 22, 2000 8:39 AM
|To: professional vb
|Subject: [pro_vb] Replacing object name in a dinamic way...
|
|
|Hi,
|
|I am trying to define a procedure pointed to be calling it
|self n times,
|where n is a given number.
|So, the structure is something like this:
|
|Sub Function(parameter1,parameter2,parameter3)
|...
|For i = 1 to n
| Function(a,b,n)
|Next
|...
|End Sub
|
|The n value is diferent in every call, and could be often
|0. So far, so
|good...
|Now, my problem is that in the middle of the function I
|use Objects like
|recordsets, and I see that in every call, I am reseting
|the object with new
|data of the new call. I want to know the way to do
|something like this:
|
|Object = parameterN
|Set %Object% = Connection.Execute(strSQLQuery)
|
|And get the parameterN object defined instead the Object object.
|
|Am I clear enough?
|
|I remember that in the old Clipper, there was a way to make this
|replacement.
|
|Any help would be highly appreciate.
|
|Thanks in advance.
|
|
|Sebs.
|