Accessing VFP9.0 Stored procedures with .NET
Here is my code:Dim connAsString = "Data Source=Q:\network\Gestion\stage.dbc;Provider='VFPOLEDB.1';password='';user id=''"Dim OleDbConnection2As OleDbConnection =New OleDbConnection(conn)Dim cmmSelectAs OleDbCommand =New OleDbCommand("ProcGrillePosteA", OleDbConnection2)
cmmSelect.CommandType = CommandType.StoredProcedure
'Dim adaSelect As OleDbDataAdapter = New OleDbDataAdapter(cmmSelect)cmmSelect.Parameters.Add("VGemployeur", "4397")
cmmSelect.Parameters.Add("VGsessioncourante", "20052")
cmmSelect.Parameters.Add("VGaffichage", "COTE")
'on se connecte à la BD et on effectue la requêteTryOleDbConnection2.Open()
Dim dtAs OleDbDataReader = cmmSelect.ExecuteReader()'Gestion des exceptionsCatch exAs ExceptionDim strAsString = ex.MessageFinallyOleDbConnection2.Close()
EndTryI've tried various approaches, including a declaration like :
for the command string...
yet nothing works. I can connect and send a regular SQL select query to the Foxpro database, but I just can't manage it with a stored procedure
I always get this message:
"Connectivity error: [Microsoft][Gestionnaire de pilotes ODBC] Connexion non ouverte" which is basically saying the connection isnt opened. Yet, If i comment out the reader, the connection opens and closes without any problems.
The stored procedure i'm trying to run should return a set of rows.
Any help would be appreciated.

