Dim lcConnectionString As String Dim oConn As OleDbConnection Dim oCommand As New OleDbCommand() 'Specify the connection string lcConnectionString = "Provider=SQLOleDb; server=(local); database=VFPToolkitNET; UID=sa; Pwd=" 'Specify the stored procedure. (In my case GetVFPCommand) oCommand.CommandText = "GetVFPCommand" oCommand.CommandType = CommandType.StoredProcedure 'Create a new parameter and add it to the parameters collection Dim oParam1 As New OleDbParameter("@t_Command", OleDb.OleDbType.VarChar) oParam1.Value = "ALEN" oCommand.Parameters.Add(oParam1) 'Connect to the Database, execute the query and disconnect 'SqlConnect(), SqlExecute(), SqlDisconnect() oConn = SqlConnect(lcConnectionString) 'Extra step required in this release of toolkit. This will be fixed in a future release oCommand.Connection = oConn 'Execute and disconnect goView = SqlExecute(oConn, oCommand, "CustomerList") SqlDisConnect(oConn) 'Select the default cursor VFPToolkit.vfpData.Select(goView) Browse()There is a bug in the toolkit that requires an extra step to call stored procedures. It has been fixed for the next release.
'Requires specifying the connection explicitely when calling stored procedures oCommand.Connection = oConnHope this helps,