Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Data type mismatch in criteria expression
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Data type mismatch in criteria expression

 Post Reply Post Reply
Author
mangobelle View Drop Down
Newbie
Newbie


Joined: 27 February 2003
Location: United Kingdom
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote mangobelle Quote  Post ReplyReply Direct Link To This Post Topic: Data type mismatch in criteria expression
    Posted: 27 February 2003 at 7:37am

Hi there:)

Pls could anyone tell me how to solve this problem. I  have build a website with a login page using ultradev. I have uploaded the site online everything seems fine except for my login page when I type in the password and press the sumbit buttom I get an error message  saying

 Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression. .

I have gone back into the code and this is what line 21 code looks like

 MM_rsUser.Open();
  if (!MM_rsUser.EOF || !MM_rsUser.BOF) {
    // username and password match - this is a valid user
    Session("MM_Username") = MM_valUsername;
    if (MM_fldUserAuthorization != "") {
      Session("MM_UserAuthorization") = String(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value);
    } else {
      Session("MM_UserAuthorization") = "";
    }
    if (String(Request.QueryString("accessdenied")) != "undefined" && false) {
      MM_redirectLoginSuccess = Request.QueryString("accessdenied");
    }
    MM_rsUser.Close();
    Response.Redirect(MM_redirectLoginSuccess);
  }
  MM_rsUser.Close();
  Response.Redirect(MM_redirectLoginFailed);
}
%>.

I have tried understanding this problem by searching online for a solutions .....I have found different suggestions on the solution ...but none too specific as I am a bit of a novice regards this area ...I am really confused on how to solve this problem.

Pls I would be grateful if anyone could tell me what to do to solve this problem.

Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2003 at 8:26am
which line is #21?

and that error means you are trying to do something with an unhandled data type.. for example, adding a string to a number, etc

what language is that? JSP?
Contribute to the working anarchy we fondly call the Internet
Back to Top
mangobelle View Drop Down
Newbie
Newbie


Joined: 27 February 2003
Location: United Kingdom
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote mangobelle Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2003 at 9:05am

Hi MorningZ:)

Thanks for your reply to my problem. Yes the language is javascript.

Line #21 is  MM_rsUser.Open();

Your explanation ..made recheck my database table the password has a text field , so I have change this to number field.

Does this mean I need to reload the (.mdb file) to the server? and is there any other changes I need to make due to this error???

 

Back to Top
vdub View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 February 2003
Location: United States
Status: Offline
Points: 275
Post Options Post Options   Thanks (0) Thanks(0)   Quote vdub Quote  Post ReplyReply Direct Link To This Post Posted: 02 March 2003 at 2:45am

I have alwase found that error when you use the wrong type of data in a database. like text insted on number like you just said.

 

 

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.