Ask a Question related to ASP Database, Design and Development.
-
DB Connection :: Global.use vs .Inc file?
I am adapting a login script to suite my specific purposes by require
guideance on best practice with regards the following:
Should I be initiating the database connection in the global.asa or via the
existing database include file I have at the moment....
My current database utitliy include allows my to grab the file but I am
wondering if it makes sense to dispense with this segment of the code and
place
it in the global.aso....See below
function GetConnection()
const DSN = "V032U10DUW"
const UID = "V032U10DUW"
const PASSWORD = "cU3QmtgDyzWX"
Dim p_oConn, sDSN
Set p_oConn = server.createObject("ADODB.Connection")
'//sDSN = "DSN=" & DSN & ";uid=" & UID & ";password=" & PASSWORD
'//sDSN.open = "driver={SQL
Server};server=MAXSQL00?.maximumasp.com;DB=yourSQL DBName;UID=yourSQLLogin;PW
D=YourSQLPassword"
p_oConn.open "driver={SQL
Server};server=MAXSQL008.maximumasp.com;DB=V032U10 DUW;UID=V032U10DUW;PWD=cU3
QmtgDyzWX"
Set GetConnection = p_oConn
end function
function GetStoredProcedure(oConnection, sName)
Dim oCmd
Set oCmd = Server.createobject("ADODB.Command")
Set oCmd.ActiveConnection = oConn
oCmd.CommandText = sName
oCmd.CommandType = adCmdStoredProc
Set GetStoredProcedure = oCmd
end function
Guest
-
global security - with NO internet connection?
just upgraded my machine that has no internet connection to flash 8- I double clicked on my tried and true .swf file, developed in 7.2 - and it... -
global.asa file
I want to use a query to active directory that holds a user name, group role and group region and stores those values as session variables in the... -
Can I open a database connection in my GLOBAL.ASA file?
Can I use my GLOBAL.ASA file to open a database connection before each page loads? Would someone mind posting a very simple example? I tried to... -
Question about Global.asa file
Terry Murray wrote on 09 aug 2003 in microsoft.public.inetserver.asp.db: No -- Evertjan. The Netherlands. (Please change the x'es to dots in... -
Is it bad to have a large GLOBAL.ASA file?
It seems to me that I generally use two types of Functions: Type #1-Ones that any page on my site might use Type #2-Ones that only a single page... -
Bob Barrows [MVP] #2
Re: DB Connection :: Global.use vs .Inc file?
[email]jason@catamaranco.com[/email] wrote:
[url]http://www.aspfaq.com/show.asp?id=2053[/url]> I am adapting a login script to suite my specific purposes by require
> guideance on best practice with regards the following:
>
> Should I be initiating the database connection in the global.asa or
> via the existing database include file I have at the moment....
>
> My current database utitliy include allows my to grab the file but I
> am wondering if it makes sense to dispense with this segment of the
> code and place
> it in the global.aso....See below
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Bob Barrows [MVP] Guest



Reply With Quote

