ASP Guestbook Assistance needed

I posted this in a thread in Website design for criticism for my site, but since no one has seen it I will post it here in a new thread.

Does anyone here have experience with ASP?

As I have been looking for an ASP Guestbook, I have come across a problem. How does one tell the guestbook to create a connection to a table database in ASP?

I have no clue on how to do it. I have a guestbook ready but I cannot get it to work on my server space. The code for the connection is as follows(I'm supposed to choose the appropriate connection line but I don't know which one.)

Code:
'dbname = "http://ee.1asphost.com/matrixhasu77/guestbook.mdb"

dbname = "http://ee.1asphost.com/matrixhasu77/gb2000.mdb"



'NOTE: If using forward slashes adjust the line below accordingly.

'dbname = Server.Mappath(dbname)



'ConnString = "Provider=Microsoft.Jet.OLEDB;Data Source=" & dbname & ";Persists Security Info=False"

'ConnString = "Provider=SQLOLEDB;Persists Security Info=False;User Id=sa;Initial Catalog=ActiveGuestBook;Initial File Name=" & dbname

'ConnString = "driver={SQL Server};server=<YourServerName>;uid=sa;pwd=;database=" & dbname

'ConnString = "Provider=Microsoft.Jet.OLEDB.3.5.1;Data Source=" & dbname

'ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbname

'ConnString = dbname

'ConnString = "DSN=" & dbname

'ConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & dbname



I really want to get this to work as I want a Server-Side guestbook instead of a hosted one. I haven't had much luck finding an ASP guestbook that I can easily configure to the way I want. I have a few downloaded but need the connection setup and the other refuses to let me modify certain things.

My host is 1ASPHOST if that is of any assistance.

Thanks in advance. If no one can figure it out for me, then don't worry about it. It's just an experiment at this point.
 
I dont know much about ASP or databases, but I did find this site....http://askasp.com/articles.asp?ArtID=1

I think that the important code snippet that you are looking for is:
Code:
<%

strSQL = "SELECT * FROM GuestBook"
Set dbConnection =
Server.CreateObject("ADODB.Connection")
Set rsRecordSet =
Server.CreateObject("ADODB.RecordSet")
dbConnection.Open "DRIVER={Microsoft
Access Driver (*.mdb)};DBQ=guestbook.mdb"
rsRecordSet.Open strSQL,
dbConnection, 2, 3
rsRecordSet.AddNew
rsRecordSet("name") =
Request.Form("name")
rsRecordSet("email") =
Request.Form("email")
rsRecordSet("comments") =
Request.Form("comments")
rsRecordSet.Update
rsRecordSet.Close
dbConnection.Close
Set
rsRecordSet = Nothing
Set dbConnection = Nothing
%>

HTH.
 
i dont know much asp either....just make sure your running a windows server though, i dont think asp run on unix...(i could be wrong)
 
if you are running a linux server and you want a server-side guestbook script then i have developed a beautiful perl script that is small functional and detailed.

the psuedo-code and algorithm is very easy to understand and best of all it is designed to leave out the hassles of a dbms. you dont have to worry about sql or anything like that because it doesnt use a database but a basic text file instead.

it takes names, email addresses, homepage, country and message and parses all urls and mailto statements. It allows users to safely post html and images.

its 100% designed my me so there is no copyright crap if i give it to you and its guarenteed to work....and easy to edit.

its already running three of my clients commercial sites and has a proven track record.

if anyone wants to use it...pm me...its free and i'll give full instructions.

the output looks like this (this user didnt provide a homepage so it doesnt appear)
 

Attachments

  • guest.gif
    guest.gif
    3.7 KB · Views: 20
Originally posted by TurboSmoke
if you are running a linux server and you want a server-side guestbook script then i have developed a beautiful perl script that is small functional and detailed.

the psuedo-code and algorithm is very easy to understand and best of all it is designed to leave out the hassles of a dbms. you dont have to worry about sql or anything like that because it doesnt use a database but a basic text file instead.

it takes names, email addresses, homepage, country and message and parses all urls and mailto statements. It allows users to safely post html and images.

its 100% designed my me so there is no copyright crap if i give it to you and its guarenteed to work....and easy to edit.

its already running three of my clients commercial sites and has a proven track record.

if anyone wants to use it...pm me...its free and i'll give full instructions.

the output looks like this (this user didnt provide a homepage so it doesnt appear)

That doesn't look half bad. I am definately interested in using it. My site is not running off a personal server so I do not have control over the services that run on it(PERL may be supported but I doubt it). However, in a few months if everything pans out, I may be getting hosting on a server for free and some money because I may be doing some work for a client at the high school I currently attend. He is looking to update a few of his hosting sites so I'm probably going to do that.

I'll send you a pm with some questions about it.
 
Back