OPERADOR FALTANDO
Erro de Sintaxe (Operador Faltando) na expressão de consulta
[Ô]1,ChIncraseBux=0,Ch99centptc = 1,ChIvBux =1,ChIndoClix = [ô]0[ô]
Eu sei que o ero não é dificil, mas nao vejo, rsss, agluem pode dar uma olhada ae pra ver se acha?
cnBd.Execute [Ô]UPDATE Tbl_Contato SET Codigo = [Ô] & txtcod.Text & [Ô], Nome = [ô][Ô] & txtproprietario & [Ô][ô], Username_Referral = [ô][Ô] & txtusername & [Ô][ô],Email = [ô][Ô] & txtemail & [Ô][ô],Bd_Comentario = [Ô] & _
[Ô][ô][Ô] & txtcomentario & [Ô][ô],DataCad = [ô][Ô] & txtdataCad & [Ô][ô],ChPalmbux = [Ô] & (PalmBuxCH.Value) & [Ô],ChNeoBux = [Ô] & (NeoBuxCH.Value) & [Ô],ChSnBux = [Ô] & _
[Ô][ô][Ô] & (SnBuxCH.Value) & [Ô],ChIncraseBux = [Ô] & (IncraseBuxCH.Value) & [Ô],Ch99centptc = [Ô] & (NoveCentCH.Value) & [Ô],ChIvBux = [Ô] & (IvBuxCH.Value) & [Ô],ChIndoClix = [Ô] & _
[Ô][ô][Ô] & (IndoClixCH.Value) & [Ô],ChJPHFBux = [Ô] & (JPHFBuxCH.Value) & [Ô],ChGagaBux = [Ô] & (GAGABuxCH.Value) & [Ô],ChHueBux = [Ô] & (HueBuxCH.Value) & [Ô],ChMagicalPtc = [Ô] & _
[Ô][ô][Ô] & (MagicalCH.Value) & [Ô],ChBetoPTC = [Ô] & (BetoPTCCH.Value) & [Ô],ChLenoMaria = [Ô] & (LenoMariaCH.Value) & [Ô], ChBelezaBux = [Ô] & (BelezaBuxCH.Value) & [Ô],ChEspaçoGospelPTC = [Ô] & _
[Ô][ô][Ô] & (EspaçoCH.Value) & [Ô],ChHazReferidos = [Ô] & (HazCH.Value) & [Ô],ChProgramRefs = [Ô] & (ProgramCH.Value) & [Ô],ChTargetRefs = [Ô] & (TargetCH.Value) & [Ô],ChSimplesRefs = [Ô] & (SimplesCH.Value) & [Ô],ChRoobux = [Ô] & _
[Ô][ô][Ô] & (RooBuxCH.Value) & [Ô],CHGetRefes = [Ô] & (GetReferralsCH.Value) & [Ô],ChOtimo = [Ô] & (OtimoCH.Value) & [Ô],ChRegular = [Ô] & (RegularCH.Value) & [Ô],ChBom = [Ô] & (BomCH.Value) & [Ô],ChInativo = [Ô] & (InativoCH.Value) & [Ô],ChAtivo = [Ô] & (AtivoCH.Value) & [Ô],ChSoevangelico = [Ô] & (SoEvangelicoCH.Value) & [Ô],ChJulioCGA = [Ô] & (JulioCH.Value) & [Ô],TodosEmail = [ô][Ô] & txttodosEmail & [Ô][ô] WHERE CodigoAuto = [Ô] & txtcodauto
Dim sSQL As String
sSQL = [Ô]UPDATE Tbl_Contato SET Codigo = [Ô] & txtcod.Text & [Ô], Nome = [ô][Ô] & txtproprietario & [Ô][ô], Username_Referral = [ô][Ô] & txtusername & [Ô][ô],Email = [ô][Ô] & txtemail & [Ô][ô],Bd_Comentario = [Ô] & _
[Ô][ô][Ô] & txtcomentario & [Ô][ô],DataCad = [ô][Ô] & txtdataCad & [Ô][ô],ChPalmbux = [Ô] & (PalmBuxCH.Value) & [Ô],ChNeoBux = [Ô] & (NeoBuxCH.Value) & [Ô],ChSnBux = [Ô] & _
[Ô][ô][Ô] & (SnBuxCH.Value) & [Ô],ChIncraseBux = [Ô] & (IncraseBuxCH.Value) & [Ô],Ch99centptc = [Ô] & (NoveCentCH.Value) & [Ô],ChIvBux = [Ô] & (IvBuxCH.Value) & [Ô],ChIndoClix = [Ô] & _
[Ô][ô][Ô] & (IndoClixCH.Value) & [Ô],ChJPHFBux = [Ô] & (JPHFBuxCH.Value) & [Ô],ChGagaBux = [Ô] & (GAGABuxCH.Value) & [Ô],ChHueBux = [Ô] & (HueBuxCH.Value) & [Ô],ChMagicalPtc = [Ô] & _
[Ô][ô][Ô] & (MagicalCH.Value) & [Ô],ChBetoPTC = [Ô] & (BetoPTCCH.Value) & [Ô],ChLenoMaria = [Ô] & (LenoMariaCH.Value) & [Ô], ChBelezaBux = [Ô] & (BelezaBuxCH.Value) & [Ô],ChEspaçoGospelPTC = [Ô] & _
[Ô][ô][Ô] & (EspaçoCH.Value) & [Ô],ChHazReferidos = [Ô] & (HazCH.Value) & [Ô],ChProgramRefs = [Ô] & (ProgramCH.Value) & [Ô],ChTargetRefs = [Ô] & (TargetCH.Value) & [Ô],ChSimplesRefs = [Ô] & (SimplesCH.Value) & [Ô],ChRoobux = [Ô] & _
[Ô][ô][Ô] & (RooBuxCH.Value) & [Ô],CHGetRefes = [Ô] & (GetReferralsCH.Value) & [Ô],ChOtimo = [Ô] & (OtimoCH.Value) & [Ô],ChRegular = [Ô] & (RegularCH.Value) & [Ô],ChBom = [Ô] & (BomCH.Value) & [Ô],ChInativo = [Ô] & (InativoCH.Value) & _[Ô],ChAtivo = [Ô] & (AtivoCH.Value) & [Ô],ChSoevangelico = [Ô] & (SoEvangelicoCH.Value) & [Ô],ChJulioCGA = [Ô] & (JulioCH.Value) & [Ô],TodosEmail = [ô][Ô] & txttodosEmail & [Ô][ô] WHERE CodigoAuto = [Ô] & txtcodauto
Debug.Print sSQL
cnBd.Execute sSQL
Depois que você testar a aplicação, perceberá que no IMMEDIATE WINDOW aparecerá a QUERY em modo RUN-TIME.
Poste aqui pra gente verificar.
Citação:cnBd.Execute [Ô]UPDATE Tbl_Contato SET Codigo = [Ô] & txtcod.Text & [Ô], Nome = [ô][Ô] & txtproprietario & [Ô][ô], Username_Referral = [ô][Ô] & txtusername & [Ô][ô],Email = [ô][Ô] & txtemail & [Ô][ô],Bd_Comentario = [Ô] & _
[Ô][ô][Ô] & txtcomentario & [Ô][ô],DataCad = [ô][Ô] & txtdataCad & [Ô][ô],ChPalmbux = [Ô] & (PalmBuxCH.Value) & [Ô],ChNeoBux = [Ô] & (NeoBuxCH.Value) & [Ô],ChSnBux = [Ô] & _
(SnBuxCH.Value) & [Ô],ChIncraseBux = [Ô] & (IncraseBuxCH.Value) & [Ô],Ch99centptc = [Ô] & (NoveCentCH.Value) & [Ô],ChIvBux = [Ô] & (IvBuxCH.Value) & [Ô],ChIndoClix = [Ô] & _
(IndoClixCH.Value) & [Ô],ChJPHFBux = [Ô] & (JPHFBuxCH.Value) & [Ô],ChGagaBux = [Ô] & (GAGABuxCH.Value) & [Ô],ChHueBux = [Ô] & (HueBuxCH.Value) & [Ô],ChMagicalPtc = [Ô] & _
(MagicalCH.Value) & [Ô],ChBetoPTC = [Ô] & (BetoPTCCH.Value) & [Ô],ChLenoMaria = [Ô] & (LenoMariaCH.Value) & [Ô], ChBelezaBux = [Ô] & (BelezaBuxCH.Value) & [Ô],ChEspaçoGospelPTC = [Ô] & _
(EspaçoCH.Value) & [Ô],ChHazReferidos = [Ô] & (HazCH.Value) & [Ô],ChProgramRefs = [Ô] & (ProgramCH.Value) & [Ô],ChTargetRefs = [Ô] & (TargetCH.Value) & [Ô],ChSimplesRefs = [Ô] & (SimplesCH.Value) & [Ô],ChRoobux = [Ô] & _
(RooBuxCH.Value) & [Ô],CHGetRefes = [Ô] & (GetReferralsCH.Value) & [Ô],ChOtimo = [Ô] & (OtimoCH.Value) & [Ô],ChRegular = [Ô] & (RegularCH.Value) & [Ô],ChBom = [Ô] & (BomCH.Value) & [Ô],ChInativo = [Ô] & (InativoCH.Value) & [Ô],ChAtivo = [Ô] & (AtivoCH.Value) & [Ô],ChSoevangelico = [Ô] & (SoEvangelicoCH.Value) & [Ô],ChJulioCGA = [Ô] & (JulioCH.Value) & [Ô],TodosEmail = [ô][Ô] & txttodosEmail & [Ô][ô] WHERE CodigoAuto = [Ô] & txtcodauto
eita ctrl+c & ctrl+v uaheuaeheauheauea
testa ai v c roda...
[txt-size=2]& [Ô],ChIndoClix = [Ô] & _
[Ô][ô][Ô] & (IndoClixCH.Value) & [Ô],ChJPHFBux = [Ô] & [/txt-size]
Note que você abre aspas simples, coloca o valor de IndoClixCH e depois não fecha a aspas simples. Simplesmente continua a expressão.
Verifique se realmente é necessário abrir as aspas simples ou se falta fecha-las.
cnBd.Execute [Ô]UPDATE Tbl_Contato SET Codigo = [Ô] & txtcod.Text & [Ô], Nome = [ô][Ô] & txtproprietario & [Ô][ô], Username_Referral = [ô][Ô] & txtusername & [Ô][ô],Email = [ô][Ô] & txtemail & [Ô][ô],Bd_Comentario = [Ô] & _
[Ô][ô][Ô] & txtcomentario & [Ô][ô],DataCad = [ô][Ô] & txtdataCad & [Ô][ô],ChPalmbux = [Ô] & (PalmBuxCH.Value) & [Ô],ChNeoBux = [Ô] & (NeoBuxCH.Value) & [Ô],ChSnBux = [Ô] & _
[Ô][Ô] & (SnBuxCH.Value) & [Ô],ChIncraseBux = [Ô] & (IncraseBuxCH.Value) & [Ô],Ch99centptc = [Ô] & (NoveCentCH.Value) & [Ô],ChIvBux = [Ô] & (IvBuxCH.Value) & [Ô],ChIndoClix = [Ô] & _
[Ô][Ô] & (IndoClixCH.Value) & [Ô],ChJPHFBux = [Ô] & (JPHFBuxCH.Value) & [Ô],ChGagaBux = [Ô] & (GAGABuxCH.Value) & [Ô],ChHueBux = [Ô] & (HueBuxCH.Value) & [Ô],ChMagicalPtc = [Ô] & _
[Ô][Ô] & (MagicalCH.Value) & [Ô],ChBetoPTC = [Ô] & (BetoPTCCH.Value) & [Ô],ChLenoMaria = [Ô] & (LenoMariaCH.Value) & [Ô], ChBelezaBux = [Ô] & (BelezaBuxCH.Value) & [Ô],ChEspaçoGospelPTC = [Ô] & _
[Ô][Ô] & (EspaçoCH.Value) & [Ô],ChHazReferidos = [Ô] & (HazCH.Value) & [Ô],ChProgramRefs = [Ô] & (ProgramCH.Value) & [Ô],ChTargetRefs = [Ô] & (TargetCH.Value) & [Ô],ChSimplesRefs = [Ô] & (SimplesCH.Value) & [Ô],ChRoobux = [Ô] & _
[Ô][Ô] & (RooBuxCH.Value) & [Ô],CHGetRefes = [Ô] & (GetReferralsCH.Value) & [Ô],ChOtimo = [Ô] & (OtimoCH.Value) & [Ô],ChRegular = [Ô] & (RegularCH.Value) & [Ô],ChBom = [Ô] & (BomCH.Value) & [Ô],ChInativo = [Ô] & (InativoCH.Value) & [Ô],ChAtivo = [Ô] & (AtivoCH.Value) & [Ô],ChSoevangelico = [Ô] & (SoEvangelicoCH.Value) & [Ô],ChJulioCGA = [Ô] & (JulioCH.Value) & [Ô],TodosEmail = [ô][Ô] & txttodosEmail & [Ô][ô] WHERE CodigoAuto = [Ô] & txtcodauto
rspropri.Close
Set rspropri = New ADODB.Recordset
rspropri.Open [Ô]Select * FROM Tbl_Contato order by Codigo[Ô], cnBd
LimparControles
--------
MAs aidna esta dando erro quando eu altero um campo, mas o erro mudou, agora o erro é:
[Ô]Nenhum valor foi fornecido pra um ou mais campos necessarios[Ô]
Alguem pode me ajudar?
Citação::
Faça esta pequena alteração para facilitar a localização do erro:Dim sSQL As String
sSQL = [Ô]UPDATE Tbl_Contato SET Codigo = [Ô] & txtcod.Text & [Ô], Nome = [ô][Ô] & txtproprietario & [Ô][ô], Username_Referral = [ô][Ô] & txtusername & [Ô][ô],Email = [ô][Ô] & txtemail & [Ô][ô],Bd_Comentario = [Ô] & _
[Ô][ô][Ô] & txtcomentario & [Ô][ô],DataCad = [ô][Ô] & txtdataCad & [Ô][ô],ChPalmbux = [Ô] & (PalmBuxCH.Value) & [Ô],ChNeoBux = [Ô] & (NeoBuxCH.Value) & [Ô],ChSnBux = [Ô] & _
[Ô][ô][Ô] & (SnBuxCH.Value) & [Ô],ChIncraseBux = [Ô] & (IncraseBuxCH.Value) & [Ô],Ch99centptc = [Ô] & (NoveCentCH.Value) & [Ô],ChIvBux = [Ô] & (IvBuxCH.Value) & [Ô],ChIndoClix = [Ô] & _
[Ô][ô][Ô] & (IndoClixCH.Value) & [Ô],ChJPHFBux = [Ô] & (JPHFBuxCH.Value) & [Ô],ChGagaBux = [Ô] & (GAGABuxCH.Value) & [Ô],ChHueBux = [Ô] & (HueBuxCH.Value) & [Ô],ChMagicalPtc = [Ô] & _
[Ô][ô][Ô] & (MagicalCH.Value) & [Ô],ChBetoPTC = [Ô] & (BetoPTCCH.Value) & [Ô],ChLenoMaria = [Ô] & (LenoMariaCH.Value) & [Ô], ChBelezaBux = [Ô] & (BelezaBuxCH.Value) & [Ô],ChEspaçoGospelPTC = [Ô] & _
[Ô][ô][Ô] & (EspaçoCH.Value) & [Ô],ChHazReferidos = [Ô] & (HazCH.Value) & [Ô],ChProgramRefs = [Ô] & (ProgramCH.Value) & [Ô],ChTargetRefs = [Ô] & (TargetCH.Value) & [Ô],ChSimplesRefs = [Ô] & (SimplesCH.Value) & [Ô],ChRoobux = [Ô] & _
[Ô][ô][Ô] & (RooBuxCH.Value) & [Ô],CHGetRefes = [Ô] & (GetReferralsCH.Value) & [Ô],ChOtimo = [Ô] & (OtimoCH.Value) & [Ô],ChRegular = [Ô] & (RegularCH.Value) & [Ô],ChBom = [Ô] & (BomCH.Value) & [Ô],ChInativo = [Ô] & (InativoCH.Value) & _[Ô],ChAtivo = [Ô] & (AtivoCH.Value) & [Ô],ChSoevangelico = [Ô] & (SoEvangelicoCH.Value) & [Ô],ChJulioCGA = [Ô] & (JulioCH.Value) & [Ô],TodosEmail = [ô][Ô] & txttodosEmail & [Ô][ô] WHERE CodigoAuto = [Ô] & txtcodauto
Debug.Print sSQL
cnBd.Execute sSQL
Depois que você testar a aplicação, perceberá que no IMMEDIATE WINDOW aparecerá a QUERY em modo RUN-TIME.
Poste aqui pra gente verificar.
sSQL = [Ô]UPDATE Tbl_Contato SET [Ô]
Wwhere = [Ô] WHERE CodigoAuto = [Ô] & txtcodauto
Dim Wset(40) as string
Wset(01) = [Ô]Codigo = [Ô] & txtcod.Text
Wset(02) = [Ô]Nome = [ô][Ô] & txtproprietario
Wset(03) = [Ô]Username_Referral = [ô][Ô] & txtusername
Wset(04) = [Ô]Email = [ô][Ô] & txtemail
Wset(05) = [Ô]Bd_Comentario = [ô][Ô] & txtcomentario
Wset(06) = [Ô]DataCad = [ô][Ô] & txtdataCad & [Ô][ô][Ô]
Wset(07) = [Ô]ChPalmbux = [Ô] & (PalmBuxCH.Value)
Wset(08) = [Ô]ChNeoBux = [Ô] & (NeoBuxCH.Value)
Wset(09) = [Ô]ChSnBux = [Ô] & (SnBuxCH.Value)
Wset(10) = [Ô]ChIncraseBux = [Ô] & (IncraseBuxCH.Value)
Wset(11) = [Ô]Ch99centptc = [Ô] & (NoveCentCH.Value)
Wset(12) = [Ô]ChIvBux = [Ô] & (IvBuxCH.Value)
Wset(13) = [Ô]ChIndoClix = [Ô] & (IndoClixCH.Value)
Wset(14) = [Ô]ChJPHFBux = [Ô] & (JPHFBuxCH.Value)
Wset(15) = [Ô]ChGagaBux = [Ô] & (GAGABuxCH.Value)
Wset(16) = [Ô]ChHueBux = [Ô] & (HueBuxCH.Value)
Wset(17) = [Ô]ChMagicalPtc = [Ô] & (MagicalCH.Value)
Wset(18) = [Ô]ChBetoPTC = [Ô] & (BetoPTCCH.Value)
Wset(19) = [Ô]ChLenoMaria = [Ô] & (LenoMariaCH.Value)
Wset(20) = [Ô]ChBelezaBux = [Ô] & (BelezaBuxCH.Value)
Wset(21) = [Ô]ChEspaçoGospelPTC = [Ô] & (EspaçoCH.Value)
Wset(22) = [Ô]ChHazReferidos = [Ô] & (HazCH.Value)
Wset(23) = [Ô]ChProgramRefs = [Ô] & (ProgramCH.Value)
Wset(24) = [Ô]ChTargetRefs = [Ô] & (TargetCH.Value)
Wset(25) = [Ô]ChSimplesRefs = [Ô] & (SimplesCH.Value)
Wset(26) = [Ô]ChRoobux = [Ô] & (RooBuxCH.Value)
Wset(27) = [Ô]CHGetRefes = [Ô] & (GetReferralsCH.Value)
Wset(28) = [Ô]ChOtimo = [Ô] & (OtimoCH.Value)
Wset(29) = [Ô]ChRegular = [Ô] & (RegularCH.Value)
Wset(30) = [Ô]ChBom = [Ô] & (BomCH.Value)
Wset(31) = [Ô]ChInativo = [Ô] & (InativoCH.Value)
Wset(32) = [Ô]ChAtivo = [Ô] & (AtivoCH.Value)
Wset(33) = [Ô]ChSoevangelico = [Ô] & (SoEvangelicoCH.Value)
Wset(34) = [Ô]ChJulioCGA = [Ô] & (JulioCH.Value)
Wset(35) = [Ô]TodosEmail = [ô][Ô] & txttodosEmail & [Ô][ô][Ô]
For Wx = 1 to 35
Wcomando = sSQL & Wset & Wwhere
Debug.Print Wcomando
cnBd.Execute Wcomando
Next Wx
Espero ter colocado as aspas corretas para cada tipo de campo.
O Que é isto?
Como Escurecer sSQL Corda
Edemir
CONSTA Nada!
Seu tambem nao cosnegui codigo nao fez nada. MAs bo ideia, vou tentar um por um.
é possÃvel que você [Ô]sem querer[Ô] resolva o erro ao desmembrar o update. Eu costumo construir meu update para comandos tão grandes. Faço um update só, mas para testar faço um por um.