Hi guys ;
I'm having a problem with 2 arrays, one Sybase procedure two calls with different ntds. The procedure has 40 selects in them. On the 9 and 16 selects return two values. All other selects return 1 value only. I Am getting back data till I reach ( rvalue) then I only the field before that again ( short_name) then I get zeros for the rest of the selects .
How do I get around this .
Thanks.
<%
If (request(“ntds”)=”ALL then
ntds = "MAIN"
set Conn=Server.CreateObject("ADODB.Connection"
set RS=Server.CreateObject("ADODB.recordset"
Conn.Open(Application("ConnString")
If ntds=”MAIN”
set RS1 = Conn.Execute("exec jones..rpt_work_summary '" & ntds & "'"
myIndex1 = 0
do while (not RS1.EOF)
myArray3(myIndex1) = CStr(RS1(0))
myIndex1 = myIndex1 + 1
do while (not RS1.eof)
'Response.Write("<tr><td> " & RS1(0) & "</td><td>" & RS1(1) & "</td></tr>"
RS1.MoveNext()
loop
set RS1 = RS1.NextRecordset()
loop
myIndex1 = 0
ntds= ” ”
ntds = "SUBCONTRACT"
set RS = Conn.Execute("exec jones..rpt_work_summary '" & ntds & "'"
myIndex = 0
do while (not RS.EOF)
myArray4(myIndex) = CStr(RS(0))
myIndex = myIndex + 1
do while (not RS.eof)
'Response.Write("<tr><td> " & RS1(0) & "</td><td>" & RS1(1) & "</td></tr>"
RS.MoveNext()
loop
set RS = RS.NextRecordset()
loop
myIndex1 = 0
Response.Write("<table width=100% border=1 cellspacing=0 cellpadding=2 width=100% align=LEFT>"
Function ReportAllConts()
‘ This is where I name the const I have forty of them all reture 1 value exept 2. The numbers are the select number these fields come from in the sql procedure.
const short_name = 9
const rvalue = 9
const short_name =16
const rvalue = 16
‘ Then I have forty different (response .write)
Response.Write("<tr><td>" & myArray3( short_name)& “</td><td>” & myArray4 ( rvalue) & "</td></tr>"
Response.Write("<td>" & Cint(myArray3(last_shipped_amount)) + Cint(myArray4(last_shipped_amount)) & "</td></tr>"
End Function
%>
I'm having a problem with 2 arrays, one Sybase procedure two calls with different ntds. The procedure has 40 selects in them. On the 9 and 16 selects return two values. All other selects return 1 value only. I Am getting back data till I reach ( rvalue) then I only the field before that again ( short_name) then I get zeros for the rest of the selects .
How do I get around this .
Thanks.
<%
If (request(“ntds”)=”ALL then
ntds = "MAIN"
set Conn=Server.CreateObject("ADODB.Connection"
set RS=Server.CreateObject("ADODB.recordset"
Conn.Open(Application("ConnString")
If ntds=”MAIN”
set RS1 = Conn.Execute("exec jones..rpt_work_summary '" & ntds & "'"
myIndex1 = 0
do while (not RS1.EOF)
myArray3(myIndex1) = CStr(RS1(0))
myIndex1 = myIndex1 + 1
do while (not RS1.eof)
'Response.Write("<tr><td> " & RS1(0) & "</td><td>" & RS1(1) & "</td></tr>"
RS1.MoveNext()
loop
set RS1 = RS1.NextRecordset()
loop
myIndex1 = 0
ntds= ” ”
ntds = "SUBCONTRACT"
set RS = Conn.Execute("exec jones..rpt_work_summary '" & ntds & "'"
myIndex = 0
do while (not RS.EOF)
myArray4(myIndex) = CStr(RS(0))
myIndex = myIndex + 1
do while (not RS.eof)
'Response.Write("<tr><td> " & RS1(0) & "</td><td>" & RS1(1) & "</td></tr>"
RS.MoveNext()
loop
set RS = RS.NextRecordset()
loop
myIndex1 = 0
Response.Write("<table width=100% border=1 cellspacing=0 cellpadding=2 width=100% align=LEFT>"
Function ReportAllConts()
‘ This is where I name the const I have forty of them all reture 1 value exept 2. The numbers are the select number these fields come from in the sql procedure.
const short_name = 9
const rvalue = 9
const short_name =16
const rvalue = 16
‘ Then I have forty different (response .write)
Response.Write("<tr><td>" & myArray3( short_name)& “</td><td>” & myArray4 ( rvalue) & "</td></tr>"
Response.Write("<td>" & Cint(myArray3(last_shipped_amount)) + Cint(myArray4(last_shipped_amount)) & "</td></tr>"
End Function
%>