Alguém tem alguma sugestão, a mensagem do título aparece com as linhas de código abaixo:
PrivateSubalterar()
DimConn
AsNewOleDbConnection(My.Settings.SIADSConecte)
DimCommand
AsNewOleDbCommand
DimQuery
AsString=
""
Query =
"UPDATE tbCadPessoaJuridica SET categoriaPJ=@categoriaPJ, dataCadastro=@dataCadastro, razaoSocial=@razaoSocial, nomeFant=@nomeFant,
socioProp=@socioProp, cpf=@cpf, rg=@rg, dataFundacao=@dataFundacao, cnpj=@cnpj, ie=@ie, dtInCont=@dtInCont, dtTerCont=@dtTerCont, ativa=@ativa, codCnae=@codCnae, observacao=@observacao WHERE (codRazaoSocial=@codRazaoSocial)"
Command.Connection = Conn
Command.CommandText = Query
selcom.Parameters.AddWithValue(
"@categoriaPJ", rblCategoriaPJ.Text)
selcom.Parameters.AddWithValue(
"@dataCadastro", txtDataCadas.Text)
selcom.Parameters.AddWithValue(
"@razaoSocial", txtRazao.Text)
selcom.Parameters.AddWithValue(
"@nomeFant", txtFantasia.Text)
selcom.Parameters.AddWithValue(
"@socioProp", txtSocio.Text)
selcom.Parameters.AddWithValue(
"@cpf", txtCPFsocio.Text)
selcom.Parameters.AddWithValue(
"@rg", txtRGsocio.Text)
selcom.Parameters.AddWithValue(
"@dataFundacao", txtDataFunda.Text)
selcom.Parameters.AddWithValue(
"@cnpj", txtCNPJ.Text)
selcom.Parameters.AddWithValue(
"@ie", txtIE.Text)
selcom.Parameters.AddWithValue(
"@dtInCont", txtDataIniContrato.Text)
selcom.Parameters.AddWithValue(
"@dtTerCont", txtDataFinalContrato.Text)
selcom.Parameters.AddWithValue(
"@ativa", rblCondicaoAtual.Text)
selcom.Parameters.AddWithValue(
"@codCnae", ddlCNAE.Text)
selcom.Parameters.AddWithValue(
"@observacao", txtObservacao.Text)
selcom.Parameters.AddWithValue(
"@codRazaoSocial", gvwPJ.SelectedRow.Cells(1).Text)
Conn.Open()
Command.ExecuteNonQuery()
Conn.Dispose()
Label1.Text =
"Dados gravados com sucesso"
rblCategoriaPJ.Focus()
desabilita()
cargaGRID()
EndSub