This is a discussion on "Select statement inside a rs loop?" within the Classic ASP section. This forum, and the thread "Select statement inside a rs loop? are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Select statement inside a rs loop?
|
||
| Notices |
![]() |
|
|
LinkBack (1) | Thread Tools |
#1
|
|||
|
|||
|
Hi there,
I am using asp to display data from a table in access using standard while loop. Inside the while loop i would like to create a new sum variable by use the following query, but i get the follow error: The connection cannot be used to perform this operation. It is either closed or invalid in this context. {While loop here} {display data from RSJobs here} varJob_id = RSJobs("job_id") RSActual.Source = "SELECT jobtran.job_id, Sum(jobtran.qty) AS actual_hours FROM jobtran INNER JOIN job ON job.job_id = jobtran.job_id WHERE job.job_id= '" & varJob_id & "' AND jobtran.category Like 'L' GROUP BY jobtran.job_id;" RSActual.CursorType = 0 RSActual.CursorLocation = 2 RSActual.LockType = 1 RSActual.Open() {end while loop} And yes, before you ask job_id is a text field. Its not my database! If anyone could help me in this time of need that would be great! Regards Damon |
|
|
![]() |
| Tags |
| select, statement, inside, loop |
| Thread Tools | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://webforumz.com/classic-asp/8734-select-statement-inside-a-rs-loop.htm
|
||||
| Posted By | For | Type | Date | |
| Metacrawler - Die Metasuchmaschine. | This thread | Refback | Mar 23rd, 2007 13:52 | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| chained select box dependable select | thenamenoonehastaken | JavaScript Forum | 0 | Feb 8th, 2008 05:49 |
| PHP If Statement... | mcdanielnc89 | PHP Forum | 16 | Dec 9th, 2007 17:44 |
| If..Else statement help | IanW | PHP Forum | 3 | Oct 6th, 2006 13:40 |
| SELECT statement | gecastill | Databases | 1 | Feb 15th, 2006 23:27 |
| With Statement | Trebz | Classic ASP | 2 | Feb 2nd, 2004 14:56 |