SQLServer via ODBC: Problem with SQL Native Client

forum.connectivity (2000-2005) & forum.td.connectivity (2005-2010)
NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

SQLServer via ODBC: Problem with SQL Native Client

Post by NewsgroupServer » 02 Apr 2009, 17:40

 Posted by:  Yvonne Grossmann 

Hello,

I want to connect my TD 2.1 application with SQLServer 2005 via ODBC. If I
create the ODBC DSN in odbcad32.exe with the SQL Server driver, all works
fine. But if I use the SQL Native Client driver, the Unify function
SqlSetParameter (hSQL, DBP_PRESERVE, TRUE, '') gives in an error (result 0)
and doesn't work. This function is very important for me to preserve my
result sets. The database and the application are the same, the difference
is only the used odbc driver.

Unfortunally, my client needs to use the SQL Native Client driver due to
other reasons. Does anybody have an idea, if it is possible to call the
function SqlSetParameter (hSQL, DBP_PRESERVE, TRUE, '') also with this odbc
driver?

Thank you for your help

Best Regards
Yvonne

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

SQLServer via ODBC: Problem with SQL Native Client

Post by NewsgroupServer » 02 Apr 2009, 19:46

 Posted by:  Krzysztof Dorko 

Hi
I will try add "mars" to gupta.ini "connection string"
hth

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

SQLServer via ODBC: Problem with SQL Native Client

Post by NewsgroupServer » 03 Apr 2009, 13:46

 Posted by:  Yvonne Grossmann 

Sorry,

I don't understand you.
My gupta.ini looks like

[GUPTA ODBC 32 bit DATA SOURCES]
EXCHANGE=GPOD0000
XRATE=GPOD0001
[EXCHANGE]
RemoteDBName=GPOD0000
ODBCConnectString=DSN=EXCHANGE;Description=SqlServer;UID=sysadm;APP=Centura
Team Developer;WSID=YG-WORKSTATION;
[XRATE]
RemoteDBName=GPOD0001
ODBCConnectString=DSN=XRATE;Description=SqlServer;UID=sysadm;APP=Centura
Team Developer;WSID=YG-WORKSTATION;

I've tryed to add "mars", but I've got error messages about invalid
connection strings. Where to add it exactly?

Thank you for your help

Best regards

Yvonne

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

SQLServer via ODBC: Problem with SQL Native Client

Post by NewsgroupServer » 03 Apr 2009, 15:27

 Posted by:  Krzysztof Dorko 

MARS_Connection=yes;

in any ODBCConnectString which has to be connected via sqlncli driver

hth

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

SQLServer via ODBC: Problem with SQL Native Client

Post by NewsgroupServer » 07 Apr 2009, 12:03

 Posted by:  Yvonne Grossmann 

Thank you so much!

It really does, what it should do.

If you ever are in Munich in the end of september, we'll invite you to the
bavarian Oktoberfest!

Thanks again and best regards

Yvonne

Return to “td.connectivity”

Who is online

Users browsing this forum: Ccbot [Crawler] and 0 guests