Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | FLASH: OT using ASP with access DB |
From: | Mark Sheppard |
Date: | Mon, 19 Jun 2000 02:51:13 +0100 |
Sorry for the OT, but I know there are some good ASP people here and I have
no idea where else to turn.
I have a guestbook that I picked up at
http://www.web-savant.com/users/kathi/default.htm
which uses ASP and an Access database, neither of which have I used before.
I made a few customizations, which was no problem as the source was heavily
commented.
But i'm running into a problem getting into the administration funtion of
the ASP, which apparently will let me edit / remove posts from the DB. ( I
can post to and read the guestbook)
Server is running NT (Supports PERL 5 for NT- don't know if that matters)
There are two ways to access the DB it seems: DSN and DSNless.
I have no idea what that means, but I tried commenting / un-commenting the
appropriate lines to try both and still got an error. (different, didn't
save it, changed back)
This is the error I get when opening the admin.asp
Obviously it can't find the driver, but I have no idea why.... is it server
side, my side, or in the ASP? (Update: I just installed Access so I don't
hink it's on my side)
***************************************************************************
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] '(unknown)' is not a valid path.
Make sure that the path name is spelled correctly and that you are connected
to the server on which the file resides.
/guestbook/administration.asp, line 62
****************************************************************************
Here is the relevent (I hope) ASP code:
response.write "Invalid login. Please try again."
Else
set conn = server.createobject("adodb.connection")
' BEGIN DSN-less connection - comment out or delete if using a DSN
DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtemp=dsntemp & "DBQ=" & server.mappath("guestbook/guestbook.mdb")
conn.Open DSNtemp <<<------- this is line
62
' END DSN-less connection - uncomment the next line if using DSN!
'conn.open "guestbook"
sqlstmt = "SELECT * from Guestbook Order by PostDate Desc"
Set RS = conn.execute(sqlstmt)
If rs.eof then
response.write "<center>There are no records in the database"
response.write "<br>Please check back later</center>"
response.end
End If
response.write "<table width=500 border=0>"
response.write "<tr><td colspan=4 align='center'>"
response.write "<EM class='str'>"
response.write "Delete Records</EM><br></td></tr>"
response.write "<form action='administration.asp' method='post'>"
Do while not rs.eof
' The database has an autonumber field set as
' the primary key, so we will use that field
' to specify which record we want to modify
ID = rs("ID")
Name = rs("Name")
City = rs("City")
Country = rs("Country")
%>
TIA , and sorry again for the OT.
feel free to reply directly
---------------------------------------------
Mark Sheppard
AKA Zachnefein
zach29columbus [dot] rr [dot] com
---------------------------------------------
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
www.flashforward2000.com
Produced by United Digital Artists and lynda.com
Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
shockwave.com and Electric Rain.
1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
Register before June 30 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
Replies
Re: FLASH: OT using ASP with access DB, Cheri Harder
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]