M
Manuel Canas
Hi there,
This is the Code ;
cnSQL = New SqlConnection(ConnectionString)
cmSQL = New SqlCommand(strSQL, cnSQL)
strSQL = "INSERT tb_product VALUES(@ServiceCode,@ServiceName,@Price)"
cmSQL = New SqlCommand(strSQL, cnSQL)
Dim m As New SqlParameter("@Price", txtPrice.Text)
m.DbType = System.Data.SqlDbType.Money
cmSQL.Parameters.Add(m)
Dim s As New SqlParameter("@ServiceCode", txtServiceCode.Text)
m.DbType = System.Data.SqlDbType.Char
cmSQL.Parameters.Add(s)
Dim n As New SqlParameter("@ServiceName", txtServiceName.Text)
m.DbType = System.Data.SqlDbType.Char
cmSQL.Parameters.Add(n)
cnSQL.Open()
cmSQL.ExecuteNonQuery()
When I execute it, it throws an error saying "String was not recognized as
a valid boolean"
Any body out there that can tell what am I doing wrong here.
Thanks very much,
Manny
This is the Code ;
cnSQL = New SqlConnection(ConnectionString)
cmSQL = New SqlCommand(strSQL, cnSQL)
strSQL = "INSERT tb_product VALUES(@ServiceCode,@ServiceName,@Price)"
cmSQL = New SqlCommand(strSQL, cnSQL)
Dim m As New SqlParameter("@Price", txtPrice.Text)
m.DbType = System.Data.SqlDbType.Money
cmSQL.Parameters.Add(m)
Dim s As New SqlParameter("@ServiceCode", txtServiceCode.Text)
m.DbType = System.Data.SqlDbType.Char
cmSQL.Parameters.Add(s)
Dim n As New SqlParameter("@ServiceName", txtServiceName.Text)
m.DbType = System.Data.SqlDbType.Char
cmSQL.Parameters.Add(n)
cnSQL.Open()
cmSQL.ExecuteNonQuery()
When I execute it, it throws an error saying "String was not recognized as
a valid boolean"
Any body out there that can tell what am I doing wrong here.
Thanks very much,
Manny