Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access ASP
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access ASP Using ASP with Microsoft Access databases. For Access questions not specific to ASP, please use the Access forum. For more ASP forums, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access ASP 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 June 4th, 2003, 10:05 AM
Authorized User
 
Join Date: Jun 2003
Location: Conway, AR, USA.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kev_79
Default Recordset date insert in access

I am using a recordset to enter a record from a form into an Access database. I am thinking somehow I am going to have to incorporate the # signs on either side of the date from the form to get it to go into access. Does anyone have an example of how to do this?

Thanks in Advance,
Kevin
Reply With Quote
  #2 (permalink)  
Old June 4th, 2003, 12:34 PM
Registered User
 
Join Date: Jun 2003
Location: Lubbock, TX, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here is an example of how I did something similar. It places the current date into the recordset.
-----
        ' Create new record then fill it in
     objRSOrder.AddNew
     ' tag this order
     objRSOrder("CustID") = objRSCustomer("CustID")
     objRSOrder("Date") = Date
     objRSOrder("SaleAmount") = CCur(Session("curSubTotal"))
             'Commit the new order to the database
     objRSOrder.Update
-----
Hope this helps.
Arden
Reply With Quote
  #3 (permalink)  
Old June 4th, 2003, 06:23 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Wien, Wien, Austria.
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to NotNowJohn
Default

If I understood...

you have to transform the date variable as follows:
d="#" & d & "#"
, and that value you can use in INSERT statement as:
INSERT INTO tbl (id,date) VALUES(" & id & "," & d & ")"

HTH.

Reg,
NotNowJohn

...but the Soon is eclipsed by the Moon
Reply With Quote
  #4 (permalink)  
Old June 5th, 2003, 12:49 PM
Authorized User
 
Join Date: Jun 2003
Location: Conway, AR, USA.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kev_79
Default

Thanks all, I got it!:D

Kevin
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
INSERT INTO from a SQL Server recordset? kcassidy Access 13 March 21st, 2006 08:35 AM
trigger to insert current date on insert kev_79 SQL Server 2000 3 January 23rd, 2006 05:58 PM
insert into new table from recordset bleutiger Classic ASP Databases 4 February 23rd, 2005 05:07 AM
insert system date. no date and time jimmy Access VBA 6 November 20th, 2003 01:11 PM
insert date (javascript) into access katie456 Access 1 October 11th, 2003 09:24 AM



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


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