I'm stuck trying to connect to database and simply get a JSON.
I need to try this 2 things:
- Print de full json on screen (stuck here)
- Generate a HTML table (no scripts like vue, only the table) (not even tryied)
What am I doing wrong?
Main Page:
<!-- #include file="asplite/asplite.asp"-->
<%
aspL("handlers/teste.resx")
%>
handlers/teste.resx
<%
select case lcase(aspL.getRequest("asplEvent"))
case "getdata" : aspL("db/getData.resx")
end select
response.write aspL.loadText("pages/html/htmlTeste.resx")
set aspL=nothing
%>
db/getData.resx
<%
on error resume next
dim rs : set rs=db.rs : rs.open("select TOP 10 * from [dbo].[BaseTeste]")
aspl.json.dump(rs)
on error goto 0
%>
pages/html/htmlTeste.resx
<div class="asplForm " id="getdata"></div>
I'm stuck trying to connect to database and simply get a JSON.
I need to try this 2 things:
What am I doing wrong?
Main Page:
handlers/teste.resx
db/getData.resx
pages/html/htmlTeste.resx
<div class="asplForm " id="getdata"></div>