Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help spotting a bug
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Développement mobile
Titre:
Help spotting a bug
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
00964283
Message ID:
00964283
Vues:
34
I'm getting an error message that reads "Could not find resource assembly" when trying to fill my data adapter. All the following code is in the click event of a button. I'm hoping someone can spot/point out what I'm screwing up. I'm playing with Beta 1 of the VS2005 Studio on the PocketPC.

Thanks

Kirk
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim gcConnStr As String
        gcConnStr = "Server=" & Me.txt_Server.Text.Trim() & ";uid=ctore;pwd=mypassword;database=CTOREDEV"
        Dim da As New SqlClient.SqlDataAdapter()
        Dim ds As New Data.DataSet()

        Dim remoteSql As System.Data.SqlClient.SqlConnection

        remoteSql = New System.Data.SqlClient.SqlConnection(gcConnStr)
        Try
            ' Open the connection
            remoteSql.Open()
            ' Create the command object
            Dim oCommand As New System.Data.SqlClient.SqlCommand
            ' Set the command type and stored procedure to exec
            oCommand.CommandText = "ppc_PhysicianIndSch"
            oCommand.CommandType = CommandType.StoredProcedure
            ' Add the two paramters to the command object
            Dim oParm1 As New System.Data.SqlClient.SqlParameter
            oParm1.Value = "11/01/2004 00:00:01"
            oParm1.Direction = ParameterDirection.Input
            oParm1.ParameterName = "@ltQueryFrom"
            oParm1.DbType = DbType.DateTime
            oCommand.Parameters.Add(oParm1)

            Dim oParm2 As New System.Data.SqlClient.SqlParameter
            oParm2.Value = "11/02/2004 23:59:59"
            oParm2.Direction = ParameterDirection.Input
            oParm2.ParameterName = "@ltQueryTo"
            oParm2.DbType = DbType.DateTime
            oCommand.Parameters.Add(oParm2)

            da.SelectCommand = oCommand
            Try
                da.Fill(ds, "SCH")
            Catch ex As Exception
                MsgBox(ex.Message)
                'Error Message: Could Not Find Resouce Assembly
                remoteSql.Close()
                Return
            End Try

            Dim lnCount As Integer
            lnCount = Me.BindingContext(ds, "sch").Count

            MsgBox("Count=" & lnCount.ToString)
            remoteSql.Close()

        Catch ex As System.Data.SqlClient.SqlException
            MsgBox("Unable to connect with the remote system database - " & ex.Message, MsgBoxStyle.Information, "Can't Connect")
        End Try
    End Sub
Répondre
Fil
Voir

Click here to load this message in the networking platform