Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class Data Connection with COM
Message
From
11/10/2001 11:11:37
 
 
To
10/10/2001 15:40:08
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00566576
Message ID:
00567000
Views:
12
>>Hi -
>>
>>I have created a all that contains all of the Business Objects for a program. >>I have the startup for the dll as Sub Main so that a database connection will >>be made the first time the dll is called. It works great if I hard code the >>database location into the Sub Main but I want to be able to pass parameters >>from the UI to the Sub Main that defines the connection string for the data >>connection.
>>
>>Is this possible??
>>
>>Thanks,
>>
>>Nichole

>You could base the connection on a udl file, this way if you need to change >DB's location say from your development to the production server you just >change the UDL instead of the code. Although if this DLL is heavily used it >could affect performance because of the file I/O.

>I think a better approach is to create a method of the class that receives the >parameters to create the connection. This way you don't need a Sub Main() as >everything is included in the class.

>Just my .02

I prefer not to use a udl because even in production there are multiple dataset that the user could chose to log into (this customer has three seperate companies to keep track of and then one combines all of the data). Also the dll containes one class for each table puls collections and displays so I don't want to create a connection in each class because then there will be multiple connections and I won't be able to use committrans to confirm that the updates all work.

Any other suggestions? Thanks

Nichole
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform