473,386 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Strange Error

Hi,
I got an asp page in a test database which works fine first time it is
loaded. However, when I try to refresh the page, it gives me the following
error:

Provider (0x80004005) Unspecified error

Error in line 17

Incidentally, Line 17 is the following:
CN.Open myDSN

I appreciate any advise/help in advance.
CODE:
<%@ Language=VBScript %>
<!-- #include file="adovbs.inc" -->

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>Sailors Web Site</TITLE>
</HEAD>
<BODY>

<%
myDSN="DRIVER={Microsoft Access Driver (*.mdb)}; "
myDSN=myDSN & "DBQ=C:\____SAILORS\Sailors.mdb"

set CN=server.createobject("ADODB.Connection")
set RS=server.createobject("ADODB.Recordset")
CN.Open myDSN

RS.ActiveConnection=CN
SQL = "qAllClubs"

RS.Open SQL
%>
<DIV ALIGN=CENTER>
<BIG> <BIG><FONT COLOR=navy>Sailors Case Study</FONT></BIG></BIG>
</DIV>
<BR><BR>
<FORM ACTION=registrationconfirmation.asp method=POST NAME = frmRegister>
<TABLE>
<TR>
<TD HEIGHT=50 COLSPAN=2><FONT COLOR=navy>Registration Screen</FONT></TD>
</TR>

<TR>
<TD>First Name</TD>
<TD><INPUT TYPE=text NAME=txtFirstName SIZE=15></TD>
<TD><WIDTH=100></TD>
<TD>&nbsp;</TD>
<TD>Last Name</TD>
<TD><INPUT TYPE=text NAME=txtLastName SIZE=15></TD>
</TR>

<TR>
<TD>State</TD>
<TD><INPUT TYPE=text NAME=txtState SIZE=2></TD>
<TD> <WIDTH=50></TD>
<TD> </TD>
<TD>Date of Birth</TD>
<TD><INPUT TYPE=text NAME=txtDateofBirth SIZE=8></TD>
</TR>

<TR>
<TD>Referee</TD>
<TD><INPUT TYPE=checkbox NAME=chkReferee VALUE=1></TD>
</TR>

<TR>
<TD>Professional Class</TD>
<TD COLSPAN=4>
<INPUT TYPE=radio NAME=optClass VALUE=1 checked>Professional
<INPUT TYPE=radio NAME=optClass VALUE=2>Ranked Amateur
<INPUT TYPE=radio NAME=optClass VALUE=3>Other
</TD>
</TR>

<TR>
<TD>Club Name</TD>
<TD COLSPAN=3>
<SELECT NAME="lstClubs" SIZE = "1">
<%
Do while Not RS.EOF
Response.Write "<OPTION VALUE='" &RS("clubname") & "'>"
Response.Write RS("clubname") & "</OPTION>"
RS.MoveNext
Loop
RS.Close
Set RS = Nothing
%>
</SELECT></TD>
</TR>

<TR>
<TD>&nbsp;</TD>
</TR>

<TR>
<TD><INPUT TYPE=button NAME=btnSubmit VALUE=Submit></TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
Jul 21 '05 #1
1 1186
> Provider (0x80004005) Unspecified error
Error in line 17


Stop using ODBC. Stop using ADOVBS.Inc. And stop using ADODB.Recordset.

<HTML>
<HEAD><TITLE>Sailors Web Site</TITLE></HEAD>
<BODY>

<%
myDSN="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\____SAILORS\Sailors.mdb"
set conn = Server.CreateObject("ADODB.Connection")
conn.open myDSN

...
' don't open this until you're ready to use it!
set rs = conn.execute("EXEC qAllClubs")
Do while Not RS.EOF
Response.Write "<OPTION VALUE='" &RS("clubname") & "'>"
Response.Write RS("clubname")
RS.MoveNext
Loop
RS.Close: Set RS = Nothing
' always close the connection too!!!
conn.close: set conn = nothing
%>

Please see the following URLs to see why I corrected all of these issues:

http://www.aspfaq.com/2126
http://www.aspfaq.com/2112
http://www.aspfaq.com/2191
http://www.aspfaq.com/2435
http://www.aspfaq.com/2424#db
Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Olaf | last post by:
I have a frameset page witch contains the myFuc() function. The function is accessed from a page in one of the frames in the frameset. An example is shown below. <input...
25
by: Neil Ginsberg | last post by:
I have a strange situation with my Access 2000 database. I have code in the database which has worked fine for years, and now all of a sudden doesn't work fine on one or two of my client's...
0
by: Kris Vanherck | last post by:
yesterday i started getting this strange error when i try to run my asp.net project: Compiler Error Message: CS0006: Metadata file 'c:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net...
6
by: Gary | last post by:
I have an application that has been working just fine for a couple of years. It queries a SQL database and returns some formatted data back to the client. I have a new client, who has a larger...
5
by: Nathan Sokalski | last post by:
When I view my index.aspx page any time after the first time, I recieve the following error: System.Web.TraceContext.AddNewControl(String id, String parentId, String type, Int32 viewStateSize)...
0
by: ivb | last post by:
Hi all, I am using DB2 8.1.11.1 on NT with ASP.NET 1.1 When application make connection to database (via ADO.NET), it set "Connection timeout" parameter to 30 seconds. After, when my webpage...
11
by: Martin Joergensen | last post by:
Hi, I've encountered a really, *really*, REALLY strange error :-) I have a for-loop and after 8 runs I get strange results...... I mean: A really strange result.... I'm calculating...
1
by: JoReiners | last post by:
Hello, I have a really strange problem. I'm unable to figure it out on my own. I parse very simple xml documents, without any check for their form. These files look very similar and are encoded...
11
by: Mike C# | last post by:
Hi all, I keep getting a strange error and can't pin it down. The message is: This application has requested the Runtime to terminate it in an unusual way. Please contact the application's...
3
by: Shelly | last post by:
I am encountering two strange problems. First one: I get a "server misconfiguration error", but only sometimes. It occurs on the first screen that accesses the database on a submit. This error...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.