Newbie: simple asp form to access db, connection bombing

Newbie: simple asp form to access db, connection bombing

am 18.01.2006 20:19:40 von blubberpuss

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 %>






Press Release Output



<%

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")%>

<%=pr("Title")%>

<%=pr("PRContents")%>



<% ReleaseListing.MoveNext
loop %>





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

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

Scott

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

am 18.01.2006 20:26:34 von reb01501

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=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
--
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.

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

am 19.01.2006 16:47:11 von josephweiss

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.

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

am 23.01.2006 23:04:36 von Paul

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