Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ExecuteReader Error
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Titre:
ExecuteReader Error
Divers
Thread ID:
00805298
Message ID:
00805298
Vues:
64
I'm trying to run the following code from a button on a winform in vb.net, but I keep getting an error (Unhandled exception) on the ExectuteReader() line (last line).


Thanks for any help
        Dim strConnect As String
        Dim strCommandText As String
        '
        strConnect = "SERVER=(local);database=CTORE;UID=ctore;pwd=cqi$$"
        strCommandText = "smsg_Get_SendToSystems"

        Dim objConnect As New SqlClient.SqlConnection(strConnect)
        objConnect.Open()
        Dim objCommand As New SqlClient.SqlCommand(strCommandText, objConnect)
        objCommand.CommandType = CommandType.StoredProcedure

        Dim objDataReader As SqlClient.SqlDataReader

        objDataReader = objCommand.ExecuteReader()
I have tried calling the stored procedure from the QA, it returns two records.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform