88976847
Hi [didz]. You wrote to [] on Wed, 1 Jan 2003 16:55:26 -0500:
Thanx, it works if to use CRecordset instead of CODBCRecordset. What is
CODBCRecordset, i couldn't find it in MSDN?
d> CDatabase db;
d> db.Open( "TestServer", // DSN
d> FALSE, // Exclusif
d> FALSE, // Lecture seule
d> "ODBC;", // ODBC connection
d> TRUE // cursor lib );
d> CODBCRecordset rs( &db );
d> rs.Open( "SELECT * FROM tblUsagers WHERE Nom LIKE 'Did%'");
d> for( ; ! rs.IsEOF(); rs.MoveNext() ){
d> rs.Edit();
d> rs.Field("NAME") = "Didz";
d> rs.Update();
d> }
d> enjoy
>>> Hi.
>>> Couldn't you show me how to connect to MS SQL Server from VC++,
>>> create database, and execute some sql-query. I have a good book
>>> about SQL Server but it's not adhered to concrete programming
>>> language.
>>> Thanx.
>> The simplest (although possibly not the best) way is to create an
>> ODBC link to it and then use the ODBC link in CDatabase an
>> CRecordset-derived objects.
>> Paul.
>> -------------------------------------------
>> Expressed opinions are usually my own.
>> Especially if they're any good (of course).
>> -------------------------------------------
>> NB Spam trap in e-mail address
>> -------------------------------------------
Bye.
--
"Hello World!" 17 errors, 31 warnings.