ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

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 Dev Shed Forums Sponsor:
  #1  
Old July 3rd, 2003, 03:30 PM
haehlpurdue haehlpurdue is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 4 haehlpurdue User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation Dumb question with easy answer...

First, I am marginal with ASP, but know a decent amount, and perhaps I have just been working too much today. But in my ASP page I just want to show the result of -

sSQL = Select sum(amount) from expenses WHERE user like '" & sUser & "' and ready = 0 and method = 'Cash'
Set sRS = sConn.Execute(sSQL)


All I want to do is show the end result and i keep getting page cannot be displayed. Ive used response.write with no luck and I know its something ive done before, but the answer eludes me...any help would be greatly appreciated.

Everything at the top works how I want, giving individual occurences of different expenses submitted in this session, but at the bottom (heavily astericked) is where I want the totals of each payment method (cash, personal credit card, company credite card) to be displayed.
Attached Files
File Type: asp expenseprint.asp (6.4 KB, 329 views)

Reply With Quote
  #2  
Old July 4th, 2003, 02:01 PM
Vlince Vlince is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Canada, Quebec, Montreal
Posts: 410 Vlince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
The first thing I'd like you to do is turn off(uncheck) Show friendly HTTP error message

Internet Explorer, Tools-->Internet Options-->Advance TaB

Now, I did assume you had Internet Explorer, otherwise try to find the same thing in the browser your using...


Now the second thing I'd like to ask his:

Are you showing the complete code inside the file *expenseprint.asp* you've attached ?

The reason I'm asking is because I've downloaded the file and opened it but I don't see, at the top of the page the <%@ Language=VBScript %> instruction AND I don't see a begining <html> and ending </html> tag same thing for the <body>...</body> tags so your file isn't proper unless you've skip that part? yes no maybe so?

If you where doing a simple Response.Redirect then I'd understand why you don't have the <html>...</html> and <body>...</body> parts!

Hope this helps!
Sincerely

Vlince

Reply With Quote
  #3  
Old July 5th, 2003, 01:18 AM
yassoor's Avatar
yassoor yassoor is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Canada - Egypt
Posts: 60 yassoor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Smile

It would really help to get the error message

On the "page cannot be displayed" read down a bit to see if it specifies the error and the line number ... if it doesn't follow Vlince steps to turn off the simple http errors.

AND OFCOURSE make sure you are using the right URL

I don't think <html> and <%language... %> would cause the error .. I have ran scripts without them ... but it is a good practice to include them.

Once you post the error message and the line number .. it would help us help you find the bug.
__________________
I hope this is of any help to anyone.

Yassoor
http://www.WebsitesCreation.ca

Reply With Quote
  #4  
Old July 7th, 2003, 02:05 PM
haehlpurdue haehlpurdue is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 4 haehlpurdue User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Update

Thanks yassor and vlince. I have worked on my code this morning. I am almost to what I want. There are two things it is not doing.

a)I am not sure how to convert to a currency format when it is displaying the results from the database.

b)When I have my SQL written out and do a response.write, it is only spitting out the code, not an actual value, or the sum that I am looking for. Ill attach my revised code and a screenshot from my browser. Feel free to make any changes and email me the code. Or just leave suggestions.

Also, is there anyway to place SQL code into the click of a button?

IE "Update expense SET ready = -1 where user like "sUser" (This command will officially submit expenses to a database and cannot be modified or deleted like unsubmitted (but logged) expenses)

Thanks Again,

Aaron Haehl - URL
Attached Files
File Type: zip expenseprint.zip (94.8 KB, 264 views)

Last edited by haehlpurdue : July 7th, 2003 at 02:15 PM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Dumb question with easy answer...


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 2 hosted by Hostway