Results 1 to 6 of 6

Thread: Create DSN - Urgent

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 1999
    Posts
    229

    Unhappy


    Hi guys and gals,

    How to create Microsoft Access 2000 ODBC-DSN ?
    The code below works, but it doesn't
    set the database.

    Does any of you know the set of parameters
    for Access Driver ?
    (the Help gives only for MS-SQL)

    Thanks in advance

    Keiko

    -------------------------

    Dim en As rdoEnvironment
    Dim cnTest As rdoConnection
    Dim strAttribs As String

    strAttribs = "Description=" _
    & "How to register" _
    & Chr$(13) & "Database=c:\test.mdb"

    rdoEngine.rdoRegisterDataSource "GukGuk", _
    "Microsoft Access Driver (*.mdb)", _
    True, strAttribs

  2. #2
    Addicted Member
    Join Date
    Jan 2000
    Location
    Sydney, Australia
    Posts
    196

    Thumbs up try this...

    I asked a similar question once - look here:

    http://forums.vb-world.net/showthrea...threadid=12044

    ...


  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 1999
    Posts
    229

    Talking



    Thanks I'll try later
    Keiko

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Sep 1999
    Posts
    229

    Red face


    funkyd77,

    I have tried all the codes, but none any
    of them works.

    Last time how did you do it ?

    Thanks in advance
    Keiko

  5. #5
    Addicted Member
    Join Date
    Jan 2000
    Location
    Sydney, Australia
    Posts
    196
    i used the second lot of code in this example - it just worked for me

    you have to make sure that the ODBCCP32.DLL dll is on your system and registered.

    when you say it didnt work - did you get any error messages? Because apart from the necessity to rely on the ODBCCP32.DLL file - it ought to work. Do you have the ODBC administrator installed on your computer? <sorry if this seems obvious>


    Mark

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Sep 1999
    Posts
    229

    Thanks



    Hi funkyd77,

    Thanks for your advice. I have tried by
    myown way and it works. Just to share with you ...

    Thanks
    Keiko

    ---------------

    Dim en As rdoEnvironment
    Dim cnTest As rdoConnection
    Dim strAttribs As String

    strAttribs = "Description=How to register" & chr$(13)
    strAttribs = strAttribs & "UID=Admin" & chr$(13)
    strAttribs = strAttribs & "PWD=Hello" & chr$(13)
    strAttribs = strAttribs & "DBQ=c:\test.mdb"

    rdoEngine.rdoRegisterDataSource "MyDSN", _
    "Microsoft Access Driver (*.mdb)", _
    True, strAttribs

    ---------------

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