Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / April 2006



Tip: Looking for answers? Try searching our database.

Weird Query error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Franck - 21 Apr 2006 15:12 GMT
Ok here's the problem, first time i saw that
i run a query in vb6 with the connection
cnconn.execute("the query")

the query is a insert. i made it directly on vb first after i tried it
in the access
database. It work perfectly in access but on vb side it says i got a
syntax
error in the insert into.
i tried with breakpoints and i did a ?querystring and it return me the
whole
query and just copy past in access and it work in access side.
idea what could be the prob.

here is the query (in french)
INSERT INTO tbl_billets_update ([# billet],[date],[heure debut2],
[heure fin2], code_operateur,nom,prenom,action,type,description) VALUES
(" & txtnumero.Text & ",#" & Year(Now()) & "-" & Month(Now()) & "-" &
Day(Now()) & "#,#" & Hour(Now()) & ":" & Minute(Now()) & "#,#" &
Hour(Now()) & ":" & Minute(Now()) & "#,'" & sender & "','" &
receiverlastname & "','" & receiverfirstname & "','26','03','Attitré a
: " & receiver & "')

in execute mode here the same with values in
INSERT INTO tbl_billets_update ([# billet],[date],[heure debut2],
[heure fin2], code_operateur,nom,prenom,action,type,description) VALUES
(2390,#2006-4-21#,#10:0#,#10:0#,'Gjoe','Joe','Gi','26','03','Attitré a
: Gjoe')

all fields are null allowed
i first tought that vb didnt like the fields with space, when i make db
i never use space or extended ascii char but i didnt made the database
and its too late to change there too much table linked and external
program running on it. Well all that to say ive removed all fields with
special char and space to keep only 1 field that is correct like the
"nom" field and still say syntax error in Insert Into
Franck - 21 Apr 2006 21:14 GMT
Forgot to say, the database im working on use linked tables from
another access database
maybe it could be this but why then SELECT and UPDATE would work and
not INSERT
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.