Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't retrieve MEMO data
Message
From
04/02/2018 09:11:10
 
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01657782
Message ID:
01657789
Views:
46
UPDATE: Pretty sure that the problem stems from the fact the VFPOLEDB doesn't support macro expansion. But is there any other way I can make this SP work ?

>Trying to retrieve an array stored in a VFP MEMO field using a VFP SP via VFPOLEDB.
>
>The SP looks like this:
PROCEDURE GetShortNutri
>LPARAMETERS theFile, theField, theRecno
>USE &theFile. ORDER Id
>=SEEK(theRecno)
>RESTORE FROM MEMO &theField.
>CREATE CURSOR result (Val1 N(5), Val2 N(5))
>APPEND FROM ARRAY pgndata 
>SETRESULTSET('result')
>RETURN RECCOUNT('result')
>ENDPROC
The C# code:
using (OleDbConnection conn = new OleDbConnection(this.ConnectionString))
>            {
>                DataSet ds = new DataSet();
>
>                string commandString = "GetShortNutri('" + this.TableName + "','" + this.FieldName + "'," + this.Record + ")";
>                conn.Open();
>                OleDbCommand command = new OleDbCommand(commandString, conn);
>                command.CommandType = CommandType.StoredProcedure;
>                var adapter = new OleDbDataAdapter(command);
>                adapter.Fill(ds);  //Exception: 'Feature not available'
>            }
>
>SP works in VFP. All parameters are correct in the C# code (TableName and FieldName are strings; Record is int) . But 'adapter.Fills(ds)' throws the commented exception. Any suggestions ?
>
>Oh, and I tried substituting ' (theField) ' instead of ' &theField ' etc. same thing....
Previous
Reply
Map
View

Click here to load this message in the networking platform