|
|
 |
| Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Databases section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

November 13th, 2004, 06:44 AM
|
|
Authorized User
|
|
Join Date: Oct 2004
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
[Microsoft][ODBC Microsoft Access Driver] Syntax e
RE: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
Hi, i am new to access dbase. my problem is that i get the above error in the following code
objrs.addnew
objrs("username")=strusername
objrs("date")=date
objrs("time")=time
objrs.update
I have seen microsoft documentation that says this could be a bug, but on another page in my asp application, i have used this exact code sequence to update another table and this error did not occur.
please advice
__________________
Everything takes longer than you expect!
|

November 13th, 2004, 07:39 AM
|
|
Authorized User
|
|
Join Date: Oct 2004
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi, I made the following changes
objrs.addnew
objrs("username")=strusername
objrs("datein")=cstr(date)
objrs("timein")=cstr(time)
objrs.update
i also deleted my first db and created one with fields "username", "datein", and "timein" all text ("date" and "time" where of type date/time). It now works. my question therefore is why did the first one not work. furthermore, now that i have used string format instead of date/time in my db, can i still use sql to determine for example total time which requires summation of all times
|

November 15th, 2004, 03:22 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,477
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
You could have made just this change in the first case.
Code:
objrs("DateColumn")="#" & Date_and_time & "#"
formatted in either mm/dd/yyyy hh:mm:ss or yyyy-mm-dd hh:mm:ss
When you use those columns as TEXT types, you will have to do some patch work to do date/time calculations on those fields.
I would suggest to use date and time as single column and datatype as date/time. That should be the right way of approach for this.
Hope that helps.
Cheers!
_________________________
- Vijay G
Strive for Perfection
|

November 18th, 2004, 03:48 PM
|
|
Authorized User
|
|
Join Date: Oct 2004
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi,
Thanks for the help, i was begining to feel left out of the forum
:)
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |