Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 15th, 2004, 04:30 AM
Registered User
 
Join Date: Apr 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Microsoft VBScript runtime error '800a000d'

Hi there

We have recently upgraded from MSSQL7 to MSSQL2000 and since then I have been experiencing some problems.

My connection string in global.asa:

Sub Application_OnStart
  Application("ConnectionString") = "PROVIDER=SQLOLEDB;DATA SOURCE=SQLSERVER;UID=sa;PWD=;DATABASE=KWIKPAY2"
End Sub

In clientheader.asp:

Set cnClientReports = Server.CreateObject ("ADODB.Connection")
        cnClientReports.Open Application("ConnectionString")
        cnClientReports.CommandTimeout = 300

        Set rsElectricity = Server.CreateObject ("ADODB.Recordset")
        rsElectricity.CursorType = adOpenStatic
        rsElectricity.Open "SELECT bElec FROM tbl_OutletOperations WHERE szSiteNo = '" & Trim(Session("Outlet") & "'"), cnClientReports


In footer.asp:

<a href="clientmenu.asp" class="whitetext" style="text-decoration : none">Home</a> | <a href="rpt_outletdetail.asp" class="whitetext" style="text-decoration : none">Order Details</a> | <a href="rpt_normalsales.asp" class="whitetext" style="text-decoration : none">Normal Sales</a> | <a href="rpt_vouchersreissued.asp" class="whitetext" style="text-decoration : none">Reissued Vouchers</a> <% if rsElectricity("bElec") then %>| <a href="rpt_elecsales.asp" class="whitetext" style="text-decoration : none">Electricity Sales</a> | <a href="rpt_electrans.asp" class="whitetext" style="text-decoration : none">Electricity Transactions</a> <% end if %> <% if NOT rsISOOutlet.EOF then %> | <a href="rpt_isosales.asp" class="whitetext" style="text-decoration : none">Integrated Sales</a> <% end if %>

bElec is of type bit in the database.

The error message that I am getting is:

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'rsElectricity'

/admin/footer.asp, line 9


Any help will be greatly appreciated.

Thanks
Louis
Reply With Quote
  #2 (permalink)  
Old April 15th, 2004, 04:42 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Is clientHeader.asp included by footer.asp?
If not, it makes sense you get the error. The rsElectricity object is defined in the header file, but cannot be reached by the footer file.

If that's not the problem, can you elaborate a bit about your set up? E.g. which pages where, is included, etc. Also, indication what line 9 is may help.

Finally, using the SA account is not recommended. Using the SA account with a blank password is even worse..... ;)

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Hypnotize by Audioslave (Track 10 from the album: Audioslave)

Reply With Quote
  #3 (permalink)  
Old April 15th, 2004, 04:47 AM
Registered User
 
Join Date: Apr 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar

Thanks for your help. I've found the error. clientheader.asp was included after footer.asp. I didn't write the pages, so don't ask me why this was like that, but most importantly, now it works.

I'm not using sa with a blank password on the live database, this is on a test database which is not even connected to the live system most of the time.

Cheers
Louis
Reply With Quote
  #4 (permalink)  
Old April 15th, 2004, 04:54 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Ah, OK. Well, glad it's working now.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Getaway Car by Audioslave (Track 13 from the album: Audioslave)

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBScript runtime error '800a000d' on DLL hit crmpicco Pro VB 6 1 February 16th, 2006 01:47 PM
Microsoft VBScript runtime error '800a01b6' PGSloboda Classic ASP Professional 0 October 20th, 2005 12:10 PM
Microsoft VBScript runtime error '800a01a8' dlgee Classic ASP Basics 4 January 25th, 2004 05:18 PM



All times are GMT -4. The time now is 06:23 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.