Question

WML/WAP and Database Access how do i make my WAP pages dynamic using ASP (many points!!)

Asked by: MiamiDolphins

Hey there guys,

i've also asked this question in the WAP section of this site so i'm also offering points here.

i've created a WAP website with a selection of ringtones for myselve that i can download on the fly - i've had to create a WAP site because my phone doesnt come with any serial cable also cables are not available in order to connect a phone to a PC.

i can use the WAP site on the move so that i can download my ringtones.

But what i want to do now is make the WAP site more dynamic as i have alot of ringtones that i want to add to the site but i know that if i had them it will take a very long time as i want them in categories and in alphatical order i'll also like a page which shows only the ringtones i've added in the last 3 days.

i know that this can be done with ASP and creating a database to store the information but how would i do this.

my idea is that i create a website which i use to input new records into the database (including the name of the ringtone, category of the ringtones, date ringtone entered, size of ringtone, full link to ringtone)

i then want to create some dynamic wml pages that let allow me to search the database, and click on a link that will open up the ringtone. and also show me the ringtones in the categories, and alphabetically.


can someone please help me with this, i'm a complete beginner - i've only just started making A WAP SITE. i'm also not really any good at ASP the ASP site i did make was using dreamweaver mx and very simple using wizards etc.

i could do with all the help in the world so i'm offering all the points i have as i would like tog et this done very very soon.


thanks again


also would it be easier to do this in asp or PHP or which dynamic lanuguage would be better?

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2003-11-08 at 04:10:04ID20791767
Tags

connecting

,

php

Topic

Active Server Pages (ASP)

