Click here to Skip to main content
16,011,120 members
Home / Discussions / Database
   

Database

 
GeneralRe: SQL Debugging Pin
notadood28-Aug-02 8:57
notadood28-Aug-02 8:57 
GeneralODBC.NET and Excel Pin
Knappen27-Aug-02 1:30
Knappen27-Aug-02 1:30 
GeneralRe: ODBC.NET and Excel Pin
Paul Riley27-Aug-02 4:55
Paul Riley27-Aug-02 4:55 
GeneralRetrieving QTY of records on a SQLClient Pin
toki24-Aug-02 11:30
toki24-Aug-02 11:30 
GeneralRe: Retrieving QTY of records on a SQLClient Pin
James T. Johnson24-Aug-02 13:50
James T. Johnson24-Aug-02 13:50 
GeneralRe: Retrieving QTY of records on a SQLClient Pin
Paul Ingles25-Aug-02 4:24
Paul Ingles25-Aug-02 4:24 
GeneralRe: Retrieving QTY of records on a SQLClient Pin
toki28-Aug-02 16:06
toki28-Aug-02 16:06 
QuestionWhats wrong with this picture? Pin
Robby22-Aug-02 3:07
Robby22-Aug-02 3:07 
I am attempting to query every table in my database and put the results in a record set, format the results to a cell string in html and print it out. The problem is that it is displaying only the results from the first table it matches to. Am I mistaken in thinking that it combines all results into one RS? If not, how do I accomplish what I want to do? The premise is this: I have several user request forms that output to their respective tables in my SQL Sevrver 2k DB. All the forms have the columns listed in the SELECT stametment below. I want to query all these tables for anything matching STATUS='OPEN' and display the results in a user queue. I have eliminated the HTML from the user queue page just to show what function I am trying to accomplish. Any help is GREATLY appreciated! (I aplogize for the sloppyness of the CELLSTRING & "<>" has been replaced with "[]")

============================CODE===========================

Dim objRS
Dim strSQL

Set objRS = Server.CreateObject("ADODB.Recordset")

strSQL = "sp_MSforeachtable 'select submitDate, requestorLastName, requestorFirstName, urlToForm, nof, status from ?'"
objRS.Open strSQL, MyConn

if objRS.eof then
response.redirect "noQueue.asp"

else
do until objRS.eof

cellString = "[tr style='padding: 3'][td][font face='Arial' size='2' color='#CCCCCC'][center]" & objRS["submitDate"] & "[/center][td][font face='Arial' size='2' color='#FFFFFF'][center]" & objRS("requestorFirstName") & " " & objRS("requestorLastName") & "[/center][td][font face='Arial' size='2' color='#FFFFFF'][center]" & "[a href='" & objRS("urlToForm") & "'][font color='#66CCFF']" & objRS("nof") & "[/a]" & "[/center][/td][td][font face='Arial' size='2' color='#FFFFFF'][center]" & objRS("status") & "[/tr]"

response.write(cellString)
objRS.movenext
loop

end if
AnswerRe: Whats wrong with this picture? Pin
notadood22-Aug-02 3:12
notadood22-Aug-02 3:12 
GeneralRe: Whats wfdgwith this picture? Pin
Anonymous22-Aug-02 9:18
Anonymous22-Aug-02 9:18 
AnswerRe: Whats wrong with this picture? Pin
Bruce Duncan22-Aug-02 9:34
Bruce Duncan22-Aug-02 9:34 
GeneralDleDbDataAdapter and DSNs Pin
thiggs21-Aug-02 4:02
thiggs21-Aug-02 4:02 
GeneralSQL - SELECT DISTINCT myfield Pin
Tim Rymer20-Aug-02 4:59
Tim Rymer20-Aug-02 4:59 
GeneralRe: SQL - SELECT DISTINCT myfield Pin
Mazdak20-Aug-02 9:02
Mazdak20-Aug-02 9:02 
GeneralThat doesnt work. Pin
Tim Rymer20-Aug-02 9:48
Tim Rymer20-Aug-02 9:48 
GeneralRe: That doesnt work. Pin
DanielO21-Aug-02 3:21
DanielO21-Aug-02 3:21 
GeneralMinor addition Pin
Anonymous21-Aug-02 4:38
Anonymous21-Aug-02 4:38 
GeneralRe: That doesnt work. Pin
Tim Rymer22-Aug-02 3:51
Tim Rymer22-Aug-02 3:51 
GeneralRe: That doesnt work. Pin
Mazdak21-Aug-02 4:25
Mazdak21-Aug-02 4:25 
GeneralRe: That doesnt work. Pin
notadood26-Aug-02 7:44
notadood26-Aug-02 7:44 
GeneralCheck (create table) error Pin
Hans Ruck20-Aug-02 0:40
Hans Ruck20-Aug-02 0:40 
Generalsp_OAMethod type mismatch error Pin
Le centriste19-Aug-02 10:36
Le centriste19-Aug-02 10:36 
GeneralODBC & SQL - Modify the "Table" name in Excel Pin
Stefan_L_0119-Aug-02 10:32
Stefan_L_0119-Aug-02 10:32 
GeneralRe: ODBC & SQL - Modify the "Table" name in Excel Pin
DanielO21-Aug-02 3:44
DanielO21-Aug-02 3:44 
GeneralRe: ODBC & SQL - Modify the "Table" name in Excel Pin
Stefan_L_0121-Aug-02 7:58
Stefan_L_0121-Aug-02 7:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.