Results 1 to 1 of 1
  1. #1
    Join Date
    Jun 2004
    Location
    NYC Area
    Posts
    24

    Unanswered: ODBC Error - Defaults Not Set

    I have an application that connects to a SQL table but am having a problem. On my machine the link works fine - however, on another machine I get a message stating the ODBC defaults are not set.?

    I set up a System DSN and the connection works fine (connection successful). However, if I try to link some tables using that DSN OR using SQL code (as follows - some statements, like DIM's, are omitted)...

    tConnect = "ODBC;DRIVER=SQL Server;Server=\\ACNYC319\COSAL_DEV; Database=CASSQL;App=Microsoft Office XP; Network=DBMSSOCN;Address=\\ACNYC319\COSAL_DEV,1099 9; Trusted_Connection=Yes"

    Set tdf = db.CreateTableDef("tblEmployees")
    tdf.Connect = tConnect
    tdf.SourceTableName = "dbo.tblEmployees"
    db.TableDefs.Append tdf
    tdf.RefreshLink

    ... then I get the error. Not sure why the DSN connects fine but when I try to use to connect some tables it gives me the error?

    Any suggestions are greatly appreciated...

    Chris

    UPDATE!!!! ---

    I discovered the reason for the error. Seems when the DSN was created three items were not updated: ODBC.INI was missing the Driver32= setting (blank), and the registry was missing the DRIVER data value (Local_Machine/Software/ODBC/ODBC.INI/DriverName/DRIVER value (was blank) and /ODBCINST.INI/SQL Server/DRIVER value was also blank. I do not know why this was not updated when the DSN was created but filling in the blanks has resolved the issue.

    Chris
    Last edited by Hammett; 12-16-04 at 10:56.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •