Wrox Programmer Forums
|
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 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 November 13th, 2003, 12:16 PM
Registered User
 
Join Date: Nov 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jasmine5544
Default ASP Database Project

Ok I have this code I am working with which works fine until I try to put in curAmountDue in the formula. (In access it is in currency format field) Do I have to do something like with Date you have to use # instead of ', I have tried the $ sign instead and that did not work for me. I could use help. Thanks:
Dim varMainQuery
    varMainQuery = "INSERT INTO tblMain (strRegType, strFirstName, strLastName, strBadgeName, "&_
    "strCompany, strTitle, strEmail, strPhone, strFax, strAddress1, strAddress2, strAddress3, "&_
    "strCity, strState, strZip, strCountry, strAltName, strAltEmail, strAltPhone, ysnGuest, "&_
    "strGuestFirst, strGuestLast, strHotel, dtmHA, dtmHD, strSmoking, ysnRoommate, strRoommate, "&_
    "strHotelCCNumber, strHotelExpMonth, strHotelExpYear, strDietary, memSpecial, ysnSponsor, "&_
    "strPrompted, strReferralName, strPaymentType, strPayCCNumber, strPayExpMonth, strPayExpYear, "&_
    "strPromoCode, dtmReg)" &_
    " VALUES ('"& Session("strRegType") &"','"&_
    Replace(Session("strFirstName"),"'","''") &"','"&_
    Replace(Session("strLastName"),"'","''") &"','"&_
    Replace(Session("strBadgeName"),"'","''") &"','"&_
    Replace(Session("strCompany"),"'","''") &"','"&_
    Replace(Session("strTitle"),"'","''")&"','"&_
    Session("strEmail") &"','"&_
    Session("strPhone") &"','"&_
    Session("strFax") &"','"&_
    Replace(Session("strAddress1"),"'","''") &"','"&_
    Replace(Session("strAddress2"),"'","''") &"','"&_
    Replace(Session("strAddress3"),"'","''") &"','"& _
    Replace(Session("strCity"),"'","''") &"','"&_
    Session("strState") &"','"&_
    Session("strZip") &"','"&_
    Session("strCountry") &"','"&_
    Replace(Session("strAltName"),"'","''") &"','"&_
    Session("strAltEmail") &"','"&_
    Session("strAltPhone") &"','"&_
    Session("ysnGuest") &"','"&_
    Replace(Session("strGuestFirst"),"'","''") &"','"&_
    Replace(Session("strGuestLast"),"'","''") &"','"&_
    Session("strHotel") &"'," & varArrivalDate & ", " & varDepartureDate & ", '"&_
    Session("strSmoking") &"','"&_
    Session("ysnRoommate") &"','"&_
    Replace(Session("strRoommate"),"'","''") &"','"&_
    Session("strHotelCCNumber") &"','"&_
    Session("strHotelExpMonth") &"','"&_
    Session("strHotelExpYear") &"','"&_
    Session("strDietary") &"','"&_
    Replace(Session("memSpecial"),"'","''") &"','"&_
    Session("ysnSponsor") &"','"&_
    Session("strPrompted") &"','"&_
    Replace(Session("strReferralName"),"'","''") &"','"&_
    Session("strPaymentType") &"','"&_
    Session("strPayCCNumber") &"','"&_
    Session("strPayExpMonth") &"','"&_
    Session("strPayExpYear") &"','"&_
    Session("strPromoCode") &"', #"&_
    Date()&"#)"
' Execute Database Insert

 
Old November 13th, 2003, 10:23 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 111
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You should not need any delimiter for a currency field - it is the same as numeric fields AFAIK

Cheers
Ken

Microsoft MVP - Windows Server (IIS)
www.adOpenStatic.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in Migrating Project from ASP to ASP.NET hbansal ASP.NET 1.0 and 1.1 Professional 0 September 12th, 2008 05:48 AM
The beerhouse project, problem with the database jansek BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 September 2nd, 2008 02:50 PM
VS2005 database project pzmrcd Visual Studio 2005 0 January 16th, 2007 12:54 PM
connecting to a remote Access Project Database bright_mulenga Access 2 August 15th, 2006 06:33 AM
Add asp.net page to asp project debdemoe Classic ASP Basics 0 August 17th, 2005 12:28 PM





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