I created a DLL which is very simple: Connect to a database and run a
query on it.
When I tested it on a local Access database it worked fine.
When I tried it on a network SQL Server I recieved the following
message:
"Optional feature not implemented State:S1C00" etc...
Any idea?
Thanks.
Not every SQL server supports every bit of every SQL dialect out there. It
seems that you are using a feature that is simply not portable between
different implementations.
For better help, I would suggest providing some more info, in particular
what the query is and what the networked SQL server is. Also, did you use
the error message in a websearch? You definitely should have!
Uli
--
C++ FAQ: http://parashift.com/c++-faq-lite
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
The connection string I use is
a_sConnectString = "DSN=TalTest1;UID=sa;PWD=Aa123456";
and I use it in
m_db.OpenEx(a_sConnectString, CDatabase::openReadOnly);
as m_db is a CDatabase object.
The DSN is of course registerd in the ODBC administrator as an SQL
Server data source
The query is
select externallessonid from LessonDetails where subid = '100100'
and lessonid > '9000'
and the function is
if(m_db.IsOpen()){
CODBCRecordset rs(&m_db);
if(rs.Open(a_sQuery))
{
for( ; ! rs.IsEOF(); rs.MoveNext() )
m_sValue = rs.GetString(0);
}
else
{
return NULL;
}
rs.Close();
return m_sValue.GetBuffer(1);
}
else
return NULL;
------------------------
It is not a generic function. It assumes only one record as the query
result.
I also use the CODBCRecordset class from http://www.d-bross.com/papers/ODBCRecordset.shtml
------------------------
I am working with SQL Server 2005 SP3 X64
Thanks.
I rebuilt the DLL , now using ADO, and it is fine now.
Thanks!