p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
I forgot my password Register Now
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 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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 13th, 2004, 06:44 AM
Authorized User
Points: 50, Level: 1
Points: 50, Level: 1 Points: 50, Level: 1 Points: 50, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old November 13th, 2004, 07:39 AM
Authorized User
Points: 50, Level: 1
Points: 50, Level: 1 Points: 50, Level: 1 Points: 50, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old November 15th, 2004, 03:22 AM
Friend of Wrox
Points: 7,647, Level: 37
Points: 7,647, Level: 37 Points: 7,647, Level: 37 Points: 7,647, Level: 37
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,477
Thanks: 0
Thanked 0 Times in 0 Posts
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old November 18th, 2004, 03:48 PM
Authorized User
Points: 50, Level: 1
Points: 50, Level: 1 Points: 50, Level: 1 Points: 50, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
:)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

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



All times are GMT -4. The time now is 11:27 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc