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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to a database (SQL Server 7.0)

Status
Not open for further replies.

computergeek

Programmer
May 23, 2001
193
CA
Hello,

I am fairly new to using Interdev, and I am having trouble establishing a connection to the database. Am I required to setup an ODBC connection? I hope not this is going to be an Internet application. Error:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/VMISYSTEM/Navigation.asp, line 27

Navigation.asp File:
' create and open the Connection object
Set dbUser = Server.CreateObject("ADODB.Connection")
dbUser.Open Session("Conn1_ConnectionString"), _
Session("Conn1_RuntimeUserName"), _
Session("Conn1_RuntimePassword")

Global.asp file:
Sub Application_OnStart
'==Visual InterDev Generated - startspan==
'--Project Data Connection
Application("Conn1_ConnectionString") = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=Sensys;Data Source=KCDEVSQL7;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=userx;"
Application("Conn1_ConnectionTimeout") = 15
Application("Conn1_CommandTimeout") = 30
Application("Conn1_CursorLocation") = 3
Application("Conn1_RuntimeUserName") = "sa"
Application("Conn1_RuntimePassword") = ""
'-- Project Data Environment
'Set DE = Server.CreateObject("DERuntime.DERuntime")
'Application("DE") = DE.Load(Server.MapPath("Global.ASA"), "_private/DataEnvironment/DataEnvironment.asa")
'==Visual InterDev Generated - endspan==
End Sub


 
Hi,

I figured out that my Global.asa file is not firing... why I don't know yet.

 
Hi,

It's firing on the Master not within the local mode. I am using OLE not ODBC, so a DSN is not required. Still have not figured out why the local global.asa is not firing... for a testing work-around I am running the master mode copy after I have "released the working copy" to the master.

I have tried a few things...with no luck!

 
There should only be 1 global.asa, and it should be in the application root directory. I would be very surprised if it is not called...

Please note, your connection stuff in the page code uses SESSION but global.asa uses APPLICATION.

Use a recordsetDTC - even if you dump the dtc, it generates the correct code for you. (Content Management)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top