Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 4th, 2004, 10:47 AM
Authorized User
 
Join Date: Jun 2004
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP page Runtime Error

I recently upgraded my ASP forum's backend database from Access to SQL Server.

I was trying to make a new posting, then got the following error:

Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'Execute'

/forum/forums.asp, line 1180

This is the code of the line:
cn.execute = "UPDATE disc_forums SET posts = posts + 1 WHERE forumid = " & forumid
cn.execute = "UPDATE disc_topics SET last_user_id = " & session("user_id") & ", datelast = '" & now & "', replies = replies + 1 WHERE topicid = " & topicid

I suspected in the beginning that there was some problem with my user account in conn. It has the right to insert, delete, update, and read. However, I couldn't give it right to execute. I tried to create a new user and it worked. Is there any syntax that would only work with ACCESS but not SQL SERVER here?

Thanks!

Cinderella


 
Old June 4th, 2004, 10:53 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Change those 2 lines as given below.

cn.execute("UPDATE disc_forums SET posts = posts + 1 WHERE forumid = " & forumid)
cn.execute("UPDATE disc_topics SET last_user_id = " & session("user_id") & ", datelast = '" & now & "', replies = replies + 1 WHERE topicid = " & topicid)

Cheers!

_________________________
-Vijay G
Strive for Perfection
 
Old June 4th, 2004, 12:25 PM
Authorized User
 
Join Date: Jun 2004
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Happygv,

It's working! It's so cool! Thanks a lot for your help and have a nice weekend!

Cinderella






Similar Threads
Thread Thread Starter Forum Replies Last Post
how to get the control in runtime in asp.net page Somesh ASP.NET 2.0 Professional 6 March 7th, 2007 11:33 PM
Crystal reports & ASP - Runtime Error - Pls Help Prasad_Tina Classic ASP Basics 0 January 21st, 2005 10:53 AM
Asp page error hamed8esi Classic ASP Databases 2 March 8th, 2004 11:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.