Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. 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 Databases 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 October 27th, 2003, 10:18 AM
Registered User
 
Join Date: Oct 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ADO objects not available

The ASP pages that I am creating do not expose the ADO, Server or Session objects to java script code. I get the "object expected" error whenever I execute any code that references these objects. These objects are available to the VBscript code that I am running in the same pages. I am using code from Paul Wilton's "Beginning JavaScript" book.

I assume ther must be a simple setting to correct this but it eludes me completely. Any ideas?

I have the same issue on IIS 2000 and IIS XP.
 
Old October 27th, 2003, 12:16 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You will have this problem with any server and OS combination.

The VBScript that has access to the ADO, Server and Session objects is running on the server. When you write java script code, it's running on the client (unless you are writing ASP with javascript, or more correctly, with JScript). Once the asp page has been streamed to the browser in HTML, it's living in the context of the client browser. As far as the server is concerned, the page no longer exists. All the objects that live during the life cycle of a page (ADO/Server/Session) are only accessible to code running on the server.

Peter
 
Old November 3rd, 2003, 11:53 AM
Registered User
 
Join Date: Oct 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Peter,
Thanks for the reply. I have been laboring under the misconception that JScript was just some Microsoft abomination that I could ignore (should have know better) and that VB and Java were treated on an equal footing in both the server and client. I went back and reviewed the documentation on the RUNAT directive with your comments in mind and think (hope) I understand the issue.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Value objects rayback_2 BOOK: Beginning Cryptography with Java 1 May 13th, 2008 05:04 PM
Difference between ADO and ADO.NET rakeshclose2u ADO.NET 2 April 23rd, 2007 03:57 AM
ADO AND ADO.NET royalsurej ADO.NET 1 November 8th, 2004 08:28 AM
Com Objects henryh MySQL 0 July 2nd, 2003 03:56 PM
ADO could ADO counot find the specified provider. Rob Collie Classic ASP Databases 2 June 9th, 2003 04:12 AM





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