|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
asp to access query
ok, im using flash for this but all as it does it pass a variable,
anyway, ims tuck on this, how can i get the variable that flash passes to enter into a search query in access? u know i'll set up the query in access to search for "name" but i cant figure how to get the variable from outside access to get it into the query to display the required results u get me? thanks Slinky |
|
#2
|
|||
|
|||
|
I'm not clear exactly what you're asking, so I can't give you a good answer yet.
Could you post the specific query you're using? That might help me understand the question. Charlie |
|
#3
|
|||
|
|||
|
ok, sorry,
ive some asp code that writes out data from a database to an asp page seperating each entry with a * like this: http://imdasp.infj.ulst.ac.uk/stefa..._4/get_vars.asp anyway this is straight from a table, and then flash just picks up the data and seperates then displays it like here: http://imdasp.infj.ulst.ac.uk/stefa...j_scroller.html what im asking, even just do it in html so it'll output the code like this is , I want the user to input some data into a field, say a name and search through a set data field and out put the data like this, so then i can do the same in flash, u get me now mate?t dont know how, |
|
#4
|
|||
|
|||
|
see this is what ive set up already:
http://imdasp.infj.ulst.ac.uk/stefa...ame_search.html but its not right, all as it does it sort names, in an ideal world i could set up a query inside access, u know using a wizard and when the user enters a name or whatever into the search box it would enter their inputed "data" into the criteria box of access so it'll display the data when run like the page above with the *'s hope this helps mate! |
|
#5
|
|||
|
|||
|
Stored Queries On An ASP Page Using MS Access And VBScript
This article will get you started:
http://stardeveloper.com:8080/artic...01050101&page=1 But the approach described is a little limited. You wouldn't want to pass more than two or three parameters using this technique. For a more "heavy duty" approach, read this article: http://msdn.microsoft.com/library/d.../adocreateq.asp You'll find more articles and sample code here: http://www.aspin.com/home/tutorial/database/storedpr It's not exactly simple, but it's well worth learning how to do. It's more efficient -- if you create a separate function for each stored query you call, it makes your main code more manageable -- and it's complete protection against SQL injection attacks. |
|
#6
|
|||
|
|||
|
this looks liek what im tryin to get,
i'll let u know how i get on, cheers mate |
|
#7
|
|||
|
|||
|
i cant get my head around this,
i'll make this simpler, how can i enter a "search name" into a field on a html page that searches in a table called "people" into a name called "name" and displays the data like this http://imdasp.infj.ulst.ac.uk/stefa..._4/get_vars.asp heres my code for this page: Code:
<%
set dj = Server.CreateObject("ADODB.Recordset")
strconn="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="
strconn=strconn & server.mappath("data.mdb") & ";"
dj.ActiveConnection = strconn
dj.Source = "SELECT * FROM people_order"
dj.Open()
response.write "data="
while not (dj.eof)
response.write (dj.Fields.Item("name").Value)
response.write "*"
response.write (dj.fields.Item("info").Value)
response.write "*"
response.write (dj.fields.Item("style").Value)
response.write "*"
response.write (dj.fields.Item("bpm").Value)
response.write "*"
response.write (dj.fields.Item("p_res").Value)
response.write "*"
response.write (dj.fields.Item("c_res").Value)
response.write "*"
response.write (dj.fields.Item("g_spot").Value)
response.write "*"
response.write (dj.fields.Item("l_set").Value)
response.write "*"
response.write (dj.fields.Item("y_dj").Value)
response.write "*"
response.write (dj.fields.Item("f_rec").Value)
response.write "*"
response.write (dj.fields.Item("f_ven").Value)
response.write "*"
response.write (dj.fields.Item("m_set").Value)
response.write "*"
response.write (dj.fields.Item("c_det").Value)
response.write "*"
response.write (dj.fields.Item("s_url").Value)
response.write "*"
response.write (dj.fields.Item("pic").Value)
response.write "*"
dj.movenext
wend
%>
|
|
#8
|
||||
|
||||
|
Make your Flash submit button redirects to a page with the name to search for as part of the URL
http://aaa.aaa.aaa/get_vars.asp?NAME=WhatTheUserEntered in the get_vars.asp page change the query to be "SELECT * FROM people_order WHERE name = '" & Request("NAME") & "'" "SELECT * FROM people_order WHERE name = single qoute double qoutes & Request("NAME") & double qoutes single qoutes double qoutes I think I mis-spelt qoutes I hope this is of any help |
|
#9
|
|||
|
|||
|
ah thanks mate, i know where your comin from!
ive sorta give up on it to tell you the truth, but i think if ive time in the next few days im gonna try this! cheers Slinky |
|
#10
|
||||
|
||||
|
Don't Give Up, it'll be worth it when it works!
- D# |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > asp to access query |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|