Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 ODBC

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-03-08 : 07:50:44
Ivan writes "I am using Visual c++ .NET to connect to SQLServer with SQLServer ODBC.

I am using CRecordset class and ODBC throw me Exception
"ODBC does not support daynaset". Olso i cant connect danamic, exception is "ODBC does not support dynamic cursors", and y cant connect snapshot. Onlu way to conect with ODBC is ForwardOnly. Is their any way to connect to SQLServer with ODBC and CRecordset class daynaset. Thanks. Answer to me please !

This is code:

CDatabase db;
if (db.Open("DSN_Something", FALSE, FALSE, "ODBC", TRUE))
{
CRecordset rs(&db);
if (rs.Open(CRecordset::daynaset, "SELECT * FROM dbo.spt_datatype_info"))
{
//Hire ODBC trows exception !!
}
}"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-03-08 : 07:54:03
DAO and SQL Server DO NOT work well together. If they were you would not be getting the errors that you're getting.

ADO is MUCH easier and more flexible to program with, and it lets you work with OLE DB providers as well...much less problematic than ODBC (for SQL Server anyway).
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-03-08 : 08:25:02
use sqlCommand and other in the sql namespace familiy.

Go with the flow & have fun! Else fight the flow
Go to Top of Page
   

- Advertisement -