|
-
December 19th, 2009, 01:33 PM
#1
how set object using var?
hi,
i want to this using values from db i using vb6
dim object_name
set object_name = command1
i want load the name "command1" from the db and do something
like this:
set object_name = value_from_db
it this possible?
thanks a lot for your help
-
December 19th, 2009, 01:46 PM
#2
Re: how set object using var?
It is very vague at all, what your project is.
db... do you mean a database?
What value could that be you want to retrieve, of which table, which record, which field name?
You should study ADO controls and objects which, in a very far away and loosely vague fassion ressemble to the things you suggest you want to do.
There is a "Command" object which allows to retrieve values, or better say records, from a database.
Let me answer this shortly: It is possible.
But not directly in the way you are suggesting to do it.
You'd have to use a Connection object to link to the database, a Command object to execute a query (sometimes it goes without command object), and a Recordset object to hold your resulting records. THEN you have to know how to find the value_from_db you want.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|