Results 1 to 2 of 2

Thread: Check if a DSN is there or not

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2001
    Location
    New Zealand
    Posts
    20

    Question Check if a DSN is there or not

    Hi All,

    Is there any way to get VB to test whether there is a DSN already created?

    I am using rdoEngine.rdoRegisterDataSource to create one, but I only want it to run if there is no DSN, as I don't want it to overwrite the existing one (because it may be using a different driver).

    Thanks in advance

  2. #2
    Fanatic Member
    Join Date
    Jan 2001
    Location
    Vietnam
    Posts
    613
    At your program startup, browse thru all DSNs on the computer (use function in "ODBC32.DLL"), compare your DSN name with these DSNs then you can tell whether the DSN is created already or not.

    Regards,
    TheBao

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