ERRO AO GRAVAR DATA - MYSQL
Bom dia
Estou com erro ao tentar gravar uma data em branco no banco de dados do MySql, abaixo esta o código para salvar no arquivo
fSQL01 = [Ô]Update AQ_ASS01 SET [Ô] & _
[Ô]NOMASS_ASS =[ô][Ô] & Txt_Associ.Text & [Ô][ô],[Ô] & _
[Ô]CDCATAS_ASS =[ô][Ô] & Trim(New_Codigo) & [Ô][ô],[Ô] & _
[Ô]CATASS_ASS =[ô][Ô] & Trim(Txt_CatAss.Text) & [Ô][ô],[Ô] & _
[Ô]DATADM_ASS =[ô][Ô] & IIf(Msk_DtAdm.Text <> [Ô] [Ô], Format(Msk_DtAdm.Text, [Ô]yyyy-mm-dd[Ô]), Null) & [Ô][ô],[Ô] & _
[Ô]ENDCOR_ASS =[ô][Ô] & IIf(Option1(0).Value = True, [Ô]R[Ô], IIf(Option1(1).Value = True, [Ô]C[Ô], Null)) & [Ô][ô],[Ô] & _
[Ô]TIPASS_ASS =[ô][Ô] & IIf(Option1(2).Value = True, [Ô]F[Ô], IIf(Option1(3).Value = True, [Ô]J[Ô], Null)) & [Ô][ô],[Ô] & _
[Ô]SITASS_ASS =[ô][Ô] & IIf(Option1(4).Value = True, [Ô]A[Ô], IIf(Option1(5).Value = True, [Ô]I[Ô], Null)) & [Ô][ô],[Ô] & _
[Ô]DATINA_ASS =[ô][Ô] & IIf(Msk_DtInat.Text <> [Ô]__/__/____[Ô], Format(Msk_DtInat.Text, [Ô]yyyy-mm-dd[Ô]), Null) & [Ô][ô],[Ô] & _
[Ô]VALCAR_ASS =[ô][Ô] & IIf(Msk_DtVlCar.Text <> [Ô][Ô], Format(Msk_DtVlCar.Text, [Ô]yyyy-mm-dd[Ô]), Null) & [Ô][ô],[Ô] & _
[Ô]IDEASS_ASS =[ô][Ô] & IIf(Txt_AssIds.Text <> [Ô][Ô], Txt_AssIds.Text, Null) & [Ô][ô],[Ô] & _
[Ô]CPFASS_ASS =[ô][Ô] & IIf(Txt_AssCpf.Text <> [Ô][Ô], Txt_AssCpf.Text, Null) & [Ô][ô],[Ô] & _
[Ô]DATNAS_ASS =[ô][Ô] & IIf(Msk_AssNas.Text <> [Ô][Ô], Format(Msk_AssNas.Text, [Ô]yyyy-mm-dd[Ô]), Null) & [Ô][ô],[Ô] & _
[Ô]IDADES_ASS =[ô][Ô] & IIf(Lbl_IdAss.Caption <> [Ô][Ô], Lbl_IdAss.Caption, Idade(Msk_AssNas.Text)) & [Ô][ô],[Ô] & _
[Ô]LOCNAS_ASS =[ô][Ô] & IIf(Txt_AssLna.Text <> [Ô][Ô], Txt_AssLna.Text, Null) & [Ô][ô],[Ô] & _
[Ô]ESTNAS_ASS =[ô][Ô] & IIf(CboEstad03.Text <> [Ô][Ô], CboEstad03.Text, Null) & [Ô][ô],[Ô] & _
[Ô]NASASS_ASS =[ô][Ô] & IIf(Txt_AssNat.Text <> [Ô][Ô], Trim(Txt_AssNat.Text), Null) & [Ô][ô],[Ô] & _
[Ô]ESTCIV_ASS =[ô][Ô] & IIf(Combo1(0).Text <> [Ô][Ô], Trim(Combo1(0).Text), Null) & [Ô][ô],[Ô] & _
[Ô]SEXASS_ASS =[ô][Ô] & IIf(Combo1(1).Text <> [Ô][Ô], Trim(Combo1(1).Text), Null) & [Ô][ô],[Ô] & _
[Ô]GRAINT_ASS =[ô][Ô] & IIf(Combo1(2).Text <> [Ô][Ô], Trim(Combo1(2).Text), Null) & [Ô][ô],[Ô] & _
[Ô]PAIASS_ASS =[ô][Ô] & IIf(Txt_AssPai.Text <> String(19, [Ô]_[Ô]), Trim(Txt_AssPai.Text), Null) & [Ô][ô],[Ô] & _
[Ô]MAEASS_ASS =[ô][Ô] & IIf(Txt_AssMae.Text <> [Ô][Ô], Trim(Txt_AssMae.Text), Null) & [Ô][ô],[Ô] & _
[Ô]PROASS_ASS =[ô][Ô] & IIf(Txt_AssPro.Text <> [Ô][Ô], Trim(Txt_AssPro.Text), Null) & [Ô][ô],[Ô] & _
[Ô]ENDRES_ASS =[ô][Ô] & IIf(Txt_ResRes.Text <> [Ô][Ô], Trim(Txt_ResRes.Text), Null) & [Ô][ô] WHERE CODMAT_ASS =[ô][Ô] & Txt_CodAss.Text & [Ô][ô][Ô]
MdAsso01.Open fSQL01
O erros se dá na neste instrução: DATNAS_ASS =[ô][Ô] & IIf(Msk_AssNas.Text <> [Ô][Ô], Format(Msk_AssNas.Text, [Ô]yyyy-mm-dd[Ô]), Null) & [Ô][ô],[Ô] & _
Como faço para salvar datas em branco no MySql.
Obrigado,
Estou com erro ao tentar gravar uma data em branco no banco de dados do MySql, abaixo esta o código para salvar no arquivo
fSQL01 = [Ô]Update AQ_ASS01 SET [Ô] & _
[Ô]NOMASS_ASS =[ô][Ô] & Txt_Associ.Text & [Ô][ô],[Ô] & _
[Ô]CDCATAS_ASS =[ô][Ô] & Trim(New_Codigo) & [Ô][ô],[Ô] & _
[Ô]CATASS_ASS =[ô][Ô] & Trim(Txt_CatAss.Text) & [Ô][ô],[Ô] & _
[Ô]DATADM_ASS =[ô][Ô] & IIf(Msk_DtAdm.Text <> [Ô] [Ô], Format(Msk_DtAdm.Text, [Ô]yyyy-mm-dd[Ô]), Null) & [Ô][ô],[Ô] & _
[Ô]ENDCOR_ASS =[ô][Ô] & IIf(Option1(0).Value = True, [Ô]R[Ô], IIf(Option1(1).Value = True, [Ô]C[Ô], Null)) & [Ô][ô],[Ô] & _
[Ô]TIPASS_ASS =[ô][Ô] & IIf(Option1(2).Value = True, [Ô]F[Ô], IIf(Option1(3).Value = True, [Ô]J[Ô], Null)) & [Ô][ô],[Ô] & _
[Ô]SITASS_ASS =[ô][Ô] & IIf(Option1(4).Value = True, [Ô]A[Ô], IIf(Option1(5).Value = True, [Ô]I[Ô], Null)) & [Ô][ô],[Ô] & _
[Ô]DATINA_ASS =[ô][Ô] & IIf(Msk_DtInat.Text <> [Ô]__/__/____[Ô], Format(Msk_DtInat.Text, [Ô]yyyy-mm-dd[Ô]), Null) & [Ô][ô],[Ô] & _
[Ô]VALCAR_ASS =[ô][Ô] & IIf(Msk_DtVlCar.Text <> [Ô][Ô], Format(Msk_DtVlCar.Text, [Ô]yyyy-mm-dd[Ô]), Null) & [Ô][ô],[Ô] & _
[Ô]IDEASS_ASS =[ô][Ô] & IIf(Txt_AssIds.Text <> [Ô][Ô], Txt_AssIds.Text, Null) & [Ô][ô],[Ô] & _
[Ô]CPFASS_ASS =[ô][Ô] & IIf(Txt_AssCpf.Text <> [Ô][Ô], Txt_AssCpf.Text, Null) & [Ô][ô],[Ô] & _
[Ô]DATNAS_ASS =[ô][Ô] & IIf(Msk_AssNas.Text <> [Ô][Ô], Format(Msk_AssNas.Text, [Ô]yyyy-mm-dd[Ô]), Null) & [Ô][ô],[Ô] & _
[Ô]IDADES_ASS =[ô][Ô] & IIf(Lbl_IdAss.Caption <> [Ô][Ô], Lbl_IdAss.Caption, Idade(Msk_AssNas.Text)) & [Ô][ô],[Ô] & _
[Ô]LOCNAS_ASS =[ô][Ô] & IIf(Txt_AssLna.Text <> [Ô][Ô], Txt_AssLna.Text, Null) & [Ô][ô],[Ô] & _
[Ô]ESTNAS_ASS =[ô][Ô] & IIf(CboEstad03.Text <> [Ô][Ô], CboEstad03.Text, Null) & [Ô][ô],[Ô] & _
[Ô]NASASS_ASS =[ô][Ô] & IIf(Txt_AssNat.Text <> [Ô][Ô], Trim(Txt_AssNat.Text), Null) & [Ô][ô],[Ô] & _
[Ô]ESTCIV_ASS =[ô][Ô] & IIf(Combo1(0).Text <> [Ô][Ô], Trim(Combo1(0).Text), Null) & [Ô][ô],[Ô] & _
[Ô]SEXASS_ASS =[ô][Ô] & IIf(Combo1(1).Text <> [Ô][Ô], Trim(Combo1(1).Text), Null) & [Ô][ô],[Ô] & _
[Ô]GRAINT_ASS =[ô][Ô] & IIf(Combo1(2).Text <> [Ô][Ô], Trim(Combo1(2).Text), Null) & [Ô][ô],[Ô] & _
[Ô]PAIASS_ASS =[ô][Ô] & IIf(Txt_AssPai.Text <> String(19, [Ô]_[Ô]), Trim(Txt_AssPai.Text), Null) & [Ô][ô],[Ô] & _
[Ô]MAEASS_ASS =[ô][Ô] & IIf(Txt_AssMae.Text <> [Ô][Ô], Trim(Txt_AssMae.Text), Null) & [Ô][ô],[Ô] & _
[Ô]PROASS_ASS =[ô][Ô] & IIf(Txt_AssPro.Text <> [Ô][Ô], Trim(Txt_AssPro.Text), Null) & [Ô][ô],[Ô] & _
[Ô]ENDRES_ASS =[ô][Ô] & IIf(Txt_ResRes.Text <> [Ô][Ô], Trim(Txt_ResRes.Text), Null) & [Ô][ô] WHERE CODMAT_ASS =[ô][Ô] & Txt_CodAss.Text & [Ô][ô][Ô]
MdAsso01.Open fSQL01
O erros se dá na neste instrução: DATNAS_ASS =[ô][Ô] & IIf(Msk_AssNas.Text <> [Ô][Ô], Format(Msk_AssNas.Text, [Ô]yyyy-mm-dd[Ô]), Null) & [Ô][ô],[Ô] & _
Como faço para salvar datas em branco no MySql.
Obrigado,
Vc pode fazer da mesma forma que no firebird, informamos null, sem haspas, e ele deixa o campo nulo.
tipo assim: insert into tbl_usuario(nome, dtnasc) values ([ô]RICART SILVA[ô],NULL);
tipo assim: insert into tbl_usuario(nome, dtnasc) values ([ô]RICART SILVA[ô],NULL);
tente esta modificação
fSQL01 = [Ô]Update AQ_ASS01 SET [Ô] & _
[Ô]NOMASS_ASS =[ô][Ô] & Txt_Associ.Text & [Ô][ô],[Ô] & _
[Ô]CDCATAS_ASS =[ô][Ô] & Trim(New_Codigo) & [Ô][ô],[Ô] & _
[Ô]CATASS_ASS =[ô][Ô] & Trim(Txt_CatAss.Text) & [Ô][ô],[Ô] & _
[Ô]DATADM_ASS =[Ô] & IIf(Msk_DtAdm.Text <> [Ô][Ô], [Ô][ô][Ô] & Format(Msk_DtAdm.Text, [Ô]yyyy-mm-dd[Ô]) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]ENDCOR_ASS =[ô][Ô] & IIf(Option1(0).Value = True, [Ô]R[Ô], IIf(Option1(1).Value = True, [Ô]C[Ô], [Ô]Null[Ô])) & [Ô][ô],[Ô] & _
[Ô]TIPASS_ASS =[ô][Ô] & IIf(Option1(2).Value = True, [Ô]F[Ô], IIf(Option1(3).Value = True, [Ô]J[Ô], [Ô]Null[Ô])) & [Ô][ô],[Ô] & _
[Ô]SITASS_ASS =[ô][Ô] & IIf(Option1(4).Value = True, [Ô]A[Ô], IIf(Option1(5).Value = True, [Ô]I[Ô], [Ô]Null[Ô])) & [Ô][ô],[Ô] & _
[Ô]DATINA_ASS =[Ô] & IIf(Msk_DtInat.Text <> [Ô]__/__/____[Ô], [Ô][ô][Ô] & Format(Msk_DtInat.Text, [Ô]yyyy-mm-dd[Ô]) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]VALCAR_ASS =[Ô] & IIf(Msk_DtVlCar.Text <> [Ô][Ô], [Ô][ô][Ô] & Format(Msk_DtVlCar.Text, [Ô]yyyy-mm-dd[Ô]) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]IDEASS_ASS =[Ô] & IIf(Txt_AssIds.Text <> [Ô][Ô], [Ô][ô][Ô] & Txt_AssIds.Text & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]CPFASS_ASS =[Ô] & IIf(Txt_AssCpf.Text <> [Ô][Ô], [Ô][ô][Ô] & Txt_AssCpf.Text & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]DATNAS_ASS =[Ô] & IIf(Msk_AssNas.Text <> [Ô][Ô], [Ô][ô][Ô] & Format(Msk_AssNas.Text, [Ô]yyyy-mm-dd[Ô]) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]IDADES_ASS =[Ô] & IIf(Lbl_IdAss.Caption <> [Ô][Ô], Lbl_IdAss.Caption, Idade(Msk_AssNas.Text)) & [Ô],[Ô] & _
[Ô]LOCNAS_ASS =[Ô] & IIf(Txt_AssLna.Text <> [Ô][Ô], [Ô][ô][Ô] & Txt_AssLna.Text & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]ESTNAS_ASS =[Ô] & IIf(CboEstad03.Text <> [Ô][Ô], [Ô][ô][Ô] & CboEstad03.Text & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]NASASS_ASS =[Ô] & IIf(Txt_AssNat.Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Txt_AssNat.Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]ESTCIV_ASS =[Ô] & IIf(Combo1(0).Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Combo1(0).Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]SEXASS_ASS =[Ô] & IIf(Combo1(1).Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Combo1(1).Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]GRAINT_ASS =[Ô] & IIf(Combo1(2).Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Combo1(2).Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]PAIASS_ASS =[Ô] & IIf(Txt_AssPai.Text <> String(19, [Ô]_[Ô]), [Ô][ô][Ô] & Trim(Txt_AssPai.Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]MAEASS_ASS =[Ô] & IIf(Txt_AssMae.Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Txt_AssMae.Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]PROASS_ASS =[Ô] & IIf(Txt_AssPro.Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Txt_AssPro.Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]ENDRES_ASS =[Ô] & IIf(Txt_ResRes.Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Txt_ResRes.Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô] WHERE CODMAT_ASS =[ô][Ô] & Txt_CodAss.Text & [Ô][ô][Ô]
MdAsso01.Open fSQL01
diga se funcionar
fSQL01 = [Ô]Update AQ_ASS01 SET [Ô] & _
[Ô]NOMASS_ASS =[ô][Ô] & Txt_Associ.Text & [Ô][ô],[Ô] & _
[Ô]CDCATAS_ASS =[ô][Ô] & Trim(New_Codigo) & [Ô][ô],[Ô] & _
[Ô]CATASS_ASS =[ô][Ô] & Trim(Txt_CatAss.Text) & [Ô][ô],[Ô] & _
[Ô]DATADM_ASS =[Ô] & IIf(Msk_DtAdm.Text <> [Ô][Ô], [Ô][ô][Ô] & Format(Msk_DtAdm.Text, [Ô]yyyy-mm-dd[Ô]) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]ENDCOR_ASS =[ô][Ô] & IIf(Option1(0).Value = True, [Ô]R[Ô], IIf(Option1(1).Value = True, [Ô]C[Ô], [Ô]Null[Ô])) & [Ô][ô],[Ô] & _
[Ô]TIPASS_ASS =[ô][Ô] & IIf(Option1(2).Value = True, [Ô]F[Ô], IIf(Option1(3).Value = True, [Ô]J[Ô], [Ô]Null[Ô])) & [Ô][ô],[Ô] & _
[Ô]SITASS_ASS =[ô][Ô] & IIf(Option1(4).Value = True, [Ô]A[Ô], IIf(Option1(5).Value = True, [Ô]I[Ô], [Ô]Null[Ô])) & [Ô][ô],[Ô] & _
[Ô]DATINA_ASS =[Ô] & IIf(Msk_DtInat.Text <> [Ô]__/__/____[Ô], [Ô][ô][Ô] & Format(Msk_DtInat.Text, [Ô]yyyy-mm-dd[Ô]) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]VALCAR_ASS =[Ô] & IIf(Msk_DtVlCar.Text <> [Ô][Ô], [Ô][ô][Ô] & Format(Msk_DtVlCar.Text, [Ô]yyyy-mm-dd[Ô]) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]IDEASS_ASS =[Ô] & IIf(Txt_AssIds.Text <> [Ô][Ô], [Ô][ô][Ô] & Txt_AssIds.Text & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]CPFASS_ASS =[Ô] & IIf(Txt_AssCpf.Text <> [Ô][Ô], [Ô][ô][Ô] & Txt_AssCpf.Text & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]DATNAS_ASS =[Ô] & IIf(Msk_AssNas.Text <> [Ô][Ô], [Ô][ô][Ô] & Format(Msk_AssNas.Text, [Ô]yyyy-mm-dd[Ô]) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]IDADES_ASS =[Ô] & IIf(Lbl_IdAss.Caption <> [Ô][Ô], Lbl_IdAss.Caption, Idade(Msk_AssNas.Text)) & [Ô],[Ô] & _
[Ô]LOCNAS_ASS =[Ô] & IIf(Txt_AssLna.Text <> [Ô][Ô], [Ô][ô][Ô] & Txt_AssLna.Text & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]ESTNAS_ASS =[Ô] & IIf(CboEstad03.Text <> [Ô][Ô], [Ô][ô][Ô] & CboEstad03.Text & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]NASASS_ASS =[Ô] & IIf(Txt_AssNat.Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Txt_AssNat.Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]ESTCIV_ASS =[Ô] & IIf(Combo1(0).Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Combo1(0).Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]SEXASS_ASS =[Ô] & IIf(Combo1(1).Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Combo1(1).Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]GRAINT_ASS =[Ô] & IIf(Combo1(2).Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Combo1(2).Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]PAIASS_ASS =[Ô] & IIf(Txt_AssPai.Text <> String(19, [Ô]_[Ô]), [Ô][ô][Ô] & Trim(Txt_AssPai.Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]MAEASS_ASS =[Ô] & IIf(Txt_AssMae.Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Txt_AssMae.Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]PROASS_ASS =[Ô] & IIf(Txt_AssPro.Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Txt_AssPro.Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]ENDRES_ASS =[Ô] & IIf(Txt_ResRes.Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Txt_ResRes.Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô] WHERE CODMAT_ASS =[ô][Ô] & Txt_CodAss.Text & [Ô][ô][Ô]
MdAsso01.Open fSQL01
diga se funcionar
Não deu certo, com aspas ou sem aspas continua dando erro ao salvar os dados
O que posso fazer para acabar com este erro??
Obrigado,
O que posso fazer para acabar com este erro??
Obrigado,
tenta de noo e que eu havia esquecido algumas coisas
fSQL01 = [Ô]Update AQ_ASS01 SET [Ô] & _
[Ô]NOMASS_ASS =[ô][Ô] & Txt_Associ.Text & [Ô][ô],[Ô] & _
[Ô]CDCATAS_ASS =[ô][Ô] & Trim(New_Codigo) & [Ô][ô],[Ô] & _
[Ô]CATASS_ASS =[ô][Ô] & Trim(Txt_CatAss.Text) & [Ô][ô],[Ô] & _
[Ô]DATADM_ASS =[Ô] & IIf(Msk_DtAdm.Text <> [Ô][Ô], [Ô][ô][Ô] & Format(Msk_DtAdm.Text, [Ô]yyyy-mm-dd[Ô]) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]ENDCOR_ASS =[ô][Ô] & IIf(Option1(0).Value = True, [Ô]R[Ô], IIf(Option1(1).Value = True, [Ô]C[Ô], [Ô]Null[Ô])) & [Ô][ô],[Ô] & _
[Ô]TIPASS_ASS =[ô][Ô] & IIf(Option1(2).Value = True, [Ô]F[Ô], IIf(Option1(3).Value = True, [Ô]J[Ô], [Ô]Null[Ô])) & [Ô][ô],[Ô] & _
[Ô]SITASS_ASS =[ô][Ô] & IIf(Option1(4).Value = True, [Ô]A[Ô], IIf(Option1(5).Value = True, [Ô]I[Ô], [Ô]Null[Ô])) & [Ô][ô],[Ô] & _
[Ô]DATINA_ASS =[Ô] & IIf(Msk_DtInat.Text <> [Ô]__/__/____[Ô], [Ô][ô][Ô] & Format(Msk_DtInat.Text, [Ô]yyyy-mm-dd[Ô]) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]VALCAR_ASS =[Ô] & IIf(Msk_DtVlCar.Text <> [Ô][Ô], [Ô][ô][Ô] & Format(Msk_DtVlCar.Text, [Ô]yyyy-mm-dd[Ô]) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]IDEASS_ASS =[Ô] & IIf(Txt_AssIds.Text <> [Ô][Ô], [Ô][ô][Ô] & Txt_AssIds.Text & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]CPFASS_ASS =[Ô] & IIf(Txt_AssCpf.Text <> [Ô][Ô], [Ô][ô][Ô] & Txt_AssCpf.Text & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]DATNAS_ASS =[Ô] & IIf(Msk_AssNas.Text <> [Ô][Ô], [Ô][ô][Ô] & Format(Msk_AssNas.Text, [Ô]yyyy-mm-dd[Ô]) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]IDADES_ASS =[Ô] & IIf(Lbl_IdAss.Caption <> [Ô][Ô], Lbl_IdAss.Caption, Idade(Msk_AssNas.Text)) & [Ô],[Ô] & _
[Ô]LOCNAS_ASS =[Ô] & IIf(Txt_AssLna.Text <> [Ô][Ô], [Ô][ô][Ô] & Txt_AssLna.Text & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]ESTNAS_ASS =[Ô] & IIf(CboEstad03.Text <> [Ô][Ô], [Ô][ô][Ô] & CboEstad03.Text & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]NASASS_ASS =[Ô] & IIf(Txt_AssNat.Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Txt_AssNat.Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]ESTCIV_ASS =[Ô] & IIf(Combo1(0).Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Combo1(0).Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]SEXASS_ASS =[Ô] & IIf(Combo1(1).Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Combo1(1).Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]GRAINT_ASS =[Ô] & IIf(Combo1(2).Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Combo1(2).Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]PAIASS_ASS =[Ô] & IIf(Txt_AssPai.Text <> String(19, [Ô]_[Ô]), [Ô][ô][Ô] & Trim(Txt_AssPai.Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]MAEASS_ASS =[Ô] & IIf(Txt_AssMae.Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Txt_AssMae.Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]PROASS_ASS =[Ô] & IIf(Txt_AssPro.Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Txt_AssPro.Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]ENDRES_ASS =[Ô] & IIf(Txt_ResRes.Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Txt_ResRes.Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô] WHERE CODMAT_ASS =[ô][Ô] & Txt_CodAss.Text & [Ô][ô][Ô]
MdAsso01.Open fSQL01
fSQL01 = [Ô]Update AQ_ASS01 SET [Ô] & _
[Ô]NOMASS_ASS =[ô][Ô] & Txt_Associ.Text & [Ô][ô],[Ô] & _
[Ô]CDCATAS_ASS =[ô][Ô] & Trim(New_Codigo) & [Ô][ô],[Ô] & _
[Ô]CATASS_ASS =[ô][Ô] & Trim(Txt_CatAss.Text) & [Ô][ô],[Ô] & _
[Ô]DATADM_ASS =[Ô] & IIf(Msk_DtAdm.Text <> [Ô][Ô], [Ô][ô][Ô] & Format(Msk_DtAdm.Text, [Ô]yyyy-mm-dd[Ô]) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]ENDCOR_ASS =[ô][Ô] & IIf(Option1(0).Value = True, [Ô]R[Ô], IIf(Option1(1).Value = True, [Ô]C[Ô], [Ô]Null[Ô])) & [Ô][ô],[Ô] & _
[Ô]TIPASS_ASS =[ô][Ô] & IIf(Option1(2).Value = True, [Ô]F[Ô], IIf(Option1(3).Value = True, [Ô]J[Ô], [Ô]Null[Ô])) & [Ô][ô],[Ô] & _
[Ô]SITASS_ASS =[ô][Ô] & IIf(Option1(4).Value = True, [Ô]A[Ô], IIf(Option1(5).Value = True, [Ô]I[Ô], [Ô]Null[Ô])) & [Ô][ô],[Ô] & _
[Ô]DATINA_ASS =[Ô] & IIf(Msk_DtInat.Text <> [Ô]__/__/____[Ô], [Ô][ô][Ô] & Format(Msk_DtInat.Text, [Ô]yyyy-mm-dd[Ô]) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]VALCAR_ASS =[Ô] & IIf(Msk_DtVlCar.Text <> [Ô][Ô], [Ô][ô][Ô] & Format(Msk_DtVlCar.Text, [Ô]yyyy-mm-dd[Ô]) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]IDEASS_ASS =[Ô] & IIf(Txt_AssIds.Text <> [Ô][Ô], [Ô][ô][Ô] & Txt_AssIds.Text & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]CPFASS_ASS =[Ô] & IIf(Txt_AssCpf.Text <> [Ô][Ô], [Ô][ô][Ô] & Txt_AssCpf.Text & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]DATNAS_ASS =[Ô] & IIf(Msk_AssNas.Text <> [Ô][Ô], [Ô][ô][Ô] & Format(Msk_AssNas.Text, [Ô]yyyy-mm-dd[Ô]) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]IDADES_ASS =[Ô] & IIf(Lbl_IdAss.Caption <> [Ô][Ô], Lbl_IdAss.Caption, Idade(Msk_AssNas.Text)) & [Ô],[Ô] & _
[Ô]LOCNAS_ASS =[Ô] & IIf(Txt_AssLna.Text <> [Ô][Ô], [Ô][ô][Ô] & Txt_AssLna.Text & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]ESTNAS_ASS =[Ô] & IIf(CboEstad03.Text <> [Ô][Ô], [Ô][ô][Ô] & CboEstad03.Text & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]NASASS_ASS =[Ô] & IIf(Txt_AssNat.Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Txt_AssNat.Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]ESTCIV_ASS =[Ô] & IIf(Combo1(0).Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Combo1(0).Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]SEXASS_ASS =[Ô] & IIf(Combo1(1).Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Combo1(1).Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]GRAINT_ASS =[Ô] & IIf(Combo1(2).Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Combo1(2).Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]PAIASS_ASS =[Ô] & IIf(Txt_AssPai.Text <> String(19, [Ô]_[Ô]), [Ô][ô][Ô] & Trim(Txt_AssPai.Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]MAEASS_ASS =[Ô] & IIf(Txt_AssMae.Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Txt_AssMae.Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]PROASS_ASS =[Ô] & IIf(Txt_AssPro.Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Txt_AssPro.Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô],[Ô] & _
[Ô]ENDRES_ASS =[Ô] & IIf(Txt_ResRes.Text <> [Ô][Ô], [Ô][ô][Ô] & Trim(Txt_ResRes.Text) & [Ô][ô][Ô], [Ô]Null[Ô]) & [Ô] WHERE CODMAT_ASS =[ô][Ô] & Txt_CodAss.Text & [Ô][ô][Ô]
MdAsso01.Open fSQL01
Esses campos são do tipo DATE ou DATETIME ????
Campos DATE o preenchimento pode ser feito no seguinte formato [Ô]yyyy-MM-dd[Ô]
Campos DATETIME o preenchimento deve ser feito no seguinte formato [ô]yyyy-MM-dd hh:mm:ss[ô]
ATENTE-SE para o MM maiúsculo.
Campos DATE o preenchimento pode ser feito no seguinte formato [Ô]yyyy-MM-dd[Ô]
Campos DATETIME o preenchimento deve ser feito no seguinte formato [ô]yyyy-MM-dd hh:mm:ss[ô]
ATENTE-SE para o MM maiúsculo.
Marcelo, deu certo - Muito obrigado pela sua ajuda
Fox - o Campo - Date
Fox - o Campo - Date
disponha colega
não esqueça de encerrar o tópico
não esqueça de encerrar o tópico
Tópico encerrado , respostas não são mais permitidas