Participating Experts
2
Points
500
Comments
19

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

    Free Tech Articles

    1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
      It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
    2. SCCM OSD Basic troubleshooting
      SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
    3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
      This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
    4. Create a Win7 Gadget
      This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
    5. Outlook continually prompting for username and password
      There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
    6. Backup Exchange 2010 Information Store using Windows Backup
      There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

    Cloud Class Webinars

    1. Avoiding Bugs in Microsoft Access
      Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
    2. Top 10 Best New Features in Visio 2010
      Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
    3. IT Consultant Business Secrets Revealed
      Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
    4. Disaster Recovery and Business Continuity
      Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
    5. Organize Your Visio Diagrams with Containers and Lists
      Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
    6. How to Us Objects, Properties, Events and Methods in Microsoft Access
      Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

    Join the Community

    Give a Little. Get a Lot.

    Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

    Join the Community

    Answers

     

    by: purpleblobPosted on 2003-11-09 at 08:26:30ID: 9710236

    Wow, that's quite a question as it covers many things - let's answer your last question first.

    PHP and ASP are (for the most part) much the same, i.e. they're both server side scripting, they also both allow you to work with databases and create dynamic web sites. Would it be easier to use ASP or PHP is not one that can be answered without know more about what you already know. For example ASP can be written using VBScript (the default language) or JavaScript (well JScript - the MS JavaScript). VBScript is a pretty simple language to use so it's quite easy. PHP uses it's own language which I find resembles C in someways (although without pointers etc.) aspects of it are Perl like also.

    Both PHP or ASP will do what you want, I think what you really need to do is focus on what OS you're going to use and other technologies. For example, PHP is generally the choice on a Unix/Linux based server whilst ASP (or the more recent and more powerful ASP.NET) would be Microsoft based - so which does your ISP or server use - Windows or Linux ?

    As you say, what you want to do (to be truly dynamic) is store your ringtones either in a database in a blob field or store them on the server's hard drive and store the URL's to them in the database. The database for this will be fairly simple, I mean all you really need is a single table with two fields (at the minimum) the two fields would hold the name of the ringtone for easy accessibility to it and the other field either the ringtone or URL (discussed previously).

    Without going massively in depth on how to do what you want, I would suggest checking out http://www.w3schools.com/asp/default.asp - you specifically need to look into connecting to databases and using RecordSets (if using old ASP). Also the same site http://www.w3schools.com/php/ but different folder will give good info. on PHP

    But I think firstly you might wish to decide which technology to use (as said) this will depend partly on what server you or your ISP are running and what's available. I would probably say ASP is the easiest to learn for a beginner.

    Good luck

     

    by: MiamiDolphinsPosted on 2003-11-09 at 08:41:17ID: 9710310

    thanks for your answer

    firstly i know how to create the database

    and i've used ASP before for HTML website i made for an university project.

    but i would like to know how to do the same with WML (i used dreamweaver before for the project)


    whats the first step

    considering i've already made the database


    how do i now connect that to an WML file?

     

    by: purpleblobPosted on 2003-11-09 at 13:05:38ID: 9711016

    Ah right, sorry I didn't grasp what level of knowledge you had on this.

    Okay well to output WML through ASP you simply need to set the Response.ContentType = "text/vnd.wap.wml" and then output you WML - so for a very simple example let's say you have a file file called mypage.wml then to simply output this within asp the change the file name to have .asp extension, i.e. mypage.asp then all you really need to do is insert the following line as your first line of code

    <% Response.ContentType = "text/vnd.wap.wml" %>

    Obviously the usefullness of something like ASP is that you can embed ASP within your WML - the example I've given is simply to show how you can convert a .wml straight into a .asp. Obviously where it gets fun is using ASP scripting within the WML code :-)

    Hope this helps

     

    by: MiamiDolphinsPosted on 2003-11-09 at 13:13:08ID: 9711032

    interesting...

    so for example i'm using dreamweaver

    and i want to create an asp website.

    do i just create the asp website using the dreamweaver wizards and all the nice tools etc

    then at the top of the page just add the output to wml thingy?

    is that all i need to do?

    what about HTML tagging that may be used in dreamweaver whilst i'm creating the ASP page (e.g. font colour and all that)


    will an mobile phone viewing the site ignore all that?


    would the WML still connect to the database in teh same way and still be able to do all the searching of records etc

     

    by: purpleblobPosted on 2003-11-09 at 13:28:40ID: 9711068

    Basically if you create a page that can be displayed on a mobile phone, then you want to start embedding ASP into it - then all you need to do is insert the line I've supplied.

    As to whether HTML is ignored by the mobile this will probably depend upon the mobile's micro browser. I'm reliably informed that some mobiles handle HTML.

    The WML wouldn't connect to the database, the ASP would and you would use ASP to output the RecordSet results in WML format.

     

    by: NeilTPosted on 2003-11-09 at 13:29:55ID: 9711070

    Here is a basic search form and results page to give you an idea.

    I apologise but I do not have any time to spare cleaning the code specifically for you but you should find it useful.

    Neil

    ------------------------------------------------------------------
    <%
    ' INDEX.ASP (search form)


    response.ContentType = "text/vnd.wap.wml"
    Response.Buffer = True
    %>

    <?xml version="1.0"?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
    <wml>
          <head>
                <meta forua="true" http-equiv="pragma"
                                           content="no-cache"/>
                <meta forua="true" http-equiv="Cache-Control"
                                           content="no-cache, must-revalidate"/>
          </head>
          <card id="start" title="Welcome">
          <p align="center">Appliance Search</p>
          <p align="center"><small>Enter Model No below:</small><br/></p>
                <p align="center"><input name="Query" /></p>
                <do type="accept" label="Go">
                      <go href="search.asp?Query=$(Query)" />
                </do>
          </card>
    </wml>


    ------------------------------------------------------------------
    <%

    ' SEARCH.ASP (results page)


    xDb_Conn_Str_Appliances = "#### YOUR DATABASE ####"

    response.ContentType = "text/vnd.wap.wml"
    Response.Buffer = True

    ' grab the query sent from form
    Query = Request.QueryString("Query")
    %>
     
    <?xml version="1.0"?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
     
    <wml>
     <head>
                <meta forua="true" http-equiv="pragma"
                                           content="no-cache"/>
                <meta forua="true" http-equiv="Cache-Control"
                                           content="no-cache, must-revalidate"/>
          </head>

    <card id="start">

    <p align="center"><b>R E S U L T S</b><br/></p>
    <%
     
    set conn = Server.CreateObject("ADODB.Connection")
    conn.Open xDb_Conn_Str_Appliances
     
    strsql = "select * from YOUR [#### DATABASE TABLE ####]"
    strsql = strsql & " WHERE [#### FIELD TO SEARCH ####] LIKE '%" & Query & "%'"
     
    set rs = Server.CreateObject("ADODB.Recordset")
    rs.Open strsql, conn, 1, 2
    totalRecs = rs.RecordCount
    %>
    <p>
    <small>
    <%
    if rs.EOF then
    response.write "No match for " & Query
    else
    Do While (NOT rs.EOF)
    %>
    <% response.write rs("#######") %> - <a href="<% response.write rs("#####") %>"><% response.write rs("#####") %></a>
    <br/>
    <%
    rs.MoveNext
    Loop
    end if
    %>
    </small>
    </p>
    <%
    ' Close recordset and connection
    rs.Close
    Set rs = Nothing
    conn.Close
    Set conn = Nothing %>
    </card>
    </wml>

     

    by: MiamiDolphinsPosted on 2003-11-09 at 15:32:08ID: 9711493

    what does this mean

    meta forua="true" http-equiv="pragma"
                                     content="no-cache"/>
              <meta forua="true" http-equiv="Cache-Control"
                                     content="no-cache, must-revalidate"/>


    and this

    response.ContentType = "text/vnd.wap.wml"
    Response.Buffer = True

    i'm reinstalling dreamweaver now

    then i'll give it a go later

    is it possible to make the site so that it will work as a HTML and a WML

    e.g it will display WML(asp) if its being viewed by an mobile phone etc

    and HTML (asp) if its being viewed by PC

    i have 400 spare points so will increase if needed

     

    by: purpleblobPosted on 2003-11-09 at 23:45:23ID: 9712788

    Response.ContentType tell the browser what the content of the stream coming back is - so for example if you have a word doc in a database you can set the ContentType to that which word uses and the browser will then interact with the stream as if it was a .doc file stored on your hard drive.

    Response.Buffer means buffer the output, i.e. do not send anything to the client until we've finished building the data.

    The meta tags are not a requirement for what you wish to do, I'm sure NeilT will confirm - but if I recall they tell the browser not to cache the page.

    You could make a page both HTML or WML capable but more likely would be to have a home page (i.e. default.asp) which check the browser type. If it's a mobile then redirect the user to a WML version of your main page, whilst if it's IE or other desktop browser redirect to the HTML version of your page. You could attempt to create a single file to handle both HTML & WML but to be honest it'll be a pain to maintain and debug.

     

    by: NeilTPosted on 2003-11-10 at 01:44:43ID: 9713409

    Yes as purpleblob says, the meta tags simply force the card to be reloaded from the server and are not needed in your instance.

    I did try to make a combined page a while ago, and from memory just calling the wap page as standard still worked fine on my browser, although you may have some compatability errors with older browsers.

    Neil

     

    by: MiamiDolphinsPosted on 2003-11-10 at 03:21:13ID: 9714218

    I cant get it to work
    below is my code for the main menu any ideas?

    <%@LANGUAGE="VBSCRIPT"%>
    <!--#include file="Connections/Mototone.asp" -->
    <%
    Dim Menu
    Dim Menu_numRows

    Set Menu = Server.CreateObject("ADODB.Recordset")
    Menu.ActiveConnection = MM_Mototone_STRING
    Menu.Source = "SELECT Category FROM Category ORDER BY Category ASC"
    Menu.CursorType = 0
    Menu.CursorLocation = 2
    Menu.LockType = 1
    Menu.Open()

    Menu_numRows = 0
    %>
    <%
    Dim Repeat1__numRows
    Dim Repeat1__index

    Repeat1__numRows = -1
    Repeat1__index = 0
    Menu_numRows = Menu_numRows + Repeat1__numRows
    %>
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    <!--#include file="Connections/Mototone.asp" -->
    <?xml version="1.0"?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">


    <wml>
    <head>
    <title>Main Menu</title>
    <meta http-equiv="Content-Type" content="text/vnd.wap.wml"/>
     <meta forua="true" http-equiv="pragma"
                                     content="no-cache"/>
              <meta forua="true" http-equiv="Cache-Control"
                                     content="no-cache, must-revalidate"/>
    </head>
    <card id="start">
    <p align="center"><strong>Menu</strong></p>
    <p>&nbsp;</p>
    <table width="200" border="0" align="center">
      <tr>
        <td>&nbsp;</td>
        <td><div align="center">
          <%
    While ((Repeat1__numRows <> 0) AND (NOT Menu.EOF))
    %>
          <%=(Menu.Fields.Item("Category").Value)%>
          <%
      Repeat1__index=Repeat1__index+1
      Repeat1__numRows=Repeat1__numRows-1
      Menu.MoveNext()
    Wend
    %>
    </div></td>
        <td><div align="center"></div></td>
      </tr>
    </table>

    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>

    <%
    Menu.Close()
    Set Menu = Nothing
    %>
    </card>
    </wml>



    Any ideas guys

    i think once i'm able to get one page workin on the device i'll be able to do the rest

     

    by: purpleblobPosted on 2003-11-10 at 03:46:06ID: 9714315

    What exactly is not working or is happening ?

    I notice you've not got Response.ContentType = "text/vnd.wap.wml" anywhere. So you'e not sending info. to the browser to tell it what's about to arrive. Or have I missed it ?

     

    by: MiamiDolphinsPosted on 2003-11-10 at 04:16:59ID: 9714444

    is the code right?

    i'm trying to read from the database on my mobile phone (wap)

    but i get an internel server error message

    i also get the same message from internet explorer.


    so have i done the code wrong?


     

    by: NeilTPosted on 2003-11-10 at 04:55:45ID: 9714576

    from memory I had errors when using includes not in the same folder try moving them to the same folder and trying again.

    also remove the <%@LANGUAGE="VBSCRIPT"%>

    Neil

     

    by: MiamiDolphinsPosted on 2003-11-10 at 05:40:59ID: 9714831

    Still not working at all

    was my code right in the first place?

     

    by: MiamiDolphinsPosted on 2003-11-10 at 10:16:30ID: 9716705

    I'm really struggling so lets ask this question differently.

    I basically want to create a dynamic WAP site.

    I want to do this using ASP as thats supported on my server.

    the site will not need to do much its a pretty simple site really.


    heres what i want it to do.


    1. connect to a access database (the database contains three tables)

    TYPE
    typeid
    type

    CATEGORY
    categoryID
    category

    ITEM
    itemid
    item
    category
    type
    URL (this is the full url to the item, which would like to be available so that you just need to click on it and it will download to your phone)

    2. I want the main menu of the site will be based on the TYPE table. e.g. the type table contains. 1.Games, 2.Ringtones, Links etc - so the main menu would read the information in the table and then display it on the phone.
    the user would then click on any of the main menu items and it would take them to a list of items which match that link (e.g. if they click on the games link it would pass the typeid variable and then go to the results page and only show the items where the typeid match)

    3. Once the user gets into the menu item (e.g.Games) it will display a list of all the games available (all java games - .jar files) the user can then just click on the link (the link comes from the database) and then download the item.

    4. i would also like facility which would allow the user to search database (e.g. if they type the word bruce, it would bring back the reasons Bruce Lee fighting - Game, Bruce Springfield - Ringtone etc)

    thats all i need to do.

    i know how to do this using dreamweaver MX and the tools that come with it but this makes a ASP file with HTML formatting. to convert the HTML to WML seems very difficult after looking through a few help sites so i wanted to do it just using WML and ASP.  

    What do you guys think? would it be easier to create the site in dreamweaver using the HTML stuff and then try and turn the HTML into WML.

    or to just do it using for example santanabuilder or nokia tools to create the ASP with WML.

    i'm trying to do this because i have alot of files that i would like to make available for my phone (my phone does not have an data cable available so its near impossible to get any ringtones or games etc for the phone)

    the url for my wap site at the minute is

    http://mototone.com/index.wml

    (i want this to be a database driven wap site)

    can anyone give any example codes which could help me?

    or give me some links to places that could teach me how to do this?

     

    by: NeilTPosted on 2003-11-10 at 23:31:03ID: 9720509

    Hi

    I'm at work now so cannot help but if you want to sent the database to nt006a6440@blueyonder.co.uk (with some dummy data in) I'll code it for you and ensure it works before i email it back

    Neil

     

    by: MiamiDolphinsPosted on 2003-11-11 at 03:09:06ID: 9721365

    i've sent you an email

     

    by: NeilTPosted on 2003-11-12 at 14:12:15ID: 9735205

    Hi, here are the files you need to get it working

    index.asp
    catagory.asp
    search.asp
    searchResults.asp

    Best wishes
    Neil

    ---------------------------------------------------------------
    index.asp


          <%
          thisDatabase = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("mototone.mdb") & ";"
          response.ContentType = "text/vnd.wap.wml"
          Response.Buffer = True
     
          set thisConn = Server.CreateObject("ADODB.Connection")
          thisConn.Open thisDatabase
          %>
          
    <?xml version="1.0"?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
    <wml>
    <card id="start" title="Welcome">
    <p align="center">MOTOTONE</p>

          <%
          strsql = "select * from [Type] ORDER BY [Type]"
          set rs = Server.CreateObject("ADODB.Recordset")
          rs.Open strsql, thisConn, 1, 2
          'totalRecs = rs.RecordCount
          %>
    <p>
    <small>
          <%
          if rs.EOF then
          response.write "No Data"
          else
          Do While (NOT rs.EOF)
          %>
                <%
                strsqlCount = "select [ItemID] from [Item] WHERE Type=" & rs("TypeID")
                set rsCount = Server.CreateObject("ADODB.Recordset")
                rsCount.Open strsqlCount, thisConn, 1, 2
                totalRecs = rsCount.RecordCount      
                rsCount.Close
                Set rsCount = Nothing
                %>      
    <a href="category.asp?cat=<% response.write rs("TypeID") %>"><% response.write rs("Type") %> (<% response.write totalRecs %>)</a>
    <br/>
          <%
          rs.MoveNext
          Loop
          end if
          %>
    </small>
    </p>
          <%
          ' Close recordset and connection
          rs.Close
          Set rs = Nothing
          %>
          
    <p>
    <a href="search.asp">Search</a>
    </p>
    </card>
    </wml>


          <%
          thisConn.Close
          Set thisConn = Nothing
          %>




    ------------------------------------------------------------
    search.asp

    <% response.ContentType = "text/vnd.wap.wml" %>
    <?xml version="1.0"?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
    <wml>
          <card id="Search" title="MOTOTONE" newcontext="true">
          
          <p align="center"><small>Search For:</small></p>
                <p align="center"><input name="Query"/></p>
                <do type="accept" label="Go">
                      <go href="searchResults.asp?value=$(Query)" />
                </do>
          </card>
    </wml>


    -----------------------------------------------------------

    searchResults.asp

          <%
          thisDatabase = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("mototone.mdb") & ";"
          response.ContentType = "text/vnd.wap.wml"
          Response.Buffer = True
          searchCriteria = Request.QueryString("value")      
          set thisConn = Server.CreateObject("ADODB.Connection")
          thisConn.Open thisDatabase
          strsql = "select * from [Item] WHERE [Title] LIKE '%" & searchCriteria & "%' ORDER BY Title"
          set rs = Server.CreateObject("ADODB.Recordset")
          rs.Open strsql, thisConn, 1, 2
          totalRecs = rs.RecordCount
          %>
    <?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
    <wml>
    <card id="SearchResults">
    <p align="center"><small>mototone</small></p>
    <p align="center"><b>R E S U L T S</b><br/></p>      
    <p>
    <small>
          <%
          if rs.EOF then
          response.write "No match for " & searchCriteria
          else
          Do While (NOT rs.EOF)
          %>
    <a href="<% response.write rs("DownloadLink") %>"><% response.write rs("Title") %></a>
    <br/>
    <br/>
          <%
          rs.MoveNext
          Loop
          end if
          %>
    </small>
    </p>
    </card>
    </wml>
          <%
          rs.Close
          Set rs = Nothing
          thisConn.Close
          Set thisConn = Nothing
          %>


    -------------------------------------------------------------------------------

    category.asp


          <%       
          thisDatabase = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("mototone.mdb") & ";"
          response.ContentType = "text/vnd.wap.wml"
          Response.Buffer = True      
          cat = request.querystring("cat")
          set thisConn = Server.CreateObject("ADODB.Connection")
          thisConn.Open thisDatabase
          %>      
    <?xml version="1.0"?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
    <wml>
    <card id="select" title="Welcome">
    <p align="center">MOTOTONE</p>
          <%
          strsql = "select * from [Item] WHERE Type=" & cat
          'response.write strsql
          set rs = Server.CreateObject("ADODB.Recordset")
          rs.Open strsql, thisConn, 1, 2
          %>
    <p>
    <small>
          <%
          if rs.EOF then
          response.write "No results for " & cat
          else
          Do While (NOT rs.EOF)
          %>                  
    <a href="<% response.write rs("DownloadLink") %>"><% response.write rs("Title") %></a>
    <br/>
          <%
          rs.MoveNext
          Loop
          end if
          %>
    </small>
    </p>
          <%
          ' Close recordset and connection
          rs.Close
          Set rs = Nothing
          %>
    </card>
    </wml>
          <%
          thisConn.Close
          Set thisConn = Nothing
          %>










     

    by: MiamiDolphinsPosted on 2003-11-12 at 15:30:15ID: 9735759

    Neil you are an genius


    thanks

    20120131-EE-VQP-002

    3 Ways to Join

    30-Day Free Trial

    The Experts

    98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

    He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

    The Experts

    97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

    The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

    Testimonials

    "...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

    Testimonials

    "I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

    Testimonials

    "WOW! You guys have great, active, and knowledgeable people on here." moore50

    Business Clients

    Business Clients

    In the Press

    "If you’ve got a question... Experts Exchange can supply an answer.”

    In the Press

    "...an invaluable aid for both IT professionals and those who require tech support."

    In the Press

    "where IT professionals provide quick answers on just about any topic"

    Business Account Plans

    Loading Advertisement...