Access database from store procedure

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. Return value from store procedure
      http://www.adopenstatic.com/faq/SprocsAndParameters.asp Cheers Ken "Marcin" <guzio77@poczta.onet.pl> wrote in message...
    3. 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...
    4. 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,...
    5. 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*...
  3. #2

    Default Re: Access database from store procedure

    [email]dfhian@telkom.net[/email] wrote:
    > 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]
    One way is to use GetString. After opening your recordset, do this
    (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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139