Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ExecuteReader Error
Message
 
To
All
General information
Forum:
ASP.NET
Category:
Databases
Title:
ExecuteReader Error
Miscellaneous
Thread ID:
00805298
Message ID:
00805298
Views:
63
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.
Next
Reply
Map
View

Click here to load this message in the networking platform