Skip to content

Generate JSON and Table #3

Description

@MenesesEvandro

I'm stuck trying to connect to database and simply get a JSON.

I need to try this 2 things:

  1. Print de full json on screen (stuck here)
  2. 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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions