Ask a Question related to ASP Database, Design and Development.
-
Access database from store procedure
Hi All,
i need your help, my problem like this, how to get data that will displayed in table rows from store procedure..as example in col 1 row 1 i will display for name, col2 row 1 is nip and etc..can i get solve for this ...?
thanks
-----------------------------
This message is posted by [url]http://Asp.ForumsZone.com[/url]
Guest
-
Store Procedure Oracle
Hello, I have a problem for access with store procedure on oracle with a JDBC driver for oracle from Oracle. Somebody would have a solution to do... -
Return value from store procedure
http://www.adopenstatic.com/faq/SprocsAndParameters.asp Cheers Ken "Marcin" <guzio77@poczta.onet.pl> wrote in message... -
ALTER and UPDATE in store procedure
> How come SQL skip running the ALTER TABLE command Nothing is executing either command. The parser is checking the existing table, while... -
Store Procedure plus parameter where condition..
Hi, I am new programming in SQL Serever, and, I need to write a STORE PROCEDURE that recives a parameter to be used in the where statement,... -
Store Procedure Help
Comments embedded. Aaron Rouse wrote: I sure hope you don't have a lot of records in LOCATIONS_DTL. Are you really storing *every*... -
Bob Barrows #2
Re: Access database from store procedure
[email]dfhian@telkom.net[/email] wrote:
One way is to use GetString. After opening your recordset, do this> Hi All,
> i need your help, my problem like this, how to get data that will
> displayed in table rows from store procedure..as example in col 1 row
> 1 i will display for name, col2 row 1 is nip and etc..can i get solve
> for this ...? thanks
>
> -----------------------------
> This message is posted by [url]http://Asp.ForumsZone.com[/url]
(untested, may need to be tweaked):
dim sHTML
sHTML = rs.Getstring(2,,"</td></tr><tr><td>","</td></tr><tr><td>"
rs.close
set rs=nothing
cn.close
set cn=nothing
sHTML = left(sHTML,len(sHTML) - 8)
response.write "<table><tr><td>"
response.write sHTML
response.write "</table>"
If you want more control over formatting, or want to include the column
names, use GetRows. After opening the recordset:
dim ar, arNames, i, j
if not rs.eof then ar=rs.getrows
for = 0 to rs.Fields.count -1
arNames(i) = rs.Fields(1).name
next
'close and destroy the recordset and connection
If isarray(ar) then
response.write "<table>"
for i = 0 to ubound(ar,2)
for j = 0 to ubound(ar,1)
response.write "<tr><td>"
response.write arNames(i)
response.write "</td><td>"
response.write ar(j,i)
response.write "</td></tr>"
next
next
response.write "</table>"
else
response.write "no records"
end if
HTH,
Bob Barrows
Bob Barrows Guest



Reply With Quote

