|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
||||
|
||||
|
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. |
|
#4
|
|||
|
|||
|
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 Last edited by haehlpurdue : July 7th, 2003 at 02:15 PM. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Dumb question with easy answer... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|