G
Guest
Hello all!
I tried a few things, can't seem to figure out the right combination. here
the snippet of CODE
Dim cmdBet As SqlCommand
Dim ConWg As New SqlConnection
Try
ConWg = New
SqlConnection("Server=Localhost;uid=xx;pwd=xxxx;database=xxx")
cmdBet = New SqlCommand("PlBetII", ConWg)
cmdBet.CommandType = CommandType.StoredProcedure
'cmdBet.Parameters.Add("@Credits", SqlDbType.NVarChar).Value =
txbCredits.Text
cmdBet.Parameters.Add("@Wager", SqlDbType.Decimal).Value =
txbTotWage.Text
cmdBet.Parameters.Add("@UserID", SqlDbType.VarChar).Value =
txbTableIDm.Text
ConWg.Open()
cmdBet.ExecuteNonQuery()
ConWg.Close()
Catch ex As Exception
Label4.Text = ex.Message.ToString
End Try
The value in txbTotWage is like this "$6.00"
My SP PlBetII is good, and @wage is deciaml. I get this on Exception. "Input
string was not in correct format" I know that if I take the "$" away, it
should be fine, so how do I go about fixing this. SQL should take I thought.
When Itried to use Money in the SQL table, in my vb.net app, it says it's not
correct format. Any ideas?
TIA!!!
Rudy
I tried a few things, can't seem to figure out the right combination. here
the snippet of CODE
Dim cmdBet As SqlCommand
Dim ConWg As New SqlConnection
Try
ConWg = New
SqlConnection("Server=Localhost;uid=xx;pwd=xxxx;database=xxx")
cmdBet = New SqlCommand("PlBetII", ConWg)
cmdBet.CommandType = CommandType.StoredProcedure
'cmdBet.Parameters.Add("@Credits", SqlDbType.NVarChar).Value =
txbCredits.Text
cmdBet.Parameters.Add("@Wager", SqlDbType.Decimal).Value =
txbTotWage.Text
cmdBet.Parameters.Add("@UserID", SqlDbType.VarChar).Value =
txbTableIDm.Text
ConWg.Open()
cmdBet.ExecuteNonQuery()
ConWg.Close()
Catch ex As Exception
Label4.Text = ex.Message.ToString
End Try
The value in txbTotWage is like this "$6.00"
My SP PlBetII is good, and @wage is deciaml. I get this on Exception. "Input
string was not in correct format" I know that if I take the "$" away, it
should be fine, so how do I go about fixing this. SQL should take I thought.
When Itried to use Money in the SQL table, in my vb.net app, it says it's not
correct format. Any ideas?
TIA!!!
Rudy