Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: Re: dbase search


Message #1 by "charles" <charles@l...> on Sun, 2 Jun 2002 20:51:53 +0100
Hi Charles,

I still don't quit get what you are trying to accomplish with the inc file 
(I am a bit slow today; very tired and a little hang over that just doesn't 
want to go away ;-) )

What I think you should do is put your code inside a function in an include 
file. That would allow you to reuse existing code, while you are still able 
to alter it.

Example:

Private Function BuildTable(ByVal sQueryName, ByVal, iNumOfRecords, ByVal 
sCSSAttributes)
     ' Implementation here
End Function

Suppose this function builds an HTML table based on the query sQueryName, 
shows the number of records as defined by iNumOfRecords and has certain CSS 
style attributes set.

Then in your page, include the file with the standard include file 
mechanism. The function in the include file is then within the scope of the 
page, so you can call it like this:

BuildTable "qryGetAthletesByName", 25, "background-color : green"

or, when the needs are different, like this

BuildTable "qryGetAthletesByScore", 10, ""


This way, you only have to code once, while you still can display different 
kinds of queries with different lay out.

Is this what you are looking for?



Imar




At 08:51 PM 6/2/2002 +0100, you wrote:
>Imar
>
>Thanks- it is now working with the new field for athlete fname- Thanks alot.
>
>Re hyperlinks. Ideally I would like to be able to create a hover button so
>when you highlight an athlete in the rankings/results, that athletes full
>details come up.The problem is creating the link to create a hyperlink form
>the rs of athlete surname and populate the text field with athletes deatils.
>Ultimately I am looking to have another db with details of club and d.o.b
>etc.
>
>So when the ranks come up you can move mouse over and have all
>detailss/results for that athlete come up. This will involve the frmsearch
>and a new dbase of details + another table of pb's , which exists and
>athletes upload to-tablepb.
>
>Presumbale it is just a question of writing the code for mouse over using js
>or vb and then populating it with the rs from the three tables- results,
>info and pb.
>
>The inc file problem is trying ti have one file too populate the asp.page
>that displays the rankings query. The ranking list drags info from the
>results table. I use a stored procedure(access query) and then use the asp
>page to display the results. Giventhe table of rankings I have , at the
>moment if I want to alter the rs display for the queries I ahve to alter
>every asp.page. If it was an include file then I would only , obviously have
>to aleter the one.



  Return to Index