View Full Version : Help finding an ASP script

Jun 18th, 2002, 07:41 PM
I want to make a script that registars a user, lets them login, enter events into a calendar (only if they are a member), sign a guestbook (don't have to be a member), enter details onto an online database about there car insurance (don't have to be a member).
The members list i want to use as a mailing list as well.

I want to use access as the database to store it on but i can't connect with dsn.

I have found asp scripts that have a calendar, guest book but they all use dsn to connect and i don't know eoungh not to setup a dsnless conection.

I would also like a script so i can get the user to rate certain links.

I know this sounds like alot but when i have the basic of adding to an Access database from an ASP page, i think i can learn the rest

Jun 18th, 2002, 07:44 PM

the best thing for you to do is to start working on it yourself (cause the scripts you asked for are a lot of work) and when you get stuck, ask us some questions...

no one really has time to build you a custom script/application unless you're paying them to do so...

if you want to learn, make mistakes... then ask for help! :D

Happy programming ;)


Jun 19th, 2002, 12:09 AM
On my website I have a free ASP login/registration script you can use - I limited it to that to keep it simple, but you should be able to add the other stuff you want.

P.S. It uses a DSN-less Access DB connection (from brinkster.com).


Jun 19th, 2002, 06:18 PM
I have downloaded and have PWS on my machine, but i get this error

Microsoft JET Database Engine error '80004005'

'C:\Inetpub\db\userpass.mdb' 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.

/nimblenova/login/login/validate_register.asp, line 38

I think the problem is C:\Inetpub\, this is not where the database is.

This is from validate.asp
the code in question are

Set TheConnection = Server.CreateObject("ADODB.Connection")
'ThePath = Server.MapPath("./db/userpass.mdb")
'TheConnection.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & ThePath

sConnString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="
sMapPath = Server.MapPath("\")
sMapPath = Mid(sMapPath, 1, InStrRev(sMapPath,"\")-1) & "./db/userpass.mdb ;" & _
"Persist Security Info=False;"
sConnString = sConnString & sMapPath
TheConnection.Open sConnString

the red bits are the database.

any ideas

Jun 19th, 2002, 06:40 PM
whoa, that's alot of code just to connect...

try this instead

Set TheConnection = Server.CreateObject("ADODB.Connection")
TheConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=./db/userpass.mdb"

try that..

Note: if you're using Access 97, cahnge the '4.0' in the connection string to 3.1


Jun 19th, 2002, 07:30 PM
Nope still can't getting working

I put the datbase in the same folder

Set TheConnection = Server.CreateObject("ADODB.Connection")
TheConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=userpass.mdb"

And i am getting

Microsoft JET Database Engine error '80004005'

Could not find file 'C:\userpass.mdb'.

/nimblenova/login/login/validate_register.asp, line 31

I am useing Access 2002

Jun 19th, 2002, 07:35 PM
Using the orginal script i placed the database in
which is where is said it was and it worked.

But why does it put this C:\intepub on it?

Jun 19th, 2002, 07:42 PM
try this then...

Set TheConnection = Server.CreateObject("ADODB.Connection")
TheConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\inetpub\db\userpass.mdb"

see if that works...


Jun 19th, 2002, 11:59 PM
That's set up for brinkster.com, where they have a separate folder named "db" you need to put your databases in. If it's in the same folder as your script just take that part of the path out!

Also - if you aren't sure of the exact path of the page in question, you can stick this on the page to give you the local path:

<% = Request.ServerVariables("TRANSLATED_PATH") %>


Jun 20th, 2002, 01:33 PM

If your db is not in the same folder as the calling page, you need to refer to the complete virtual path to the data source. You can (and should) use Server.MapPath to point to the correct location of the data source (as refrenced from your virtual root).

Avoid using references to your local drive. When you upload to your remote server, the mapping or assignment of your virtual root may not be the same as on your local machine, and you will have to change the reference to the source code correspondingly, for the code to work. If you have a hundred pages, this can be a nightmare. :D

When using Server.MapPath , the path is always referenced from your virtual directory, so the physical location would not matter.

There's a similar discussion in this thread

Jun 20th, 2002, 05:26 PM
I think i got that bit working thanks guys
This is my new error

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/nimblenova/login/login/validate_register.asp, line 148


It comes from this lot
<% Sub SendMail() '****************************************************
Set objCDO = Server.CreateObject("CDONTS.NewMail")

objCDO.To = email
objCDO.From = "[email protected]"
objCDO.cc = ""
objCDO.bcc = ""

txtMessage = "========================================================" & CHR(10)
txtMessage = txtMessage & "Please confirm your website registration below." & CHR(10)
txtMessage = txtMessage & "========================================================" & CHR(10)
txtMessage = txtMessage & CHR(10)
txtMessage = txtMessage & FormatDateTime(Date(),1) & CHR(10)
txtMessage = txtMessage & Time() & CHR(10)
txtMessage = txtMessage & "Your IP Address: " & ip & CHR(10)
txtMessage = txtMessage & CHR(10)
txtMessage = txtMessage & CHR(10)
txtMessage = txtMessage & "Please note: You will not be able to access the website until you have confirmed your registration." & CHR(10)
txtMessage = txtMessage & "Please click the link below to confirm your registration:" & CHR(10)
txtMessage = txtMessage & CHR(10)
txtMessage = txtMessage & "http://www.yourwebsite.com/login/confirm.asp?ID=" & id & CHR(10)

objCDO.Subject = "Thank you for registering!"
objCDO.Body = txtMessage
Set objCDO = Nothing

End Sub 'SendMail() '**************************************************** %>

And i get the impretion that its because i can't send Email direct from the server

Jun 20th, 2002, 06:49 PM
You're right - I'd check out 4guysfromrolla.com they probably have an explanation of how to install CDONTS on your server.

Jun 22nd, 2002, 11:45 AM
Thanks for all the help guys i think i am starting to get the hang of this now.