Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"Optional feature not implemented" "State:S1C00" for SQL Server

766 views
Skip to first unread message

tal...@gmail.com

unread,
Jun 10, 2009, 10:49:18 AM6/10/09
to
Hi,

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.

Ulrich Eckhardt

unread,
Jun 10, 2009, 11:52:29 AM6/10/09
to

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

dushkin

unread,
Jun 14, 2009, 4:27:52 AM6/14/09
to
Uli, Thank you for your kind help.

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.

dushkin

unread,
Jun 15, 2009, 3:49:34 AM6/15/09
to
Ok, Found the problem.
The ODBC SQL server driver doesn't support selecting navchar (unicode
strings) fields, and thus the error message appears.

I rebuilt the DLL , now using ADO, and it is fine now.

Thanks!

0 new messages