|
| |
|
|
ellen
Posts: 5 From: Fredrikstad, Norway Status: offline
|
Update date field - 5/30/2001 20:05:00
I have made a system to register and update client-meetings on the web using a DB. The problem is when the user want to update the date-field. When I use the code: UPDATE meeting SET<br>last_visit='::last_visit::' everything works fine but not when I leave the field blank. I get the error-message "Datatype mismatch in criteria expression" How can I avoid this?
|
|
|
|
Spooky
Posts: 26606 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Update date field - 5/30/2001 14:29:00
How is last date selected? Can you set a default value if not used? ie prefill a text box?------------------ §þððk¥ "I am Spooky of Borg. Prepare to be assimilated, babycakes!" Subscribe to OutFront News Database / DRW Q & A The Spooky Login!
|
|
|
|
ellen
Posts: 5 From: Fredrikstad, Norway Status: offline
|
RE: Update date field - 5/31/2001 20:13:00
When the user select a customer on the front page of the web, next page shows a list of all customermeetings that is registered. The user follows a hyperlink to edit a meeting. The updateform contain details about the meeting, last visit, next visit etc. This info is taken from the DB.My problem doesn't occur when the user register a new meeting (in a different form of course). The date can be left blank here. Default values doesn't help. I've tried to put text in the fields, but the same message shows (Datatype mismatch...) The only datatype my problem fields will except is dates. The clue must be to make the system belive that the field contains a date, even though its blank. Totally confused??
|
|
|
|
Spooky
Posts: 26606 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Update date field - 5/31/2001 17:05:00
Can you try adding a default date value at step 3 of the DRW? Apply it to the field that expects a date------------------ §þððk¥ "I am Spooky of Borg. Prepare to be assimilated, babycakes!" Subscribe to OutFront News Database / DRW Q & A The Spooky Login!
|
|
|
|
ellen
Posts: 5 From: Fredrikstad, Norway Status: offline
|
RE: Update date field - 6/1/2001 20:22:00
Still got the message "Datatype mismatch.." when I leave the field blank......
|
|
|
|
hzarabet
Posts: 1540 From: New Milford CT USA Status: offline
|
RE: Update date field - 6/1/2001 20:26:00
Something you may want to try is convert.convert((char,24),last_visit,1)='::last_visit::' If the WAY you are using the date (June 1, 2001 vs. 6/1/01) don't match, that could be a hassle. This will convert your DB field to match your entry. The example I gave you is for date type 6/1/01. That relates to the number 1 in the convert portion. The Microsoft Knowledge Base will give you all the different codes for different date types. Date are a bummer! ------------------ www.Signingshotline.com lists EVERY upcoming athlete autograph appearance in the US and Canada
|
|
|
|
ellen
Posts: 5 From: Fredrikstad, Norway Status: offline
|
RE: Update date field - 6/7/2001 20:52:00
My code now look like this: s-sql="UPDATE Kundemote SET<br> convert((char,24),last_visit,1)='::last_visit::' Something is wrong with the syntax, but I don't now what..... Will the correct syntax allow me th leave the date-field blank?
|
|
|
|
hzarabet
Posts: 1540 From: New Milford CT USA Status: offline
|
RE: Update date field - 6/18/2001 20:59:00
Hope you removed the <br>!------------------ www.Signingshotline.com lists EVERY upcoming athlete autograph appearance in the US and Canada
|
|
|
|
ellen
Posts: 5 From: Fredrikstad, Norway Status: offline
|
RE: Update date field - 6/19/2001 20:50:00
Yes I did, but still got the syntax error...
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|