Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC Connection problems

Status
Not open for further replies.

princessk1

Programmer
Feb 28, 2002
74
CA
I am trying to set up an ODBC connection but am having problems with the syntax. Does any one have any sample code for this? Thanks.
 
Here is one way, using a DSN-Less Connection -
This one is for Oracle but general syntax is the same for most..
Code:
<%
Dim objDC, objRS
' Create and establish data connection
Set objDC = Server.CreateObject(&quot;ADODB.Connection&quot;)
objDC.ConnectionTimeout = 15
objDC.CommandTimeout = 30

'Code to connect to Oracle Warehouse
 objDC.Open &quot;Provider=MSDAORA.1;Password=yourpass;User ID=yourid;Data Source=tnsnamesentryhere;Persist Security Info=TRUE&quot;
%>

hth
[profile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top