Newbie: simple asp form to access db, connection bombing

  • Thread starter Thread starter Scott Gordo
  • Start date Start date
S

Scott Gordo

Thanks in advance. I have the feeling I've made a small rookie
oversight either in Access or with my asp page and need some
troubleshooting.

First, here's the firefox error page I'm getting:
Press Release Output
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Could not use '(unknown)';
file already in use.
/pressRelForm/output.asp, line 15

I've created a simple access .mdb for press releases.
The name of the db is "pr.mdb".
The name of the table is "tblPR". There's only one.
The Field Names are "mmddyy" (Date/Time), "Title" (Text), "ReleaseID"
(AutoNumber, Primary Key), "PRContents" (Memo).
Each field has some dummy content.

I then placed it onto a test web server we'll call WEBTEST.

I then set the ODBC on WEBTEST with the following:
System DSN tab
-- Name: pr
-- Driver: Microsoft Access Driver (.mdb)
-- Hit "Select..." button, goes to correct directory:
c:\inetpub\wwwroot\pressrelform\pr.mdb
* Nothing in place under Advanced for login name/password.

Then, insite c:\inetpub\wwwroot\pressrelform\, I created a page called
output.asp
This is the page's code. It's simple stuff. Line 15 is the
Connect.Open "pr"
statement.

###############################
<% Option Explicit %>
<!-- #include virtual="common/adovbs.inc" -->


<HTML>
<BODY>

<H1>Press Release Output</H1>

<%

Dim Connect, ReleaseListing
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open "pr"

Set ReleaseListing = Connect.Execute("SELECT * FROM pr ORDER BY
ReleaseID")

do until ReleaseListing.EOF
%>

<%=pr("mmddyy")%> <br>
<%=pr("Title")%> <br>
<%=pr("PRContents")%> <p>

<% ReleaseListing.MoveNext
loop %>

</BODY>
</HTML>


######################################

I should add that Access is closed.
Anything jump out? Thanks again.

Scott
 
Scott said:
Thanks in advance. I have the feeling I've made a small rookie
oversight either in Access or with my asp page and need some
troubleshooting.

First, here's the firefox error page I'm getting:
Press Release Output
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Could not use '(unknown)';
file already in use.
/pressRelForm/output.asp, line 15

See if this page helps:
http://www.aspfaq.com/show.asp?id=2009

This is most likely a file permissions problems so pay attention to the
parts of the article that discuss the file permissions needed to allow asp
to work with Jet databases.

Also see:
http://www.aspfaq.com/show.asp?id=2126
and
http://www.aspfaq.com/show.asp?id=2112

Bob Barrows
 
Scott, get used to accessing the aspfaq site. It's a great resource
for errors. In no time at all you'll be familiar with most common asp
errors.
 
Back
Top