Migrated from Access 97 to SQL Server 8.0. CRecordset does not work anymore
From: Kjell Arne (anonymous_at_discussions.microsoft.com)
Date: 05/16/04
- Previous message: Kent Milligan: "Re: ODBC driver for DB2 and AS/400"
- Next in thread: Kjell Arne: "RE: Migrated from Access 97 to SQL Server 8.0. CRecordset does not work anymore"
- Reply: Kjell Arne: "RE: Migrated from Access 97 to SQL Server 8.0. CRecordset does not work anymore"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 16 May 2004 00:46:01 -0700
Hi
XP, VC++ VS 7.0 SQL Server 8.00.194, MDAC 2.8
I have moved my database application from Access 97 to SQL Server 8.0.
Unfortunately the code reading from the database through the ODBC driver does not work as expected. MFC CRecordset.
I only get the first character of strings.
E.g.
CDBVariant Value;
Recordset.GetFieldValue(pName, Value);
where field pName is a string type I only get the first character of the string.
Using the same code connected to an Access database works fine.
I access a stored query in Access 97 and a View in the SQL Server.
E.g.
Recordset.Open(....SELECT * FROM <stored query in Access> or <View in SQL Server>....
Also accessing the SQL Server I have to retrieve the data from the fields the recordset in the exact same order as the fields are ordered in the view.
I don't use databinding.
Have anyone experienced the same things and found a solution?
Why don't I get the whole string from a field?
Why do I have to acess the fields of the recorset in the same order as the fields are organized in the view in the SQL Server database?
Look forward to hear from you.
Regards
Kjell Arne
- Previous message: Kent Milligan: "Re: ODBC driver for DB2 and AS/400"
- Next in thread: Kjell Arne: "RE: Migrated from Access 97 to SQL Server 8.0. CRecordset does not work anymore"
- Reply: Kjell Arne: "RE: Migrated from Access 97 to SQL Server 8.0. CRecordset does not work anymore"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|