List Info

Thread: Command Save error




Command Save error
country flaguser name
United States
2008-03-01 19:03:23

Dear Friends,
i Have command :
Private Sub cmdSave_Click()
aSQL = "insert into Applicant(FirstName, Primary, Secondary)values";
aSQL = aSQL + "(' " &txtname.text & " ',' " & chkprimary.value & " ',' " &chksecondary.value & " ')"
MsgBox "save", , "information"
End Sub
it always sjowing "syntax errror in INSERT INTO STATEMENT", i use access with fieldname FirstName(text) , primary and Secondary (yes/no) with txtname.text(Textbox), chkprimary and chksecondary(Checkbox).
is there any solution to help me fix this error
regards

__________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___
Re: Command Save error
country flaguser name
United States
2008-03-02 00:43:01

i think "Primary" field of your table is not valid for SQL, word "Primary" usualy to identifation of Primary Key and you must change it.
second..

----- Original Message -----
From: gunawan gofur
To: visualbasic6programming%40yahoogroups.com">visualbasic6programmingyahoogroups.com
Sent: Sunday, March 02, 2008 8:03 AM
Subject: [Visual Basic 6 programming] Command Save error

Dear Friends,
i Have command :
Private Sub cmdSave_Click()
aSQL = "insert into Applicant(FirstName, Primary, Secondary)values";
aSQL = aSQL + "(' " &txtname.text & " ',' " & chkprimary.value & " ',' " &chksecondary.value & " ')"
MsgBox "save", , "information"
End Sub
it always sjowing "syntax errror in INSERT INTO STATEMENT", i use access with fieldname FirstName(text) , primary and Secondary (yes/no) with txtname.text(Textbox), chkprimary and chksecondary(Checkbox).
is there any solution to help me fix this error
regards

__________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )