Print Page | Close Window

connecting to database in xp

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=1037
Printed Date: 28 March 2026 at 11:07pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: connecting to database in xp
Posted By: ranni
Subject: connecting to database in xp
Date Posted: 15 March 2003 at 1:03pm

i'm trying to connect and view the information in a database.  i have used the guestbook example, it works fine in the format it is   but when i convert the database to the latest version using access in office xp it stops working.

is their any way of editing the code to make it work.

heres the tutorial im trying to use

http://www.webwiz.net/asp/tutorials/connecting_to_a_database_pt2.asp - http://www.webwiz.net/asp/tutorials/connecting_to_a_database_pt2.asp

any help much apreciated




Replies:
Posted By: michael
Date Posted: 15 March 2003 at 4:50pm

Try this one.

adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("guestbook.mdb")



Posted By: ranni
Date Posted: 18 March 2003 at 1:49am
cheers got it sorted


Posted By: Freestyler.SP
Date Posted: 02 April 2003 at 1:13pm

I'm newbei in ASP. And i guess i've got similar error.

I use Access 2002 db.

When i connected through DSN everything was okey. But now i decided connect without DSN and got strange error:

Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error in FROM clause.

Query was:

mySQL="SELECT UserName, UserId FROM User WHERE UserName='" & userName & "' AND Password='" & password & "'"

Examples with original access 97 dbs work.

Converting from format 2002 to 97 doesn't help.

Thanx for attention.



Posted By: Bunce
Date Posted: 02 April 2003 at 4:35pm

Password might be a reserved word.

Try enclosing it in [] : "... AND [Password]=..." or better still, rename the field.

Cheers,
Andrew



-------------
There have been many, many posts made throughout the world...
This was one of them.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net