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!

DB Connection Help

Status
Not open for further replies.

SkiCheif

Technical User
Sep 8, 2004
30
US
I need some help filling in the blanks on this one...
I have been working on and testing a db on my home system and now am trying to move it to the web. I cannot get the connection string to work.

I am using an include file to set the informaiton and on my home system it works. I have been reading for three or for days and searching for this answer. Here's what I found out so far. IIS needs to have permissions set to make it work, and I was able to do that with my web hosting companies help. The database resides on the web server and you need to call it using a string that points it in the right directions and tells it what type of 'call' it is making.

I think that the problem lies in the connection location according to the error messages that I get

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

/login.asp, line 14

Here is the code information that I am using:
This resides in an include file:
<!--#include file="../Connections/TestConnection.asp" -->
Code:
<%
' FileName="E:\kunden\homepages\25\d113674742\Seed.mdb"
' Type="ADO" 
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_TestConnection_STRING
MM_TestConnection_STRING = "dsn=firstname;"
%>


Here is a sample of the page connecting:

Code:
<%
Dim WrestlerName
Dim WrestlerName_numRows

Set WrestlerName = Server.CreateObject("ADODB.Recordset")
WrestlerName.ActiveConnection = MM_TestConnection_STRING
WrestlerName.Source = "SELECT Wrestler_Name FROM tbl_Wrestling_Roster ORDER BY Last_Name ASC"
WrestlerName.CursorType = 0
WrestlerName.CursorLocation = 2
WrestlerName.LockType = 1
WrestlerName.Open()

As I said before I really think that the error is in the path. Note that in the include file there is a path that was given to me by the webhost.


FileName="E:\kunden\homepages\25\d113674742\Seed.mdb"

I have tried every variation to see if I could get lucky, but now I am just frustrated and out of ideas.

In my research on the topic I see that there are many ways to do this, but on clearly said in [red]Red Bold Letters[/red] that this was the preferred way to do it for speed and overhead.

Is there a general rule to the path information? Am I including too much when I state the providers Drive letters and file structure? If I could nail that down then I could test more accurately and 'maybe still get lucky'

Seems so silly that this seems so difficult.


Thanks for any help,
SkiChief
 
There is an ASP forum on tek-tips which is the best place to post this question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top