Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Help! my login code is not working!!
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Help! my login code is not working!!

 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: Help! my login code is not working!!
    Posted: 28 February 2003 at 7:25am

Hi there :)

I have build a login page using ultradev ....I have loaded the page online but when I try to login in  I get an error message saying

80040e07 data type mismatch

I have gone over the code several times(also rechecked my database fields the fields are number fields) I have gone over the code several times and I cannot find what is wrong with it.Could someone pls help me out .....tell me what I am doing wrong. The all the code is pasted below:

This is causing me a lot of distress......

<%@LANGUAGE="JAVASCRIPT"%>
<!--#include file="Connections/orange.asp" -->
<%
// *** Validate request to log in to this site.
var MM_LoginAction = Request.ServerVariables("URL");
if (Request.QueryString!="") MM_LoginAction += "?" + Request.QueryString;
var MM_valUsername=String(Request.Form("AccountNumber"));
if (MM_valUsername != "undefined") {
  var MM_fldUserAuthorization="";
  var MM_redirectLoginSuccess="mfxUNLOCK.asp";
  var MM_redirectLoginFailed="atlogin.asp";
  var MM_flag="ADODB.Recordset";
  var MM_rsUser = Server.CreateObject(MM_flag);
  MM_rsUser.ActiveConnection = MM_orange_STRING;
  MM_rsUser.Source = "SELECT AccountNumber, PinNumber";
  if (MM_fldUserAuthorization != "") MM_rsUser.Source += "," + MM_fldUserAuthorization;
  MM_rsUser.Source += " FROM Login WHERE AccountNumber='" + MM_valUsername + "' AND PinNumber='" + String(Request.Form("PinNumber")) + "'";
  MM_rsUser.CursorType = 0;
  MM_rsUser.CursorLocation = 2;
  MM_rsUser.LockType = 3;
  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 would be grateful for any help.

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.