|
 |
asp_web_howto thread: DSN/ODBC
Message #1 by jfoust@n... on Tue, 23 Jan 2001 17:45:24 -0000
|
|
I have a quick question. The network Admin guys at my work don't like us
asking them to create DSN's all the time for database work. Is there a
way to do this through code without having to rely on OLEDB?
Message #2 by "TomMallard" <mallard@s...> on Tue, 23 Jan 2001 10:32:48 -0800
|
|
Have you tried user dsn's created from your workstation's ODBC tool? Do you
have an ODBC tool? If not they should install an ODBC client for you to use.
tom mallard
seattle
Message #3 by Ankur Kalsi <AnkurK@n...> on Tue, 23 Jan 2001 10:27:00 -0800
|
|
Yes, you can create DSN-Less connection.
There are some examples on http://www.4guysfromrolla.com/
Ankur K
Message #4 by Roger Balliger <Roger@i...> on Tue, 23 Jan 2001 10:45:57 -0800
|
|
You could try the server.mappath function to map a direct path to the
database file.
If you need info, the following link may help:
http://www.asp101.com/samples/viewasp.asp?file=database%2Easp
Roger
Message #5 by "O'Hara, Elliott M" <EMOHARA@k...> on Tue, 23 Jan 2001 14:01:21 -0500
|
|
Sure is
Try this
Set oConn = Server.CreateObject("ADODB.Connection")
strConn = "driver={SQL Server};server=Yourserver ;uid=yourid
;pwd=yourpass ;database=yourdatabase"
oConn.Open strConn
Elliott
Message #6 by "Gerhard Wentink" <wentink@w...> on Wed, 24 Jan 2001 06:59:32 +0100
|
|
You can use a DSN-less connection with oledb
For Access:
strConnection="Provider=Microsoft.jet.OLEDB.4.0; Data
Source=full_path_to_the_database"
For SQL-server
strConnection="Provider=SQLOLEDB; Data Sorce=server_name; Initial
Catalog=database_name; User Id=user_name;Password=user_password"
open a connection with ADO like this:
objConn.Open strConnection
Gerhard Wentink
wentink@w...
www.webset.nl
----- Original Message -----
From: <jfoust@n...>
To: "ASP Web HowTo" <asp_web_howto@p...>
Sent: Tuesday, January 23, 2001 6:45 PM
Subject: [asp_web_howto] DSN/ODBC
> I have a quick question. The network Admin guys at my work don't like us
> asking them to create DSN's all the time for database work. Is there a
> way to do this through code without having to rely on OLEDB?
>
Message #7 by David Hemingway <DavidH@i...> on Wed, 24 Jan 2001 10:33:36 -0000
|
|
You can use code like this to open a connect to a SQL server database,
set objConn = server.createobject("ADODB.Connection")
strConn = "Provider=SQLOLEDB; Data Source=SQLBox; Initial Catalog=database;"
& _
"User ID=sa; Password=pwdword; "
objConn.open strConn
this define the type of database your connection to 'Provider=SQLOLEDB'
this is the name of the database server your connecting to 'Data
Source=SQLBox'
this is the database name 'Initial Catalog=database'
this is the user name and password that you setup to access the database
'User ID=sa; Password=pwdword;'
Good Luck
David
-----Original Message-----
From: jfoust@n... [mailto:jfoust@n...]
Sent: 23 January 2001 17:45
To: ASP Web HowTo
Subject: [asp_web_howto] DSN/ODBC
I have a quick question. The network Admin guys at my work don't like us
asking them to create DSN's all the time for database work. Is there a
way to do this through code without having to rely on OLEDB?
Message #8 by "Drew, Ron" <RDrew@B...> on Fri, 26 Jan 2001 14:41:51 -0500
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C087D0.078E5690
Content-Type: text/plain;
charset="windows-1252"
We also use the workstation...Start, Settings, Control Panel, ODBC-32 and
NEW. Pick the SQL driver and enter approximately 5 easy screens (most of
which you use the defaults). Network Admin is only needed for setting up
the userids and password on the sql database if you choose or connect using
the domain userid/password.
Good Luck
-----Original Message-----
From: TomMallard [mailto:mallard@s...]
Sent: Tuesday, January 23, 2001 1:33 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Re: DSN/ODBC
Have you tried user dsn's created from your workstation's ODBC tool? Do you
have an ODBC tool? If not they should install an ODBC client for you to use.
tom mallard
seattle
---
MaximumASP offers enhanced hosting solutions on the Windows 2000 platform.
Dedicated processor, RAM, and server resources provide dedicated server
performance at virtual server prices. Commercial components provided; custom
components allowed.
$subst('Email.Unsub')
|
|
 |