Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access ASP
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 4th, 2003, 10:05 AM
Authorized User
 
Join Date: Jun 2003
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
 
Old June 4th, 2003, 12:34 PM
Registered User
 
Join Date: Jun 2003
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
 
Old June 4th, 2003, 06:23 PM
Friend of Wrox
 
Join Date: Jun 2003
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
 
Old June 5th, 2003, 12:49 PM
Authorized User
 
Join Date: Jun 2003
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





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.