INSERT - COMO USAR?
Estou tentando atualizar os campos do formulario, puxando de um BD.
Esta assim:
Conect.Execute ("Insert into tabx x1 = " & Text1.Text & ",x2 = " & Text2.Text & ", x3 = " & Text3.Text & ",x4 = " & Text4.Text & ",x5 = " & Text5.Text & ",x6 = " & Text6.Text & ",x7 = " & Text7.Text & ",x8 = " & Text8.Text & ",x9 = " & Text9.Text & ",x10 = " & Text10.Text & ",x11 = " & Text11.Text & ",x12 = " & Text43.Text & ", x13 = " & Text44.Text & ",x14 = " & Text45.Text & ",x15 = " & Text46.Text & ",x16 = " & Text47.Text & ",x17 = " & Text48.Text & ",x18 = " & Text49.Text & ",x19 = " & Text50.Text & ",x20 = " & Text51.Text _
& ",y1 = " & yy1 & ",y2 = " & yy2 & ",y3 = " & yy3 & ",y4 = " & yy4 & ",y5 = " & yy5 & ",y6 = " & yy6 & ",y7 = " & yy7 & ",y8 = " & yy8 & ",y9 = " & yy9 & ",y10 = " & yy10 & ",y11 = " & yy11 & ",y12 = " & yy12 & ",y13 = " & yy13 & ",y14 = " & yy14 & ",y15 = " & yy15 & ",y16 = " & yy16 & ",y17 = " & yy17 & ",y18 = " & yy18 & ",y19 = " & yy19 & ",y20 = " & yy20 & ", c1='" & Text23.Text & "', c2='" & Text24.Text & "', c3='" & Text25.Text & "', c4='" & Text26.Text & "', c5='" & Text27.Text & "', c6='" & Text28.Text & "', c7='" & Text29.Text & "', c8='" & Text30.Text & "', c9='" & Text31.Text & "', c10='" & Text32.Text & "', c11='" & Text33.Text & "', c12='" & Text34.Text & "', c13='" & Text35.Text & "', c14='" & Text36.Text & "', c15='" & Text37.Text & "', c16='" & Text38.Text & "', c17='" & Text39.Text & "', c18='" & Text40.Text & "', c19='" & Text41.Text & "', c20='" & Text42.Text & "'")
Da esse erro: Syntax error in Insert Into statement
Alguem pode me ajudar?
Esta assim:
Conect.Execute ("Insert into tabx x1 = " & Text1.Text & ",x2 = " & Text2.Text & ", x3 = " & Text3.Text & ",x4 = " & Text4.Text & ",x5 = " & Text5.Text & ",x6 = " & Text6.Text & ",x7 = " & Text7.Text & ",x8 = " & Text8.Text & ",x9 = " & Text9.Text & ",x10 = " & Text10.Text & ",x11 = " & Text11.Text & ",x12 = " & Text43.Text & ", x13 = " & Text44.Text & ",x14 = " & Text45.Text & ",x15 = " & Text46.Text & ",x16 = " & Text47.Text & ",x17 = " & Text48.Text & ",x18 = " & Text49.Text & ",x19 = " & Text50.Text & ",x20 = " & Text51.Text _
& ",y1 = " & yy1 & ",y2 = " & yy2 & ",y3 = " & yy3 & ",y4 = " & yy4 & ",y5 = " & yy5 & ",y6 = " & yy6 & ",y7 = " & yy7 & ",y8 = " & yy8 & ",y9 = " & yy9 & ",y10 = " & yy10 & ",y11 = " & yy11 & ",y12 = " & yy12 & ",y13 = " & yy13 & ",y14 = " & yy14 & ",y15 = " & yy15 & ",y16 = " & yy16 & ",y17 = " & yy17 & ",y18 = " & yy18 & ",y19 = " & yy19 & ",y20 = " & yy20 & ", c1='" & Text23.Text & "', c2='" & Text24.Text & "', c3='" & Text25.Text & "', c4='" & Text26.Text & "', c5='" & Text27.Text & "', c6='" & Text28.Text & "', c7='" & Text29.Text & "', c8='" & Text30.Text & "', c9='" & Text31.Text & "', c10='" & Text32.Text & "', c11='" & Text33.Text & "', c12='" & Text34.Text & "', c13='" & Text35.Text & "', c14='" & Text36.Text & "', c15='" & Text37.Text & "', c16='" & Text38.Text & "', c17='" & Text39.Text & "', c18='" & Text40.Text & "', c19='" & Text41.Text & "', c20='" & Text42.Text & "'")
Da esse erro: Syntax error in Insert Into statement
Alguem pode me ajudar?
A sintaxe é
Insert into cliente (codigo, nome, endereco) values (1,'Claudio', 'Rua teste')"
Isso para registro que nao existam
Na regravacao é
update cliente Set codigo = , nome = 'Andre', endereco = 'rua jose' where codigo = 1
Se der erro tente diminiur a linha gravando menos coisas pois ela esta muito grande, e fica dificil achar algum erro (uma virgula fora do lugar vai te pegar)
Insert into cliente (codigo, nome, endereco) values (1,'Claudio', 'Rua teste')"
Isso para registro que nao existam
Na regravacao é
update cliente Set codigo = , nome = 'Andre', endereco = 'rua jose' where codigo = 1
Se der erro tente diminiur a linha gravando menos coisas pois ela esta muito grande, e fica dificil achar algum erro (uma virgula fora do lugar vai te pegar)

Tópico encerrado , respostas não são mais permitidas