Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Connecting to a database
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Connecting to a database

 Post Reply Post Reply
Author
eden24 View Drop Down
Newbie
Newbie


Joined: 13 November 2003
Location: United Kingdom
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote eden24 Quote  Post ReplyReply Direct Link To This Post Topic: Connecting to a database
    Posted: 14 November 2003 at 5:37am

Hi.

 

I am quite new to ASP but have been trying out the tutorial for database connection, however i get the following error:

Error Type:
ADODB.Connection (0x800A0E79)
Operation is not allowed when the object is open.
/guestbook.asp, line 22

Can anyone help?.

 

E.

Back to Top
Tegwin View Drop Down
Senior Member
Senior Member


Joined: 03 September 2003
Location: United Kingdom
Status: Offline
Points: 430
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tegwin Quote  Post ReplyReply Direct Link To This Post Posted: 14 November 2003 at 6:00am
This could be relalating to permissions. CHeck to make sure that IUSR has read/write access to that folder that holds the db


If you dont want my peaches, dont shake my tree
Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 14 November 2003 at 11:46am
Be sure that the RecordSet Object that you are using is closed before you try to use it again.
Back to Top
eden24 View Drop Down
Newbie
Newbie


Joined: 13 November 2003
Location: United Kingdom
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote eden24 Quote  Post ReplyReply Direct Link To This Post Posted: 16 November 2003 at 8:02am

Thanks for the response, I have managed to resolve that problem now but I have anotehr query regarding submitting a form that I am working on.

I am trying to declare the variables for all of the headings within my form, however I am getting the following error:

Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/example/Bookings_process.asp, line 15, column 124
Dim Firstname, Secondname, Organisation, Position, Address_1, Address_2, Address_3, Postcode, Telephone, Fax, Mobile, Web, E-Mail, Request, Service, Therapies, Events, Training, Comments, theDate,sql

I have successfully tried the tutorial using just 3 fields but obviously I need to have all of the fields available form my form to work, can you advise what I should have added?

 

Regards,

 

M.

Back to Top
Flamewave View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 June 2002
Location: United States
Status: Offline
Points: 376
Post Options Post Options   Thanks (0) Thanks(0)   Quote Flamewave Quote  Post ReplyReply Direct Link To This Post Posted: 19 November 2003 at 11:27am

if you wrap the DIM statment to a second line, then that is probally what your problem is. Try doing one of the following:

add a _ to the end of the first line so the script knows to continue to the next line, ex
Dim Firstname, Secondname, Organisation, Position, Address_1, Address_2, Address_3, Postcode, Telephone, Fax, _
Mobile, Web, E-Mail, Request, Service, Therapies, Events, Training, Comments, theDate,sql

add a second DIM statment, ex
Dim Firstname, Secondname, Organisation, Position, Address_1, Address_2, Address_3, Postcode, Telephone, Fax,
Dim Mobile, Web, E-Mail, Request, Service, Therapies, Events, Training, Comments, theDate,sql

The _ character when used in this fasion is basically a line terminator that tells the script that the line contiues on the next line. If you put anything, including comments, after the _, you will also get an error, as ASP expects nothing after it.

- Flamewave

They say the grass is greener on the other side, but if you really think about it, the grass is greener on both sides.
Back to Top
RonMcF View Drop Down
Newbie
Newbie
Avatar

Joined: 18 December 2003
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote RonMcF Quote  Post ReplyReply Direct Link To This Post Posted: 18 December 2003 at 9:55pm

Thought I'd share a tidbit that solved an ODBC connectivity problem for me with the guestbook database tutorial, as used with IIS 5.0 & W2K. The IUSR must have R+W permissions wherever the db containing folder is at, of course. But it was also necessary for me to change the *system* TEMP and TMP environment variables to point at a folder named TEMP in the root of (any) drive and to give the IUSR R+W permission there, too. That TEMP folder is apparently used when ODBC is used from ASP. I don't know if the problem was specific to Access97 or not, but the tutorial started working for me immediately after I made that change to the system environment variables and rebooted.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.