Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ERROR '80040e4d'

Status
Not open for further replies.

OSU

Programmer
Sep 25, 2001
10
NO
Hello!!
I have some problems again..and I guess it is because I am newbie in .asp programming..
I get a error message when I try to run the application ...I have searched everywhere for documentation ..but.........
I wonder if anybody can help me with a tip or hint..
I have a PC with Windows 98 SE & PWS..I am using Access 2000
I am trying to make a application where contractors can log on and when they are logged On
a grid will open with all the records they have in my access DB..
I will also make updateable grid where thy can update columns in the Grid (I have made the grid and it work...but with all records in DB)
-Ove

adoConn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=; " & dbPath
*********************************************************************
Provider error '80040e4d'
Authentication failed.
/Project1_Local/MPSkv/datates.ASP, line 25
********************************************************************************************
*******************Code***************************
<%@ Language=VBScript %>
<SCRIPT id=DebugDirectives runat=server language=javascript>
// Set these to true to enable debugging or tracing
@set @debug=false
@set @trace=false
</SCRIPT>

<% ' VI 6.0 Scripting Object Model Enabled %>
<!--#include file=&quot;../_ScriptLibrary/pm.asp&quot;-->
<% if StartPageProcessing() Then Response.End() %>
<FORM name=thisForm METHOD=post>
<HTML>
<HEAD>


<%
KundeNr = Request.Form(&quot;KundeNr&quot;)
Passord = Request.Form(&quot;Passord&quot;)
'Get KundeNr and passord from previous page

SQL = &quot;SELECT * FROM Purring Where KundeNr='&quot; & KundeNr & &quot;'&quot;
set adoConn = Server.CreateObject (&quot;ADODB.Connection&quot;)
set adoRS = Server.CreateObject (&quot;ADODB.Recordset&quot;)
dbPath = Server.MapPath(&quot;MPS2000-Da.mdb&quot;)
adoConn.Open &quot;PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=; &quot; & dbPath
adoRS.Open SQL, adoConn
' OPen a DSN less connection to an access database and get the KundeNr and passord for the record where KundeNr=KundeNr

If adoRS.EOF Then
'The username doesn't exist, do an error.
Response.Write &quot;Kundenr Doesn't Exist!&quot;
Else
If Trim(Passord) = Trim(adoRS(&quot;Passord&quot;)) Then
'If the passwords match
Session(&quot;LoggedIn&quot;)=&quot;TRUE&quot;
'Set a session variable to true
%>

<SCRIPT LANGUAGE=VBSCRIPT>
window.navigate &quot;kva.asp&quot;
</SCRIPT>

<%
'Forward user to next page
Else
'Passwords don't match
Response.Write &quot;Passord is incorrect&quot;
End If
End IF
set adoRS = Nothing
set adoConn = Nothing
%>

