ODBC Error Code 126

  • Hello. I am also trying to create a linked server object that points to a local replica of a Notes database. So far I have solved issues of not being able to find the NotesSQL driver, which requires referencing explicit path to the 32 ODBC management client. Also, the issue of having to modify the Path environment variable with the default location of the notes.ini file, which is c:\ notes in my case.

    I was trying to use SQL 2008 R2 Express, but I believe this was a 64 bit application by nature of being installed on Windows 7 64. So I reverted back to using SQL 2005 Express SP4., which I believe is a 32 bit application. However, now I get an infinite run time on my execution of test t-sql against the linked server. See below...

    I am left to wonder if it is even possible to connect any SQL Express client to a local Notes database??

    Environment:

    Windows 7 64 professional

    SQL 2005 Express SP4 (which I suspect is a 32 bit application)

    Scripted create of linked server:

    /****** Object: LinkedServer [MyNotesDbLink] Script Date: 04/11/2012 11:24:08 ******/

    EXEC master.dbo.sp_addlinkedserver @server=N'MyNotesDbLink', @srvproduct='', @datasrc=N'MyNotesDbDsn', @provider=N'MSDASQL', @provstr=N'Provider=MSDASQL.1;Persist Security Info=False;Extended Properties="DRIVER={Lotus Notes SQL Driver (*.nsf)};Database=pathname/MyNotesDb.nsf;Server=local;MaxSubquery=20;MaxStmtLen=4096;UserName=****;EncryptPWD=****;MaxRels=20;MaxVarcharLen=254;KeepTempIdx=1;MaxLongVarcharLen=512;ShowImplicitFlds=0;MapSpecialChars=1;ThreadTimeout=60";SuppressUID=1;Initial Catalog=(Default)'

    /* For security reasons the linked server remote logins password is changed with ######## */

    EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'MyNotesDbLink',@useself=N'True',@locallogin=NULL,@rmtuser=NULL,@rmtpassword=NULL

    GO

    EXEC master.dbo.sp_serveroption @server=N'MyNotesDbLink', @optname=N'collation compatible', @optvalue=N'false'

    GO

    EXEC master.dbo.sp_serveroption @server=N'MyNotesDbLink', @optname=N'data access', @optvalue=N'true'

    GO

    EXEC master.dbo.sp_serveroption @server=N'MyNotesDbLink', @optname=N'dist', @optvalue=N'false'

    GO

    EXEC master.dbo.sp_serveroption @server=N'MyNotesDbLink', @optname=N'pub', @optvalue=N'false'

    GO

    EXEC master.dbo.sp_serveroption @server=N'MyNotesDbLink', @optname=N'rpc', @optvalue=N'true'--default is false

    GO

    EXEC master.dbo.sp_serveroption @server=N'MyNotesDbLink', @optname=N'rpc out', @optvalue=N'true'--default is false

    GO

    EXEC master.dbo.sp_serveroption @server=N'MyNotesDbLink', @optname=N'sub', @optvalue=N'false'

    GO

    EXEC master.dbo.sp_serveroption @server=N'MyNotesDbLink', @optname=N'connect timeout', @optvalue=N'60'

    GO

    EXEC master.dbo.sp_serveroption @server=N'MyNotesDbLink', @optname=N'collation name', @optvalue=null

    GO

    EXEC master.dbo.sp_serveroption @server=N'MyNotesDbLink', @optname=N'lazy schema validation', @optvalue=N'false'

    GO

    EXEC master.dbo.sp_serveroption @server=N'MyNotesDbLink', @optname=N'query timeout', @optvalue=N'60'

    GO

    EXEC master.dbo.sp_serveroption @server=N'MyNotesDbLink', @optname=N'use remote collation', @optvalue=N'true'

    GO

    A test T-sql...

    select * from MyNotesDbLink...MyView

  • I have that same error and I solve it by adding path of notessql/notesclient to environment variable. This post helps me a lot during the installation

    http://hintdesk.com/c-lotus-notessql-driver-install-configure-and-connect-to-server-through-odbc/[/url]

    Just for someone who has same problem.

  • The thing that finally worked for me was to add the installation path of Notes to the PATH environment variable. Strange, because this is NOT where my notes.ini file resides. The path string cannot have spaces! If it has any spaces it must be changed to the short naming convention like this:

    C:\Progra~2\IBM\Notes;

Viewing 3 posts - 16 through 17 (of 17 total)

You must be logged in to reply to this topic. Login to reply