Click here to Skip to main content
15,914,905 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: HTTP Connection question... Pin
14-Aug-01 4:46
suss14-Aug-01 4:46 
GeneralRe: HTTP Connection question... Pin
Cabadam15-Aug-01 4:47
Cabadam15-Aug-01 4:47 
GeneralClassy question Pin
otvac13-Aug-01 9:47
otvac13-Aug-01 9:47 
GeneralRe: Classy question Pin
Chris Losinger13-Aug-01 10:02
professionalChris Losinger13-Aug-01 10:02 
QuestionWhat to distribute with the final program build? Pin
13-Aug-01 9:00
suss13-Aug-01 9:00 
AnswerRe: What to distribute with the final program build? Pin
Gregg Carlstrom13-Aug-01 9:06
Gregg Carlstrom13-Aug-01 9:06 
AnswerRe: What to distribute with the final program build? Pin
Kuniva13-Aug-01 20:45
Kuniva13-Aug-01 20:45 
GeneralError in GetFieldValue() Pin
Tomas13-Aug-01 8:17
Tomas13-Aug-01 8:17 
Hello.

This portion of code works perfect in an aplication that conect to Access 2000 with a DSN ODBC.

CRecordset rs;
rs.Open(CRecordset::forwardOnly,"SELECT COUNT(*) FROM mytable",CRecordset::readOnly);
short nField=0;
CString str;
rs.GetFieldValue(nField,str);
long NumRecords = atol(LPCSTR(str));

Now I am porting the aplication to works with SQL Server 2000 and this portion of code give me the error: "State:S1002,NativeBlush | :O ,Origin:[Microsoft][ODBC SQL Server Driver] Invalid column number".

In MSDN I have found "GetFieldValue calls the ODBC API function SQLGetData. If your driver outputs the value SQL_NO_TOTAL for the actual length of the field value, GetFieldValue throws an exception. For more information about SQLGetData, see the ODBC SDK Programmer's Reference"

I don't know if this is the problem. Anybody can tell me how can I solve this problem?.

Thanks in advance.

Tomás.
GeneralRe: Error in GetFieldValue() Pin
Bret Faller13-Aug-01 8:33
Bret Faller13-Aug-01 8:33 
GeneralRe: Error in GetFieldValue() Pin
Tomas13-Aug-01 8:54
Tomas13-Aug-01 8:54 
GeneralRe: Error in GetFieldValue() Pin
Bret Faller13-Aug-01 9:02
Bret Faller13-Aug-01 9:02 
GeneralRe: Error in GetFieldValue() Pin
Tomas13-Aug-01 9:20
Tomas13-Aug-01 9:20 
GeneralRe: Error in GetFieldValue() Pin
Bret Faller13-Aug-01 11:04
Bret Faller13-Aug-01 11:04 
GeneralRe: Error in GetFieldValue() Pin
13-Aug-01 9:56
suss13-Aug-01 9:56 
GeneralRe: Error in GetFieldValue() Pin
Tomas13-Aug-01 12:01
Tomas13-Aug-01 12:01 
GeneralRe: Error in GetFieldValue() Pin
14-Aug-01 12:27
suss14-Aug-01 12:27 
QuestionWhat does this function do? Pin
Bret Faller13-Aug-01 8:13
Bret Faller13-Aug-01 8:13 
AnswerRe: What does this function do? Pin
Anders Molin13-Aug-01 8:42
professionalAnders Molin13-Aug-01 8:42 
GeneralRe: What does this function do? Pin
Bret Faller13-Aug-01 8:44
Bret Faller13-Aug-01 8:44 
GeneralRe: What does this function do? Pin
Anders Molin13-Aug-01 9:21
professionalAnders Molin13-Aug-01 9:21 
GeneralSQLConfigDataSource Pin
13-Aug-01 8:12
suss13-Aug-01 8:12 
GeneralRe: SQLConfigDataSource Pin
Unforgiv3n11-Feb-10 0:56
Unforgiv3n11-Feb-10 0:56 
GeneralLockWindowUpdate with CHtmlView Pin
ov13-Aug-01 7:23
ov13-Aug-01 7:23 
Generalquestion about focus Pin
13-Aug-01 7:22
suss13-Aug-01 7:22 
GeneralRe: question about focus Pin
13-Aug-01 7:54
suss13-Aug-01 7:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.