Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subroutine passing database record

Status
Not open for further replies.

apex82

Programmer
Mar 2, 2009
127
GB
Hi,

I have an asp page which I can view a database record. At the moment to view I’m viewing the database record via a page through an iframe. This page opens the database and displays the details:

Code:
Response.Write "<span class='form'>" & "<strong>" & obj_RS1("Engine size") & "<strong>" & "</span>"

Obviously I don’t want to do use an iframe! I want to be able to call the record through a subroutine.

Basically I figure I should be call a subroutine like this:

Code:
<% FindResult "Fiesta", "Ford" %>

Code:
<%
    Sub FindResult(Model,Make )
    ***	
    End Sub
%>

I don’t know what to include in the *** section above.
I don’t know where to go from here and I’ve been trying and searching for a long time. Can anyone help?

Thanks.
 
almost sounds like you are missing the minor bit of knowledge about ASP is that it's one way. almost sounds like you're wanting an active DB connection which needless to say is a pain.

for what oyu're trying to do though, you can remove the iframe and use tables or whatnot, basically you make a form for data searching, whether it contain text boxes, or list boxes... then another form for the actual data, which if submitted is handled and saved to the db.

alot of this information and how to's are in the faq section.

[thumbsup2]DreX
aKa - Robert
if all else fails, light it on fire and do the happy dance!
" I always think outside the 'box', because I'm never in the 'loop' " - DreX 2005
 
Basically if i add a querystring to the page address i can display the necessary information just like using an iframe so is it not possible to have a routine to do this for me?

Thanks.
 
usually when i do something of this nature it falls under 2 categories, single page or multi page.

single page is broken into a bunch of If/Else blocks and structurally it's something like this :
Code:
<action>
<saves><additions></additions></saves>
<deletions></deletions>
</action>
<search functions OR specific record identification>
boxes, types, also pulls the query string info to create the search strings to add to the DB retrieves
</search functions OR specific record identification>
<list display>
 links to individual records
</list display>
<single record display>
form(s) for editing
</single record display>

wrote it out psuedo xml style for generalization

multi page is basically the same thing, it's just the parts broken into seperate pages, usually used in the format of frames
example list is on left side, main editing are in the main content, main content posts to save page which handles all record handling, which may include a javascript refresh for the left frame in the case of deletions


but to answer your orginal question more definitively, yes, but theoptions are almost endless. depends on how the data environment is set up.

[thumbsup2]DreX
aKa - Robert
if all else fails, light it on fire and do the happy dance!
" I always think outside the 'box', because I'm never in the 'loop' " - DreX 2005
 
and the *** part of that sub would be using the connection, to query a recordset, and the sub returns the recordset for use

[thumbsup2]DreX
aKa - Robert
if all else fails, light it on fire and do the happy dance!
" I always think outside the 'box', because I'm never in the 'loop' " - DreX 2005
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top