-
creating a dynamic object based upon a variable???
Does anyone know if there is a way to create an object using the contents
of a variable as a name (instead of hard coding the object name?).
In the example below, I have the code for creating a connection object (with
the name hard-coded)...
set conn=server.createobject("adodb.connection")
conn.open "DSN=dataset name"
conn is hard coded and becomes the connection object.
Is there a way to do something like this???
connvar = "conn"
set {evaluated value of variable "connvar"}=
server.createobject("adodb.connection")
{evaluated value of variable "connvar"}.open "DSN=dataset name"
Thanks in advance,
Pat
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
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|