Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

odbc or ole db

Status
Not open for further replies.

michaelkrauklis

Programmer
Dec 5, 2001
226
US
I'm doing data transfer between a vc++ program and mssql2k. I was wondering what the differences in performance are between odbc and ole db. ODBC seems to be easier and thus has a faster development time, but speed is an issue in the transfer so I might be willing to put the extra effort in to use ole db. Any suggestions or advice? MYenigmaSELF
myenigmaself@yahoo.com
 
Thanks, that did help a lot, but my primary problem is that I don't have what everyone seems to consider to be an actual "data source." I have a database set up that I wish to connect to, but I don't want to be bound to a specific table. All the examples that I've seen and when you run the MFC Wizard in VC++ and add OLE DB support mandate that you have a pre-existing table in your database that you will be using as the data source. But in my program I'm going to be needing to drop and add tables. Is this possible with OLE DB/ADO? I know it is with ODBC. Might I need a combination of the two? ODBC to create/manipulate tables and OLE DB to transfer mass data more quickly?? Thanks again for your help. MYenigmaSELF
myenigmaself@yahoo.com
 
I'm a VB guy with no VC experience. However, when you use ADO in VB, you use thee connection object to connect to the datasource (not a specific table). For example...

Dim cnMyConnection as Connection

Set cnMyConnection = New Connection
cnMyConnection.Provider = "SQLOLEDB"
cnMyConnection.ConnectionString = _
"User ID=jdoe;" & _
"Password=spoon;" & _
"Data Source=MyServer" & _
"Initial Catalog=MyDatabase"
 
Thanks for the advice. I think my route will be doing table manipulation using odbc, seeing how I've already written that part, and then data transfer using ole db. Thanks again for the help. MYenigmaSELF
myenigmaself@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top