If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > How Set Ansi_nulls And With Ansi C And Db-library Supplied By Msql7

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-07-02, 08:26
charlymarket charlymarket is offline
Registered User
 
Join Date: Feb 2002
Posts: 1
Question How Set Ansi_nulls And With Ansi C And Db-library Supplied By Msql7

Hello everybody.
I am trying to connect to msql7 to use a store procedure that have a heterogeneous query and I cant do that without set ANSI_NULLS and ANSI_WARNINGS, but I dont know how to do it.

What should I add to my code to do that?

(I saw that setting must be done before the connection begin, and I also tried to set ansi_nulls and ansi_warnings in the store procedure but it doesn't work.)

main()

{

PDBPROCESS dbproc; // The connection with SQL Server.
PLOGINREC login; // The login information.
DBCHAR name[100];
DBCHAR city[100];

// Install user-supplied error- and message-handling functions.
dberrhandle (err_handler);
dbmsghandle (msg_handler);

// Initialize DB-Library.
dbinit ();

// Get a LOGINREC.
login = dblogin ();
DBSETLUSER (login, "my_login");
DBSETLPWD (login, "my_password");
DBSETLAPP (login, "example");

// Get a DBPROCESS structure for communication with SQL Server.
dbproc = dbopen (login, "my_server");

// Retrieve some columns from the authors table in the
// pubs database.

// First, put the command into the command buffer.
dbcmd (dbproc, "SELECT au_lname, city FROM pubs..authors");
dbcmd (dbproc, " WHERE state = 'CA' ");

// Send the command to SQL Server and start execution.
dbsqlexec (dbproc);

.........

thank you in advance
(and sorry for my english)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On