Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Executing a VFP stored proc from C#...help!!!
Message
From
19/09/2003 14:25:22
Loy Agujo
BC Rapid Transit Co Ltd
Burnaby, British Columbia, Canada
 
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00830554
Message ID:
00830739
Views:
22
Hi Kevin,

I have the same problem too but corrected it by inserting the code below. Try this code, insert it in your program.

.
.
.
>Source=c:\\masonry\\data\\mydata.dbc"

OleDbCommand strCmd;
strConn.Open();
strCmd = New OleDBCommand("SET TABLEVALIDATE TO 0", strConn);
strCmd.ExecuteNonQuery();

>OleDbDataAdapter da = new OleDbDataAdapter(cProcName, strConn);
.
.


Loy

>I have a stored proc in VFP...let's say it's called GETDATA. It brings back >several rows of data. I'm using the newest VFP OLE DB provider.
>
>here's my code...it generates an unhandled exception of >type 'System.Data.OleDb.OleDbException' occurred in system.data.dll

>string cProcName = "exec getdata()";
>string strConn = "Provider=VFPOLEDB.1; Data >Source=c:\\masonry\\data\\mydata.dbc"

>OleDbDataAdapter da = new OleDbDataAdapter(cProcName, strConn);
>DataSet DsReturn = new DataSet();
>da.Fill(DsReturn);

>It doesn't matter if I hard code the connection string, or use a connection >object...I get the same result...the error is on the 'fill' command. It >also doesn't matter if I code the procname as 'exec getdata', or 'getdata()'...no combination seems to work.

>The stored proc runs fine if I run it in VFP.
Previous
Reply
Map
View

Click here to load this message in the networking platform