OLEdb & SQL with VC6 --> Help me please
-
Howdy, I built an app that used ODBC to write to an SQL database. The client has just turned around and said that they wish to use OLEdb connection strings to tell my app where the server is (instead of ODBC DSNs). Everything I've found on using OLEDB to access databases, is a whole pile of COM interface stuff with no real world examples. A far cry from the 'CDatabase' simplicity I'm used to. Can anybody help me with this ? All I need to do is to write some data via INSERT statements and do a few SELECT statements. I'm looking for some sample code or a tutorial with "real world" examples. Actually, anything that will help me do this in the few hours I have available to change my code. Thanks to anybody who can help. Damian Del Campo
-
Howdy, I built an app that used ODBC to write to an SQL database. The client has just turned around and said that they wish to use OLEdb connection strings to tell my app where the server is (instead of ODBC DSNs). Everything I've found on using OLEDB to access databases, is a whole pile of COM interface stuff with no real world examples. A far cry from the 'CDatabase' simplicity I'm used to. Can anybody help me with this ? All I need to do is to write some data via INSERT statements and do a few SELECT statements. I'm looking for some sample code or a tutorial with "real world" examples. Actually, anything that will help me do this in the few hours I have available to change my code. Thanks to anybody who can help. Damian Del Campo
-
Howdy, I downloaded you classes and was using them quite successfully. *However*, I had to convert my app to UNICODE as the clients require this. Since I've done that, I can't find any way of passing a connection to the CADODatabase. Open method simply doesn't like what I'm passing it (& I'm pressuming all methods will be the same). I've tried creating a char string and passing that to the database open function but it simply won't work either. All I get is an error message -> CADODataBase Error Code:80004005 Code meaning: Unspecified error Source:||||||||||||||| Description:|||||||||||||| Since I'm now passing it the same thing as I was before (char *) it should work, the fact that it doesn't makes me think that UNICODE must affect an include file that the ADO classes depend on in some way. Do you know how I can get around this ?????? Thanks, Damian Del Campo
-
Howdy, I downloaded you classes and was using them quite successfully. *However*, I had to convert my app to UNICODE as the clients require this. Since I've done that, I can't find any way of passing a connection to the CADODatabase. Open method simply doesn't like what I'm passing it (& I'm pressuming all methods will be the same). I've tried creating a char string and passing that to the database open function but it simply won't work either. All I get is an error message -> CADODataBase Error Code:80004005 Code meaning: Unspecified error Source:||||||||||||||| Description:|||||||||||||| Since I'm now passing it the same thing as I was before (char *) it should work, the fact that it doesn't makes me think that UNICODE must affect an include file that the ADO classes depend on in some way. Do you know how I can get around this ?????? Thanks, Damian Del Campo