'Establish a connection and a command Dim lcConnectionString As String Dim lcSQL As String Dim oConn As OleDb.OleDbConnection Dim goView As Data.DataView Dim oCommand As New OleDb.OleDbCommand 'Get the connection string and sql statement lcConnectionString = "Provider=SQLOLEDB;SERVER=(local);database=CTORE;UID=ctore;pwd=cqi$$" oCommand.CommandText = "smsg_Get_SendToSystems" oCommand.CommandType = CommandType.StoredProcedure 'Connect to the Database, execute the query and disconnect oConn = SqlConnect(lcConnectionString) oCommand.Connection = oConn goView = SqlExecute(oConn, oCommand, "smsgList") SqlDisConnect(oConn) 'Select the default cursor VFPToolkit.vfpData.Select(goView) Browse()Error Message:
An unhandled exception of type 'System.InvalidOperationException' occurred in system.data.dll Additional information: Fill: SelectCommand.Connection property has not been initialized.