SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old October 19th, 2003, 06:04 AM
Em Rave Em Rave is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Melbourne, AUS
Posts: 3 Em Rave User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Sessions and numbers

Hi there,

I am relatively new at this so bear with me. Without providing all the code... I have an enquiries form which connects to an ASP page. The form data is inserted into my database (works fine).

I have stored the data from the form in sessions and then want to write the data to the page to show the user what they have entered (I know I could just use response.write(Session=("EnqFirstname") etc, but it is for an assignmnent and I want to show that the data has gone into the data base and is being drawn out again.

OK so my only problem is the phone number won't work because it is designated as a number... Everything else works wonderfully! I have tried many methods of single and double quote marks but can't get it right (code below).

This is the error I am getting:
Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/assignment2/enqresult.asp, line 56, column 33
"EnqPhone = "&Session("enqPhone")" AND "&_
--------------------------------^

Any ideas?

SQLdata = "SELECT * from Enquiries WHERE "&_
"EnqFirstname = '"&Session("enqFirstname")&"' AND "&_
"EnqSurname = '"&Session("enqSurname")&"' AND "&_
"EnqEmail = '"&Session("enqEmail")&"' AND "&_
"EnqPhone = "&Session("enqPhone")" AND "&_
"EnqCountry = '"&Session("enqCountry")&"' AND "&_
"EnqMethod = '"&Session("enqMethod")&"' AND "&_
"Enquiry = '"&Session("Enquiry")&"'"

Reply With Quote
  #2  
Old October 19th, 2003, 06:08 AM
Em Rave Em Rave is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Melbourne, AUS
Posts: 3 Em Rave User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile Sessons and numbers

Don't worry, I think I found my problem!! Always the way.

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > Sessions and numbers


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT