#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Posts
    1
    Rep Power
    0

    no output from database ? ;-(


    Hello!

    This is my first post here.

    The only output of this code(wml-file when i try it on a wapphone) is "Saljes", it don't lists things from the database. ;-(

    Any suggestions, please ?

    Code:

    <% Response.ContentType = "text/vnd.wap.wml" %><?xml version="1.0" encoding="iso-8859-1"?>

    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.brinkster20.com/kursbok/xxxxx.wml">

    <wml>

    <!-- THIS IS THE MAIN CARD OF THE DECK -->

    <card id="MainCard">

    <p align="left"><small><b> Saljes </b></small></p>

    <%

    strconn = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("\kursbok\db\xxxxx.mdb")

    set conn = server.createobject("adodb.connection")

    conn.open strconn

    set rs = server.createobject("adodb.recordset")

    Query = "SELECT titel,forfattare,pris FROM annonser WHERE typ = 'saljes'"

    rs.open Query, conn

    if not rs.eof Then

    rs.movefirst

    Do While NOt Rs.EOF
    %>
    <small><%=rs("titel")%></small><br>
    <small><%=rs("forfattare")%></small><br>
    <small><%=rs("pris")%></small><p>
    <%
    rs.movenext
    Loop


    else

    response.write("<p align='left'><small>Databasen är tom</small></p>")

    End if

    rs.close

    Set conv = nothing

    set rs= nothing

    set conn = nothing

    %>

    </card>

    </wml>
  2. #2
  3. No Profile Picture
    peterg
    Guest
    Devshed Newbie (0 - 499 posts)
    Hello Klas !

    I can't advise on your database problem, but I would suggest that you use an emulator to test with. I use Deckit from pyweb.com available here. I also use Opera 5.

    I have found Deckit a very useful piece of software as it will show you real error messages - unlike a mobile phone

    Hope this helps !

IMN logo majestic logo threadwatch logo seochat tools logo