Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling stored procedure from VFP database

Status
Not open for further replies.

jn03

Programmer
Jan 16, 2003
45
0
0
CA
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"

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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top