1
This error occurs when I try to run my trial, I don’t know why it happens.
my code:
Dim con As SqlConnection = New SqlConnection()
Dim cmd As SqlCommand = New SqlCommand()
Try
con.ConnectionString = "Server = 10.230.11.43;Database=GFT_CAD;User Id=sa;Password = qweasd;"
con.Open()
cmd.Connection = con
cmd = New SqlCommand("prdInserirDocDB", con)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add(New SqlParameter("@SITUACAO_CACS", SqlDbType.VarChar)).Value = SITUACAO_CACS
cmd.Parameters.Add(New SqlParameter("@CGC_CPF_PORTADOR", SqlDbType.VarChar)).Value = CGC_CPF_PORTADOR
cmd.Parameters.Add(New SqlParameter("@FONE_CEL_PORT", SqlDbType.VarChar)).Value = FONE_CEL_PORT
cmd.ExecuteNonQuery()
MsgBox("inserido com sucesso")
Catch ex As Exception
MsgBox("erro em: " & ex.Message)
My prodecure:
@VR_ULT_PAGTO DECIMAL(09,2) ,
@VR_PRINCIPAL DECIMAL(09,2) ,
@SITUACAO_CACS VARCHAR(03) ,
@CGC_CPF_PORTADOR VARCHAR(15),
@FONE_CEL_PORT VARCHAR(17)
as
Begin
insert into tCImp_Doc(
SDO_ATUAL,
SDO_PARC_PEND,
SDO_LEGADO,
DT_ULT_PAGTO,
VR_ULT_PAGTO,
SITUACAO_CACS,
CGC_CPF_PORTADOR,
FONE_CEL_PORT
)
values(
@SDO_PARC_PEND,
@SDO_LEGADO,
@DT_ULT_PAGTO,
@VR_ULT_PAGTO,
@SITUACAO_CACS,
@CGC_CPF_PORTADOR,
@FONE_CEL_PORT
)
end
Ignore the wrong fields my code has many fields did not want to put all.