Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 13th, 2004, 06:44 AM
Authorized User
 
Join Date: Oct 2004
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default [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!
Reply With Quote
  #2 (permalink)  
Old November 13th, 2004, 07:39 AM
Authorized User
 
Join Date: Oct 2004
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Reply With Quote
  #3 (permalink)  
Old November 15th, 2004, 03:22 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

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
Reply With Quote
  #4 (permalink)  
Old November 18th, 2004, 03:48 PM
Authorized User
 
Join Date: Oct 2004
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
Thanks for the help, i was begining to feel left out of the forum
:)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ODBC Microsoft Access Driver Issue mat41 Classic ASP Professional 5 June 30th, 2008 10:37 AM
ERROR [42000] [Microsoft][ODBC driver for Oracle][ sanjeev jha General .NET 0 June 28th, 2008 12:50 AM
[Microsoft][ODBC SQL Driver]Connection is busy muthumari_p2003@yahoo.com Pro JSP 0 May 8th, 2006 07:51 AM
java.sql.SQLException: [Microsoft][ODBC Driver Man pvsharinath@gmail.com Java Databases 1 May 5th, 2005 02:40 AM
[ODBC Microsoft Access Driver] !!!Error!!! Varg_88 Classic ASP Databases 3 August 30th, 2004 06:19 AM



All times are GMT -4. The time now is 05:35 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.