WAP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreWAP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old March 11th, 2005, 06:48 AM
pjb007 pjb007 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 6 pjb007 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 44 m 30 sec
Reputation Power: 0
Send a message via ICQ to pjb007 Send a message via AIM to pjb007 Send a message via MSN to pjb007 Send a message via Yahoo to pjb007
WML: using ASP to show text from MS Access

I am aiming to get a simple WAP page, Is there a way you can insert ASP code within WML code to pull data out of a database.

The mdb file is called database in a folder called db

the table is called news and I want to display the latest headlines they are stored in a field called headlines

Here is my code but it does not seem to work

Code:
 
<%@ Language = "JScript"; %><% Response.ContentType = "text/vnd.wap.wml";
%><?xml version="1.0"?>

<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"
                     "http://www.wapforum.org/DTD/wml_1.2.xml">

'not sute if all of above is needed

<wml>
   <card id="card1" title="Testing">
      <p>
         Testing<br/>
<%
dim Conn 
dim FilePath 
dim SQL 
Dim RsUser 

'Connection to Database 
Set Conn = Server.CreateObject("ADODB.Connection") 
FilePath = Server.MapPath("db/database.mdb") 
Conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & FilePath & ";" 

'SQL Query String 
SQL = "Select * FROM news ORDER By headlines" 

'Set the Recordset 
Set RSUser = Conn.Execute (SQL) 

'Print the Recordset 
RSUser.movefirst 
Do while not RSUser.EOF 



   Response.Write (RSUser("headlines"))

RSUser.movenext

Loop 


%>
      </p>

   </card>
</wml>

Reply With Quote
  #2  
Old March 12th, 2005, 06:05 AM
jabba_29's Avatar
jabba_29 jabba_29 is offline
Back in HEL
Dev Shed God 8th Plane (8500 - 8999 posts)
 
Join Date: Feb 2002
Location: Finland
Posts: 8,667 jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)  Folding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner Folder
Time spent in forums: 3 Months 3 Weeks 4 Days 5 h 1 m 49 sec
Reputation Power: 1618
Send a message via ICQ to jabba_29 Send a message via AIM to jabba_29 Send a message via MSN to jabba_29 Send a message via Yahoo to jabba_29 Send a message via Google Talk to jabba_29 Send a message via Skype to jabba_29
Facebook
Quote:
Here is my code but it does not seem to work
So what doesn't seem to work?
I don't have asp set up on my pc, so can't do the queries for you - do you get errors, nothing displayed??
__________________
Cheers,

Jamie


# skiFFie | Home of the 'accessibility module' for Drupal
# Jamie Burns [me] Accessibility Module [drupal]
# guidelines | search | wap resources | not getting help | fold to cure

# Any form of employment is strictly prohibited ......


__________________

Let the might of your compassion arise to bring a quick end
to the flowing stream of the blood and tears .....
Please hear my anguished words of truth.

__________________

Reply With Quote
  #3  
Old March 12th, 2005, 10:00 AM
pjb007 pjb007 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 6 pjb007 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 44 m 30 sec
Reputation Power: 0
Send a message via ICQ to pjb007 Send a message via AIM to pjb007 Send a message via MSN to pjb007 Send a message via Yahoo to pjb007
Is displays the title and the text outside the ASP tags. Nothing from the database is displayed, I am using WAP emulators rather than my mobile.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreWAP Programming > WML: using ASP to show text from MS Access


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway