|
-
Mar 7th, 2001, 06:04 PM
#1
Thread Starter
New Member
I posted this under General Q's too, but I think it belongs here since its DB related.
My application relies on a database, which I connect to via ODBC Data Source on the machine and OLE DB Driver for ODBC within the app. I'm having difficulty packaging my application so that the executable recognizes the database it needs when the whole package is installed on a recipient computer.
What's the best way to handle packaging and deploying data connections without hard-coding connection strings anywhere in your code? I would think that ODBC is the way to go, because once you set up the DSN, the app just needs to know the name, and not the whole connection string... but now I'm discovering that upon installation, the app does not set up a DSN automatically on the recipient machine - this must be done manually for the app to work right! Any ideas? Any advice would be very helpful.
Thanks,
Sabrina
-
Mar 8th, 2001, 05:17 PM
#2
Hyperactive Member
Although I'm not really sure where you're headed with your question I'll throw a couple things out there as I just did my first ODBC deployment this week... : )
Here's an example of what I just did:
Set conRMA = New ADODB.Connection 'create connection
Set Send = New ADODB.Command 'create command
strDSN = "RMA"
conRMA.ConnectionString = "DSN=" & strDSN & _
";UID=" & "sa" & _
";PWD=" & "" & _
";DATABASE=RMA"
conRMA.Open 'open the conn
Part of my deployment problem was answered at this thread:
http://forums.vb-world.net/showthrea...threadid=58137
Hope that does more good than harm.
A cynic knows the price of everything but the value of nothing.
-
Mar 8th, 2001, 05:23 PM
#3
Hyperactive Member
Sorry, I just got the gist of your post. You don't want to have to set up the ODBC configuration manually. You may see if there's an API call that could assist in that. Try www.Allapi.net. It's a great resource for API calls. Sorry I couldn't be of more help.
A cynic knows the price of everything but the value of nothing.
-
Mar 8th, 2001, 11:04 PM
#4
Thread Starter
New Member
yup... part of my problem was that I didn't want to specify a file-path connection string. I did however check out the allapi site and downloaded the api tool. It wasn't much help in this particular case, but I did see a lot of useful api calls that I didn't know existed. Thanks for the tip!
-
Mar 9th, 2001, 12:41 PM
#5
Junior Member
Why not use a DSN Less connection ?
Ciao.........Gary
VB6, SQL Server 7, Access 97
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
|