Results 1 to 5 of 5

Thread: Packaging and Deploying Apps with ODBC

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Location
    NY, NY
    Posts
    6

    Unhappy

    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

  2. #2
    Hyperactive Member
    Join Date
    Sep 2000
    Location
    Tennessee
    Posts
    279
    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.

  3. #3
    Hyperactive Member
    Join Date
    Sep 2000
    Location
    Tennessee
    Posts
    279
    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.

  4. #4

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Location
    NY, NY
    Posts
    6
    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!

  5. #5
    Junior Member
    Join Date
    Oct 2000
    Location
    High Wycombe, UK
    Posts
    25
    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
  •  



Click Here to Expand Forum to Full Width