How to access an Application variable in a VB file

Kokoss

New Member
Hi, I am storing a Database Connection string into an Application variable eg Application("ConnString"). I want to know how I can retrieve the value of the Application variable in a VB file.<BR><BR>Thanks<BR>MatthewI ran into the same problem. My work around was passing the connection string into it:<BR><BR>public function fetchdata(byval conn as string)<BR> dim conn as sqlconnection(conn)<BR>End function<BR><BR>Then when you call it later:<BR>dim myobj as new myobject<BR>myobject.fetchdata(Application.Item("conn"))<BR><BR>hth
 
Back
Top