-
July 3rd, 2001, 10:39 AM
#1
ADO, ODBC, SQLServer/Oracle
Question regarding accessing SQL Server and Oracle from VB via ADO.
Do I have to hardwire the connection string (.open = "provider=oracle/sqlserver blah blah) based on the database I am connecting to?
Is there any GOOD ODBC Driver that talks both to SQL server and Oracle?
Reason is, I may not know which database I am talking to.
How do I go about doing it via ADO?
Thanks much.
-
July 3rd, 2001, 12:26 PM
#2
Re: ADO, ODBC, SQLServer/Oracle
Is there any GOOD ODBC Driver that talks both to SQL server and Oracle? NO, drivers only talk to one database. DO NOT hard code your connection string if you have to support multiple databases. It it not a good way to do it in any case, as the database infor may change. Use a FILE DSN so that you can change the configuration parameters. You might want to consider using a command line switch to select the database. Or ask for the type of database in an installation script and then write the information to the registry and read it when you come back in.
Hope this helps
-
July 5th, 2001, 09:27 AM
#3
Re: ADO, ODBC, SQLServer/Oracle
Thanks.
I was wondering hardwiring via OLEDB or to go via
ODBC/DSN. As a database newbie, I was overwhelmingly suggested to go with ODBC.
Thanks again.
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
|