Groups | Blog | Home
all groups > sql server programming > june 2004 >

sql server programming : db library for C & distributed query


gaialee
6/25/2004 11:58:01 PM
Hi all..

I am developing a software system using 'db library for C' to manage data in the SQL 2000. I'd like to use Internet standard dotted format for 'linked_server_name' to syncronize data in more than two linked SQL servers as follows :

"1.1.1.1".dbname.user.table

This distributed query works well in query analyzer & ADO, but db library for C generates 'SQL server error message 170', which means there is a syntax error in '1.1.1.1'... Please let me know how to make distributed query with Internet standard dotted format by using db library for C..

Thanks in advance...

a programmer in korea..





Alan Brewer [MSFT]
6/26/2004 12:43:02 PM
Try running a SET QUOTED_IDENTIFIER ON statement in DB-Library before
running the query. For backwards compatibility reasons, the DB-Library API
leaves all of the SQL Server ANSI options off, while the other APIs, such as
ADO, OLE DB, and ODBC, turn them on by default. For more information, see:

http://msdn.microsoft.com/library/?url=/library/en-us/odbcsql/od_6_015_0tf7.asp?frame=true

Also, I would not recommend using the DB-Library API unless you are just
doing minor adjustments to an existing DB-Library application. This warning
has been in the SQL Server 2000 service pack readme files, and in all
updates to the SQL Server 2000 Books Online:

Warning While the DB-Library API is still supported in Microsoft SQL Server
2000, no future versions of SQL Server will include the files needed to do
programming work on applications that use this API. Connections from
existing applications written using DB-Library will still be supported in
the next version of SQL Server, but this support will also be dropped in a
future release. When writing new applications, avoid using DB-Library. When
modifying existing applications, you are strongly encouraged to remove
dependencies on DB-Library. Instead of DB-Library, you can use Microsoft
ActiveX® Data Objects (ADO), OLE DB, or ODBC to access data in SQL Server.

You can download the current Books Online from this page:

http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

--
Alan Brewer [MSFT]
Lead Programming Writer
SQL Server Documentation Team

This posting is provided "AS IS" with no warranties, and confers no rights

AddThis Social Bookmark Button