Here is my code:
Dim conn As String = "Data Source=Q:\network\Gestion\stage.dbc;Provider='VFPOLEDB.1';password='';user id=''" Dim OleDbConnection2 As OleDbConnection = New OleDbConnection(conn) Dim cmmSelect As 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 a la BD et on effectue la requete TryOleDbConnection2.Open()
Dim dt As OleDbDataReader = cmmSelect.ExecuteReader() 'Gestion des exceptions Catch ex As Exception Dim str As String = ex.Message FinallyOleDbConnection2.Close()
End TryI've tried various approaches, including a declaration like :
Dim sSelect As String = "ProcGrillePosteA('4397','20052','COTE')"
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.

Accessing VFP9.0 Stored procedures with .NET
Hatem Rabie
Do you have the latest VFP OLE DB provider, downloadable from the Fox web pages
Which version of Visual FoxPro was your database created with
What is the code for your VFP stored procedure Are you sure it is returning an ADO recordset and not just selecting data into a Fox cursor
Pedro Pinto
T. McClung