Is coded needed on every page?
Hi,
I have several ASp pages which need to call the SQL server.
Do I need to put on every ASP page the next code?
In the begin of the page:
===
Set conn = server.createobject("adodb.connection")
conn.open "DSN=FARMA"
set rs = server.createobject("adodb.recordset")
===
At the end after the SQL is executed
===
rs.Close
Conn.Close
Set rs=Nothing
Set Conn=Nothing
===
Or is it better to put it into an .INC file and just include it
in the beginning?
I am asking this because I have the code everytime I do an SQL sequence to get data from th DB, but I guess it is slowing down the speed of the pages when you want to see them, correct?
Please push me in the right direction,
David
|