Wrox Programmer Forums
| 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 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 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
 
Old April 15th, 2004, 04:42 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 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)

 
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
 
Old April 15th, 2004, 04:54 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 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)





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





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