calling stored procedure from Visual FoxPro database

J

JN

Hello,

I'm having problem calling stored procedures from Visual
FoxPro database. I got the following exception error:

"System.Data.OleDb.OleDbException: Unrecognized command
verb"

It seems like the stored procedures are not recognized
by .Net.
I'm using .Net framework 1.0 and VFP7.0.

Here is my code snipet:

Dim oConn As OleDbConnection = New OleDbConnection
(AppSettings("connectionString"))
Dim oCmd As OleDbCommand = New OleDbCommand()

oCmd.Connection = oConn
oCmd.CommandText = "generateID" 'calling stored procedure
oCmd.CommandType = CommandType.StoredProcedure

Try
oCmd.Connection.Open()

Dim oDR As OleDbDataReader
oDR = oCmd.ExecuteQuery()
......................
oDR.Close()

.........

Any help would be appreciated. Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top