|
|
|
|
|
| | |
|
PowerASP active server pages asp.net microsoft .net framework sdk learn asp what is asp tutorial learn asp.net CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
returning a database connection from a function |
From: |
Shane Hansen |
Date: |
3/29/2001 2:11:01 PM |
IP: |
129.123.233.97 |
I would like to return a database connection from a function to be used by many other functions. I am not very familiar with objects in vb. Does anyone see what I am doing wrong here?
function connect(dbName)
'this function returns a connection to the database passed in
dim dbConn
set dbConn=Server.CreateObject("ADODB.Connection")
dbConn.Open"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("..\database\" & dbName)
connect=dbConn
end function
|
|
|
|
|
|
|
|
|
|
|
|
|