Crazy wrote:
> Der kommer en masse tomme rækker (og jeg har defineret "MyColum" som
> output i SP'en).
Brug evet denne testfunktion, hvor du blot skal rette connectio9n string:
---------------------------------
<%
Dim SQL
Dim IsSelect
Dim databasename
Dim oConn
databasename = Request.QueryString("databasename")
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +
Server.MapPath("/") + "/../database/" + databasename + ";Persist Security
Info=False"
SQL = Request.QueryString("SQL")
if lcase(left(ltrim(SQL),6)) = "select" then IsSelect = true else
IsSelect = false
if Request.QueryString("showsql") <> "no" then
%>This is result from <b>"<% = SQL %>":</b><hr/><%
end if
Dim oRs
Dim filePath
Dim Index
Dim FieldName
Dim Counter
Counter = 0
Set oRs = oConn.Execute(SQL)
if not IsSelect then
Response.End
end if
%><table id="queryresult"><%
'Display the field attributes of the Table
%><tr><%
for each FieldName in oRs.Fields
%><th><% = FieldName.Name %></th><%
next
%></tr><%
Response.Flush
Do while (Not oRs.eof)
Counter = Counter + 1
%><tr><%
For Index=0 to (oRs.fields.count-1)
%><td><%
if not isnull(oRs(Index)) then
if Request.QueryString("safe") = "off" then
Response.Write oRs(Index)
else
Response.Write Replace(Replace(Replace(oRs(Index),"&","&") _
,"<","<") _
,">",">")
end if
end if
%></td><%
Next
%></tr><%
if right(cStr(Counter),2) = "00" then Response.Flush
oRs.MoveNext
Loop
%><tr><th>Count = <% = Counter
%></th></tr></table><%
oRs.close
oConn.close
Set oRs = nothing
Set oConn = nothing
%>
------------------------------------
--
Med venlig hilsen
Stig Johansen