homepage Welcome to WebmasterWorld Guest from 54.242.200.172
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
Forum Library, Charter, Moderators: phranque

Website Technology Issues Forum

    
ASP how to select a specific record from a recordset
topr8




msg:671583
 8:05 pm on Aug 21, 2002 (gmt 0)

the basic situation is that i have a recordset of 8 products...
i don't want to display them down the page in tabular method as usual, but i want them to appear according to my specific layout (i'm drawing pic url, price, in/out of stock from the db) this can't be a static page as although i always want to show the same products in the same way - the price and the availablity changes on a regular basis.

surely i must be able to get the data from the record set and associate the correct record with each item on the page.

alternatively i thought of creating a page/script that would write to a file (in this case html) when the database is updated (daily) this way it could be a "static" page but that was dynamically written each night when the database is updated.

any thoughts or alternative asp gratefully recieved

 

txbakers




msg:671584
 8:15 pm on Aug 21, 2002 (gmt 0)

You can do what you want without difficulty. Are you using javascript or VBscript for your ASP code?

There is a great site with tons of tutorials on ASP: www.w3schools.com

But there are so many variables in getting the data. What type of database are you connecting to? Were you able to get all your data loaded?

There are lots of folks here who can help with ASP.

topr8




msg:671585
 8:33 pm on Aug 21, 2002 (gmt 0)

>>>Are you using javascript or VBscript for your ASP code?

i'm using vbscript

>>>There is a great site with tons of tutorials on ASP: www.w3schools.com

great am very happy to dive in, i'm proficient with ultradev but beyond that my hand tweaking skills are at a basic level but am willing to get down 'n dirty ... just need a bit of a pointer as to what kind of tutorial to look for
is this to do with the command object??

>>>What type of database are you connecting to? Were you able to get all your data loaded?

connecting to an access db, not sure what you mean by "Were you able to get all your data loaded?"

thanks

txbakers




msg:671586
 2:45 am on Aug 22, 2002 (gmt 0)

In VBScript it's easy to capture a particular data row item. Here is a little bit of code that opens the connection, reads the data, and sets a value:
<%
dim code
code = Session("schoolcode")
Set RSEVENT = Server.CreateObject("ADODB.RecordSet")
RSEVENT.Open "SELECT * FROM CalEvents where schcode='" & code & "'", Conn, 1, 3
%>

RSEVENT("eDate")

This shows the contents of the DB field "eDate" on the web page.

Ultradev is a great way to get started, but take some time and study the code so you know what is going on. Pretty soon you'll be able to hand code (cut and paste) what you need to do. The DW code tends to be very bloaty. I especially dislike the way they handle the delete command. About 75 lines of code when all you need is about 5.

Take some time with w3schools.com and have fun with it!

topr8




msg:671587
 10:27 am on Aug 23, 2002 (gmt 0)

thanks for the pointers txbakers ...

so much to do, so little time !

uk_dokey




msg:671588
 2:38 am on Aug 26, 2002 (gmt 0)

Hi topr8

You need to research the following at W3schools in this order fi possible.

vbscript a few hours should do
asp a few hours again
then ADO very important.

Hope this helps if you need more help could I suggest pacosdrivers.com they have some free scripts that you can take apart. I found this useful to make all the stuff I leant from w3schools click together.

Good Luck

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved