Results 1 to 3 of 3

Thread: 32 Bit .UDL in 64 Bit Machine

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2012
    Posts
    1

    32 Bit .UDL in 64 Bit Machine

    I have an application written in VB 6.0 that uses a UDL file to reference my ODBC DSN. This application works fine in any 32 bit system.

    When I move this application to 64 Bit machine I got this error:

    Microsoft Error = -2147467259 ([Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified)

    The point where this error triggers off is at this point


    Dim MyConnection

    Set MyConnection = New ADODB.Connection

    With MyConnection
    === .ConnectionString = "File Name=" & app.path & "\" & QBConn & ".UDL;"
    .Open
    End With


    I created my DSN on the 32 bit ODBC in my 64bit machine (C:\WINDOWS\SYSWOW64\odbc32.exe) but my program points to the 64 Bit () but but the request DSN is not located there.

    How do I change this line?
    .ConnectionString = "File Name=" & app.path & "\" & QBConn & ".UDL;"

    To be able to read my DSN using the ODBC from this location:
    C:\WINDOWS\SYSWOW64\odbc32.exe

    Thanks
    Victor

  2. #2
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: 32 Bit .UDL in 64 Bit Machine

    Just hard-code the path or you might be able to save the path in a file and read it into your program.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  3. #3
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: 32 Bit .UDL in 64 Bit Machine

    Both system and file DSNs (just like ODBC) are ancient technology and security hazards.

    However if you insist on this and have trouble with your UDL (which is really for OLEDB) check your UDL's contents. I suspect that it isn't pointing to your 32-bit system DSN, probably because it was edited using the 64-bit oledb32.dll!

    See: How to run 32-bit UDL file on a 64-bit Operating System

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