Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Mobile
  4. A Wml question

A Wml question

Scheduled Pinned Locked Moved Mobile
databasehelpsysadmintutorialquestion
1 Posts 1 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DamienL
    wrote on last edited by
    #1

    Hi all, Please help In my first card I ask for 3 user inputs. Where you want to start and end your journey and a time you want to travel after, in the format 12:25Enter Start Station Enter Destination Station Enter Time _The problem________________________________________________ In my second card I want to connect to a database in MicroSoft Access and use these variables in an Sql statement. I don't know the correct syntax for connecting to the database or for using the variables in my Sql statement. The Sql statement is incomplete, I just want to know how to use variables within it, setting them equal to something and saying something > $variable ________________________________ <% Dim SqlJunk 'Create a connection odject Set dbGlobalWeb = Server.CreateObject("ADODB.Connection") 'Database connection info and driver rsGlobalWeb = "DRIVER={Microsoft Access Driver (*.mdb)};uid=; DBQ=" & Server.MapPath("\.....\database.mdb") 'Set an active connection to the Connection object dbGlobalWeb.Open rsGlobalWeb SqlJunk = "SELECT Start.StationName AS Start, Start.Time AS JourneyTime, Destination.StationName AS End FROM Station AS Start, Station AS End, Time AS JourneyTime WHERE Start.StationName LIKE '%" & $Start & "%' AND Destination.Station LIKE '%" & $End & "%' AND Start.Time > #" & $Statement & "#" Set rsGlobalWeb = Server.CreateObject("ADODB.Recordset") rsGlobalWeb.Open SqlJunk, dbGlobalWeb, 3 'Now I must display the results <%=rsGlobalWeb("Start")%> <%=rsGlobalWeb("JourneyTime")%> <%=rsGlobalWeb("End")%> %> Damien

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups