How do I create a create and execute an SQL command using OleDB directly?

Posted by Pagis on Stack Overflow See other posts from Stack Overflow or by Pagis
Published on 2010-05-27T12:21:40Z Indexed on 2010/05/27 13:01 UTC
Read the original article Hit count: 144

Filed under:
|
|
|

I want to use the OleDB interfaces directly to open a connection to a DB, create a command and executing it (for example using the ICommandText interface).

The main thing I can't find is how to create the connection and the command object and how to connect the object that implements the ICommandText to the connection. In ADO I would just use the ActiveConnection property but I want to do this directly on the OleDB interfaces.

Also, if anyone can recommend a tutorial to OleDB, ether online or a book, free or not that would be great (but a tutorial and not just a reference / API)

I'm using C++ but any native code would be fine.

© Stack Overflow or respective owner

Related posts about c++

Related posts about sql