-
Hi,
I've created a class dll to access data in SQL server. Right now, the connection is hard coded in the class initialize event. I can't seem to figure out how to pass connection values to the DLL at run time from the main program rather than having them hard coded in the DLL. Anyone have any ideas??
Thanks!
-
Use properties.
Code:
Public Property Get ConnectionString() As String
ConnectionString = conn.ConnectionString
End Property
Public Property Let ConnectionString(strNewString As String)
conn.ConnectionString = strNewString
End Property
In your calling code:
Code:
Dim MyObj as New MyObject.Class
MyObj.ConnectionString = "connectionstring"
MyObj.OpenConnection
-
Monte,
Worked out great!!! Thanks a million for your help!!
Rich