snaayk
Senior Member
USA
1061 Posts |
Posted - 29 October 2001 : 14:41:49
|
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
|
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 |
|
|