|
-
Jun 9th, 2000, 07:04 PM
#1
Thread Starter
Junior Member
I have a prob in updateing my db
I tried :
DbCon.Execute " update tbl1 set (fname = '" & FnameTxt & "' , lname = '" & LnameTxt & "' , dateofbirth = '" & DateofbirthTxt & "' , where id = '" & IdTxt & "')"
but it dosent work for a reason
Thnks in advance 4 your help ...
J5
-
Jun 9th, 2000, 11:23 PM
#2
PowerPoster
Missing semicolon ;
Missing semocolon at the end of the statement
Code:
DbCon.Execute "update tbl1 set fname = '" & FnameTxt & "', lname = '" & LnameTxt & "', dateofbirth = '" & DateofbirthTxt & "', where id = '" & IdTxt & "'"
should be like this...
Code:
DbCon.Execute "update tbl1 set fname = '" & FnameTxt & "', lname = '" & LnameTxt & "', dateofbirth = '" & DateofbirthTxt & "', where id = '" & IdTxt & "';"
[Edited by Chris on 06-11-2000 at 02:50 PM]
-
Jun 10th, 2000, 04:45 AM
#3
Thread Starter
Junior Member
10x
Well Chris 10x 4 your help
But it dosent work i dont know
why ...
But again 10x
-
Jun 10th, 2000, 04:50 AM
#4
Frenzied Member
Standard SQL (you can include theJet Update statement, too) doesn't use paren's after the set command. Have you tried:
DbCon.Execute "update tbl1 set fname = '" & FnameTxt & "', lname = '" & LnameTxt & "', dateofbirth = '" & DateofbirthTxt & "', where id = '" & IdTxt & "'"
-
Jun 10th, 2000, 12:00 PM
#5
PowerPoster
Re: 10x
Originally posted by Jony5
Well Chris 10x 4 your help
But it dosent work i dont know
why ...
BTW, may i know the datatype in each fields?
-
Jun 10th, 2000, 02:30 PM
#6
Thread Starter
Junior Member
Chris ...
Well all the fileds is text
expet the last one that he is a date
but i dont care to take him as a string
and later on i`ll fix it
-
Jun 10th, 2000, 05:51 PM
#7
PowerPoster
Extra comma before WHERE clause
It have extra comma before the WHERE Clause,
Code:
DbCon.Execute "update tbl1 set fname = '" & FnameTxt & "', lname = '" & LnameTxt & "', dateofbirth = '" & DateofbirthTxt & "', where id = '" & IdTxt & "';"
should be like this...
Code:
DbCon.Execute "UPDATE tbl1 SET fname = '" & FnameTxt & "', lname = '" & LnameTxt & "', dateofbirth = '" & DateofbirthTxt & "' WHERE id = '" & IdTxt & "';"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|