Newbie: simple asp form to access db, connection bombing

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
blubberpuss [ Mi, 18 Januar 2006 20:19 ] [ ID #1147235 ]

Re: Newbie: simple asp form to access db, connection bombing

Scott Gordo wrote:
> 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 09

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
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
reb01501 [ Mi, 18 Januar 2006 20:26 ] [ ID #1147237 ]

Re: Newbie: simple asp form to access db, connection bombing

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.
josephweiss [ Do, 19 Januar 2006 16:47 ] [ ID #1149013 ]

Re: Newbie: simple asp form to access db, connection bombing

Also here's a good connection strings page:

Connection String Home Page
http://www.carlprothman.net/Default.aspx?tabid=81

And www.asp101.com/samples has some good, short database examples.

Best regards,
-Paul
www.Bullschmidt.com - Freelance Web and Database Developer
www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips
Paul [ Mo, 23 Januar 2006 23:04 ] [ ID #1154747 ]
Webserver » microsoft.public.inetserver.asp.db » Newbie: simple asp form to access db, connection bombing

Vorheriges Thema: Connection to Oracle DB via ODBC
Nächstes Thema: Accessing MS Access DB in different site