Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Data source name not found

Reply
Thread Tools

Data source name not found

 
 
Otuatail
Guest
Posts: n/a
 
      12-05-2003
Can anyone help me with this database connection and an asp web page.
I am using Windows XP Professional with IIS added, Office 2000 and Visual
Studio 6 and using Internet Developer.
I have created a simple Access database and used ODBC in control pane. All I
have done is select a USER DSN and MS Access Database, and browsed to locate
it. No password has been created. I get the following error on line 6 which is
the "connection.Open dsn" line

----------------------------------
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

Technical Information (for support personnel)
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default
driver specified
/default.asp, line 6
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Page:
GET /default.asp

----------- Here is the Short Code -----------------
<%@ Language=VBScript %>
<%
dsn = "SampleDB"
Set connection = Server.CreateObject("ADODB.Connection")
Set rsResults = Server.CreateObject("ADODB.Recordset")
connection.Open dsn

sqlResults = "SELECT * FROM Tables"
rsResults.Open sqlResults, connection, 1, 3
%>
<HTML>
<BODY>
<FORM>

<%if rsResults.eof = false then
while rsResults.eof = false%>

<%=rsResults("Name")%>
<br>
<%rsResults.MoveNext
wend
end if%>

</FORM>
</BODY>
</HTML>

--------------------------------
Can anyone help this must be a simple error
TIA

Paul.

 
Reply With Quote
 
 
 
 
William Tasso
Guest
Posts: n/a
 
      12-06-2003
Otuatail wrote:
> Can anyone help me with this database connection and an asp web page.
> I am using Windows XP Professional with IIS added, Office 2000 and
> Visual Studio 6 and using Internet Developer.
> I have created a simple Access database and used ODBC in control
> pane. All I have done is select a USER DSN and MS Access Database,
> and browsed to locate it. No password has been created. I get the
> following error on line 6 which is the "connection.Open dsn" line
>
> ----------------------------------
> HTTP 500.100 - Internal Server Error - ASP error
> Internet Information Services
>
> Technical Information (for support personnel)
> Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
> [Microsoft][ODBC Driver Manager] Data source name not found and no
> default driver specified
> /default.asp, line 6
> ...
> Can anyone help this must be a simple error


Use ADO and dsnless connections instead of ODBC/DSNs
Ensure you have the correct path to the mdb.

--
William Tasso - http://WilliamTasso.com


 
Reply With Quote
 
 
 
 
Guest
Posts: n/a
 
      12-08-2003

"Otuatail" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Can anyone help me with this database connection and an asp web page.
> I am using Windows XP Professional with IIS added, Office 2000 and Visual
> Studio 6 and using Internet Developer.
> I have created a simple Access database and used ODBC in control pane. All

I
> have done is select a USER DSN and MS Access Database, and browsed to

locate
> it. No password has been created. I get the following error on line 6

which is
> the "connection.Open dsn" line
>
> ----------------------------------
> HTTP 500.100 - Internal Server Error - ASP error
> Internet Information Services
>
> Technical Information (for support personnel)
> Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
> [Microsoft][ODBC Driver Manager] Data source name not found and no default
> driver specified
> /default.asp, line 6
> Browser Type:
> Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
> Page:
> GET /default.asp
>
> ----------- Here is the Short Code -----------------
> <%@ Language=VBScript %>
> <%
> dsn = "SampleDB"
> Set connection = Server.CreateObject("ADODB.Connection")
> Set rsResults = Server.CreateObject("ADODB.Recordset")
> connection.Open dsn
>
> sqlResults = "SELECT * FROM Tables"
> rsResults.Open sqlResults, connection, 1, 3
> %>
> <HTML>
> <BODY>
> <FORM>
>
> <%if rsResults.eof = false then
> while rsResults.eof = false%>
>
> <%=rsResults("Name")%>
> <br>
> <%rsResults.MoveNext
> wend
> end if%>
>
> </FORM>
> </BODY>
> </HTML>
>
> --------------------------------
> Can anyone help this must be a simple error
> TIA
>
> Paul.
>


I haven't played around with the Microsoft web servers in a long time, but
it seems like I used to use the System DSNs





 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Source Name Not Found zach Software 0 08-11-2007 10:25 AM
HELP! File name or class name not found during Automation operation Victoria Chin ASP General 1 09-17-2003 04:43 PM
RE: ODBC to Oracle (data source name not found) Bob Gailer Python 0 07-21-2003 01:50 PM
ODBC to Oracle (data source name not found) Michael J. Moore Python 0 07-21-2003 04:23 AM
Re: ERROR: Data source name not found... Please help... George Ter-Saakov ASP .Net 0 06-26-2003 06:41 PM



Advertisments