mssql 
Author Message
 mssql

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.


Thu, 16 Jun 2005 16:41:06 GMT  
 mssql

Quote:

> 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.

Then you may need a book with a more specific focus. :-(

There are a number of ways to go.

One way would have you program to the "native" API of SQL server. It has
been a while since I had to do this, but if I remember correctly that API
goes by the name of DBLIB. Go to the MSDN web site (msdn.microsoft.com) and
search for DB-Library.

Another way to go is to use the Open Database Connectivity (ODBC) API. ODBC
is a vendor neutral interface supplied by MS that is supplemented by a
"driver" provided by the database vendor. Check the docs for

    SQLAllocEnv();
    SQLAllocConnect();
    SQLDriverConnect();

which are typically required by an ODBC client program to "attach" to a
database. Follow the links back to the overview of ODBC in the docs for
information on how you actually use ODBC to perform database operations
after connecting.

Finally, you might want to investigate higher level technologies like ADO,
RDO, OLEDB which are somewhat easier to use but further removed from the
details.

Regards,
Will



Thu, 23 Jun 2005 01:01:58 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. OLE DB Close DB Connection w/MSSQL 6.5

2. Writing MSSQL TEXT field from CRecordset

3. How to insert BLOB data into MSSQL with OLEDB templates library

4. mssql

5. VC++6 skips breakpoints with MSSQL 7.0 sp3

6. dblogin fails when migrating to MSSQL 2000

7. Storing single quote in a MSSQL database using JDBC

8. Oracle vs. MSSQL

9. Saving object OLE into BLOB field in MsSQL

10. OLE DB Close DB Connection w/MSSQL 6.5

11. MSSQL & ADO & threads ???!!

12. VC++ 6.0, MSSQL Server 7.0, ADO >Sample<

 

 
Powered by phpBB® Forum Software