I have a TD42 application which connects to MS Sql Server 2005 via OLEDB.
If I run the application on a (german) Windows XP computer, everything works fine.
If I run the application on a (german) Windows 7 64 bit computer, I get the Error 'Sql Server database acces failed: 3789 (265933) - Input dialect was ignored and text was returned in different dialect.' This is error 0x00040ECDL (=265933 in decimal) DB_S_DIALECTIGNORED.
On this computer the MS Sql Server 2005 client and the MS Sql Server 2008 R2 client is installed (because we have both, a Sql Server 2005 and a Sql Server 2008).
I connect in the following way:
Code: Select all
Set sConnectionString = 'SQLOLEDB;Data Source=' || sSqlServer || ';Initial Catalog=' || sSqlServerDatabase || ';User ID=' || sSqlServerUsername || ';Password=' || sSqlServerPassword || ';Persist Security Info=True;'
Call SqlCreateSession( hSession, sConnectionString )
Call SqlSetSessionParameter( hSession, DBP_AUTOCOMMIT, FALSE, '' )
Set SqlResultSet = TRUE
Call SqlCreateStatement( hSession, hSqlServer )
Code: Select all
Call SqlSetResultSet( hSqlServer, FALSE )
Set sStatement = 'exec dbo.Insert_CashEntry :nSqlServerKeyTranslationMode, :cCashEntry.AccNo, ...'
Call SqlPrepareSP( hSqlServer, sStatement, '' )
! Next line brings up the error
Call SqlExecute( hSqlServer )
Any hints?
Regards,
Rainer