<META NAME=&quot;GENERATOR&quot; Content=&quot;Microsoft Visual Studio 6.0&quot;>
</HEAD>
<BODY>
<P>
<!--METADATA TYPE=&quot;DesignerControl&quot; startspan
<OBJECT classid=&quot;clsid:9CF5D7C2-EC10-11D0-9862-0000F8027CA0&quot; id=Recordset1 style=&quot;LEFT: 0px; TOP: 0px&quot;>
<PARAM NAME=&quot;ExtentX&quot; VALUE=&quot;12197&quot;>
<PARAM NAME=&quot;ExtentY&quot; VALUE=&quot;2090&quot;>
<PARAM NAME=&quot;State&quot; VALUE=&quot;(TCConn=\qConnection2\q,TCDBObject=\qTables\q,TCDBObjectName=\qPurring\q,TCControlID_Unmatched=\qRecordset1\q,TCPPConn=\qConnection2\q,RCDBObject=\qRCDBObject\q,TCPPDBObject=\qTables\q,TCPPDBObjectName=\qPurring\q,TCCursorType=\q3\s-\sStatic\q,TCCursorLocation=\q3\s-\sUse\sclient-side\scursors\q,TCLockType=\q3\s-\sOptimistic\q,TCCacheSize_Unmatched=\q10\q,TCCommTimeout_Unmatched=\q10\q,CCPrepared=0,CCAllRecords=1,TCNRecords_Unmatched=\q10\q,TCODBCSyntax_Unmatched=\q\q,TCHTargetPlatform=\q\q,TCHTargetBrowser_Unmatched=\qServer\s(ASP)\q,TCTargetPlatform=\qInherit\sfrom\spage\q,RCCache=\qRCBookPage\q,CCOpen=1,GCParameters=(Rows=0))&quot;>
<PARAM NAME=&quot;LocalPath&quot; VALUE=&quot;../&quot;></OBJECT>
-->
<!--#INCLUDE FILE=&quot;../_ScriptLibrary/Recordset.ASP&quot;-->
<SCRIPT LANGUAGE=&quot;JavaScript&quot; RUNAT=&quot;server&quot;>
function _initRecordset1()
{
var DBConn = Server.CreateObject('ADODB.Connection');
 
Make sure the Access database is on the same machine as the web server.

Make sure the anonymous user (IUSR_machinename) has read/write access to the Access Database.

Add a username/password to either of these lines

adoConn.Open &quot;PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=; &quot; & dbPath
adoRS.Open SQL, adoConn

You appear to be using a Recordset DTC. Why don't you use the Data Environment? Add your SQL clause to a Data Environment connection, placing a question mark for the parameter:

SELECT * FROM Purring Where KundeNr=?

give it a suitable name (qryAuthenticateUser)

Then to run it, either add a recordsetDTC (not auto-opened) and set the parameter and open it manually:

<%
KundeNr = Request.Form(&quot;KundeNr&quot;)
Passord = Request.Form(&quot;Passord&quot;)
'Get KundeNr and passord from previous page

rsDTCAuthenticateUser.SetParameter 0, KundeNr
rsDTCAuthenticateUser.Open

If rsDTCAuthenticateUser.EOF = False Then
If Trim(Passord) = Trim(rsDTCAuthenticateUser.getValue(&quot;Passord&quot;) & &quot;&quot;) Then

-etc-

note the use of concatination to the empty string...
recordset(&quot;column&quot;) & &quot;&quot;
or
recordsetDTC.getValue(&quot;column&quot;) & &quot;&quot;
- this casts the null value to an empty string which can remove some issues.

(Content Management)
 
Thank you very much for the time you spent on my problem..
PS. I do not have any Username/Password to open my DB
But I will try to work on your solution..
-Ove
 
I get this Error when I run the application
And Translated it says....The Object does not support
property or methode:
Can anybody help me with a tip!!
The line where it stop:
rsDTCAutenticateUser.setParameter 0,KundeNr
------------------------------------------------------

Microsoft VBScript-kjøretidsfeil error '800a01b6'

Objektet støtter ikke angitt egenskap eller metode: 'setParameter'

/Project1_Local/LoggInn/PAGE2.ASP, line 28
'''''''''''''''''''''''''''''''''''''''''''''''''''''
 
The &quot;rsDTCAuthenticateUser&quot; is the name of a rescordset DTC that you should add to the page. If this is done then the setParameter method should pop-up in the VID editor at the appropriate place.

Actually, try adding a pageObject DTC too. It creates the 'thisPage' value, which can be useful. Then you can add the set parameter / open code in the following section:

Sub thisPage_onenter()
if thisPage.firstEntered = true then
'**code that only runs once goes here**
else
'** this code runs on subsequent server round-trips
'** i.e. when the user submits the form...
rsDTCAuthenticateUser.SetParameter 0, KundeNr
rsDTCAuthenticateUser.Open

if ...login checks OK... then
response.redirect &quot;Success.ASP&quot;
else
'**set a Login Failed message
end if

end if
end sub

Also, you seem to be passing the Login information from one ASP page to another. Try gathering AND validating the Login on the same ASP page, using the thisPage style code above.


(Content Management)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top