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 July 14th, 2004, 11:29 PM
Authorized User
 
Join Date: Mar 2004
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to gmoney060 Send a message via MSN to gmoney060
Default Getting Runtime error '800a01c2'

Hello All!
I have been trying to get this script to work, but I keep getting the runtime error '800a01c2'. Any help would be great! This is my code!

Code:
<%
    'Declares Variables
    Dim dbName
    Dim ObjConn
    Dim AdminArea
    Dim    User_Name

    'Open DSNless connection to the banner database
    dbName = "/fpdb/topsites.mdb"
    ObjConn = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & Server.MapPath(dbName)
    User_Name = Session("UserID")

    'Determines Who is the user, And collects data from database
    Set AdminArea = Server.CreateObject("ADODB.RecordSet")
    AdminArea.Open "Select * From Users Where Client_Username=' & User_Name'",ObjConn,1,2
%>
Code:
<% AdminArea("Client_Username") %>
The whole point of this script is, I am making a memeber area for my site. So the user logs in, and with a session variable I am givin the username with then looks in the database and pulls all records of that user, and i want to display some of the fields.

 
Old July 15th, 2004, 05:55 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi there,

Which line throws that error and what is there in that line?

With a bird eye, I could see you not using "=" there. Not sure if that line throws the error.

Code:
<% =AdminArea("Client_Username") %>
Originally this error means
Microsoft VBScript runtime error '800a01c2'
Wrong number of arguments or invalid property assignment: 'FUNCTION/SUB NAME'
/error.asp, line 20

Cause: You are trying to call a function or sub with incorrect number of arguments.
Solution: Make sure you have all the arguments for the function/sub, separated by commas.

Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old July 15th, 2004, 09:44 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Yes,
  Vijay is correct. And one more thing, i think u typed wrong.
U check the query in

  adminarea.open "select ...'" & username & "'",conn




 
Old July 17th, 2004, 10:34 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Yes rajanikrishna, You are right. I missed that from my view.

gmoney060, you are also missing a " there.
Code:
AdminArea.Open "Select * From Users Where Client_Username='" & User_Name & "'",ObjConn,1,2
Cheers!

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
hi i got runtime error 13 Type Mismatch error sriharsha345 Access VBA 2 February 21st, 2008 09:30 AM
runtime error??? jeffreyJS ASP.NET 2.0 Basics 4 September 14th, 2006 04:07 AM
Runtime Error whiterainbow ASP.NET 2.0 Professional 2 September 12th, 2006 01:20 AM
mysterious error runtime error '451' coyotworks Excel VBA 1 May 12th, 2006 03:57 PM
error '800a01c2' problem nwright77 Classic ASP Basics 0 March 23rd, 2006 08:42 AM





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