T O P I C R E V I E W |
jguenrdc |
Posted - 05/30/2006 : 6:02:00 PM Origin Version: OriginPro 7.5 SR6 v7.5885(B885) Operating System: Windows XP Pro SP2
I want to use the EOF property of an ADO Recordset object. For example (note I have remove some code and details, so it won't compile as-is):
static Object ocrs; /* other code */ BOOL b1,b2; // return value from various functions ocrs = CreateObject("ADODB.Recordset"); // create recordset object if( !ocrs ) // if not created return FALSE; // exit strConn = "Provider=SQLOLEDB; <...other stuff...>"; // connection string strQuery = "SELECT <...other stuff...>"; // T-SQL statement ocrs.CursorLocation = 3; // use client-side cursor ocrs.open( strQuery, strConn, 1, 3); // open recordset b1 = ocrs.BOF; b2 = ocrs.EOF;
The line with the EOF gives this error: Error, '': illegal name for identifier or type
I'm guessing this is because EOF is a constant in Origin C. How can I access this property of the ADO object?
Jay
Edited by - jguenrdc on 05/31/2006 10:38:45 AM |
1 L A T E S T R E P L I E S (Newest First) |
cpyang |
Posted - 06/01/2006 : 3:41:22 PM try
b2 = ocrs.eof;
as EOF is defined in stdio.h as (-1) so your code will become
b2 = ocrs.(-1)
after preprocessing.
Since C is case sensitive and COM part not, this should work.
CP
|
|
|