Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Recordsets
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

snaayk
Senior Member

USA
1061 Posts

Posted - 29 October 2001 :  14:41:49  Show Profile  Visit snaayk's Homepage  Send snaayk an AOL message  Send snaayk an ICQ Message  Send snaayk a Yahoo! Message
I use UltraDev for most of my dynamic web pages. However UD creates a lot of things that seems like its too much.

For Example, I created a page where the 5 most recent posts from a forum (a hidden forum called News) and displays them for the home page. Now, UD will create the recordset and some other stuff. Then to display the info it does something like:

<% news.value.fieldname.item %> or something like that.
It also uses its own connection string.

I have config.asp and inc_top.asp on every page of my site. Sice the inc_top opens the connection string to the DB, I would like to use that to create the dynamic info..

Now what is the proper way to pull the info from the DB and then dispay? The snitz code looks more simple than UD and stuff that I have read on other sites.

I am thinking something like:

<%
strsql = "Select field2,field2,field3 FROM tablename WHERE whateverfield = something"
%>

How would I then Display it....


Is that more or less it...Anywhere you could point me to help me out

********************
We all have photographic memories, some just don't have film.

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 29 October 2001 :  14:47:55  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
strsql = "SELECT FIELD1, FIELD2 FROM TABLE WHERE THIS=THAT ORDER BY THIS"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.CursorLocation = 3
rs.Open strsql, my_conn
rs.PageSize = 5 'number of topics to show
if not(rs.eof) then
rs.Absolutepage = 1
'show the stuff here
else
'do whatever
end if
rs.close
set rs = nothing

---------------
Da_Stimulator has spoken
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.26 seconds. Powered By: Snitz Forums 2000 Version 3.4.07