Hi please help & save my time:
I am getting an
Error: object reference not set to an instance of an object Here is the code:
note: codeTextBox.Text= CBE10000001
I am getting the error while calling the function LoadBusinessManDetails:
(Its not even going to that function. just throw the error exactly on the following line)
CALL mSybergy.LoadBusinessManDetails(CodeTextBox.Text) my function is:
Public Function LoadBusinessManDetails(ByVal vCode As String) As DataSet
Dim cmd As MySqlCommand = Nothing
Dim adp As MySqlDataAdapter = Nothing
Dim ds As New DataSet
Try
connection()
cmd = New MySqlCommand("SP_SelectWorker", Con)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add("vWMC", MySqlDbType.String).Value = vCode
adp = New MySqlDataAdapter(cmd)
adp.Fill(ds)
Con.Close()
Return ds
Catch ex As Exception
Throw ex
Finally
If Con.State = ConnectionState.Open Then
Con.Close()
End If
cmd.Dispose() : adp.Dispose()
End Try
End Function
please help me to save my time.
regards,
thiru.