Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with error Getting Data from SQL
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Visual FoxPro Toolkit pour .NET
Titre:
Help with error Getting Data from SQL
Divers
Thread ID:
00804911
Message ID:
00804911
Vues:
45
I'm sure i'm missing just something little, but I can't get this function to work.

Code from Button Click
        '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.
Répondre
Fil
Voir

Click here to load this message in the networking platform