Error: Input string was not in a correct format
i have given my code below..i am getting this errpr
Error: Input string was not in a correct format.
Please help me
Dim DBConn, strSQL AsString
DBConn = ConfigurationSettings.AppSettings("appDSN")
Dim scnUser AsNew SqlConnection(DBConn)
strSQL = "select * from DCM_T_UserInformation"
Dim cmd AsNew SqlCommand(strSQL, scnUser)
cmd.CommandType = CommandType.Text
'scnUser = New SqlConnection(DBConn)
Dim sdaUser = New SqlDataAdapter(cmd)
Dim ds AsNew DataSet
sdaUser.fill(ds, "User")
ds.Tables(0).DefaultView.Sort = "IU_UserID"
Dim intRow AsInteger
intRow = ds.Tables(0).DefaultView.Find(txtUserID.Text)
If intRow = -1 Then
str1 = txtUserID.Text
Else
Label1.Text = "new id"
EndIf
Return str1
|