Forum Moderators: phranque

Message Too Old, No Replies

Database Quick Search

         

shearder

9:43 am on Jan 22, 2004 (gmt 0)

10+ Year Member



Hi All

A little help if I may be so bold as to request such. lol

I have a database, which Ican integrate and use on the web. I can list contents and I an search its contents. However, here is the question. I don't want to show all the pictures associated with a record. I want the person to be able to click on, for example, the primary key, which should be as a hyperlink but should click through to another ASP page which uses the information from the search result list and opens ONLY that item in a full page view. Now, getting a hyperlink is easy, but how do I use it to "refine" the search to only that item which would then open a result page with ONLY that record and its picture.

I hope i have made some sense here.

Thanks again.

Sean

vrtlw

10:19 am on Jan 22, 2004 (gmt 0)

10+ Year Member



Shearder,

Not quite enough info, please elaborate/explain a little better (or clearer).

Paul

shearder

9:16 am on Jan 23, 2004 (gmt 0)

10+ Year Member



I have a database which has Names, Surnames, ID Numbers, Industry ID Numbers etc and pictures of the technicians. Now, if a client wants to verify that a technician has a valid qualification and Industry Number he can do a search for, example, a surname i.e. Jones.

When the ASP page returns the search results, it will have, perhaps more than one 'Jones'. The search results page may have Name, Surname and Industry Number returned with say 3 possible people. In the search results it shows all records BUT the industry numbers shown are different and shown as a hyperlink. I want the person to be able to click the industry number of ONE of the results and this will open another results page but with ONLY that person's details, from the database, showing all info including the picture etc.

Please tell me that is clearer. :-)

txbakers

12:32 pm on Jan 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



first query:

var rsUniParts = Server.CreateObject("ADODB.Recordset");
rsUniParts.ActiveConnection = MM_connCharms_STRINGSQL;
rsUniParts.Source = "SELECT UniformItem FROM UniformParts WHERE schCode = '"+ scode + "' ORDER BY UniformItem ASC";
rsUniParts.CursorType = 0;
rsUniParts.CursorLocation = 2;
rsUniParts.LockType = 3;
rsUniParts.Open();

second query:
var rsUniitems = Server.CreateObject("ADODB.Recordset");
rsUniitems.ActiveConnection = MM_connCharms_STRINGSQL;
rsUniitems.Source = "SELECT itemno, size, condition,rrn FROM UniformDetail WHERE SchCode = '"+ scode + "' and UniformItem = '" + unitype + "' and (assignedto = 'x' or assignedto is null) ORDER BY itemno ASC";
rsUniitems.CursorType = 0;
rsUniitems.CursorLocation = 2;
rsUniitems.LockType = 3;
rsUniitems.Open();

The first query brings back all, the second query takes a vale returned from the first query and passes it to the second.

shearder

9:03 am on Jan 26, 2004 (gmt 0)

10+ Year Member



Hi txbakers, First - Thanks for the reply, now i don't want to appear dumb as sh1t but, how do i use the above in a web page. what do i need to modify to use with my database etc? Do i use it in an ASP page?

I also guess i didn't mention it was an Access Database!

Thanks in advance and sorry for being so "dumb"

txbakers

1:26 pm on Jan 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you don't understand the above code, you need to get a rudimentary working knowledge of ASP.

Go visit www.w3schools.com and study up on ASP techniques, build some simple pages, connect to your Access database and "get your feet wet".

Then come back and look at what I posted, it should make more sense then.

To try and teach ASP in a forum would be difficult.