|
 |
asp_databases thread: RE: access hell
Message #1 by Sam Clohesy <samc@e...> on Tue, 4 Mar 2003 10:42:19 -0000
|
|
Hi all- anyone have any idea why this code:
<%@ Language=VBScript %>
<%
Response.Expires=0
response.buffer = true
%>
<!--#include file="common.asp"-->
<%
'######################
'Login validating only email address not password
Dim strSqL, objrs, strEmail, strPassword
strEmail = TRIM(request.form("ID"))
strPassword = TRIM(request.form("PWD"))
Set objrs = Server.CreateObject("ADODB.Recordset")
strSqL = "select * from tblMembers where MemberEmail = '" & strEmail & "'"
objRs.open strSql,objConn,0
If not objRs.EOF and not objRs.BOF Then
Session("Members") = cint(objRs.fields("MemberID"))
if objRs("LoginCount")<>"" then
iCountViews=cInt(objRs("LoginCount"))
else
iCountViews=0
end if
'########################
'Code for updating number of logins
objConn.Execute "UPDATE tblMembers SET " &_
"LoginCount=" & iCountViews+1 &_
" WHERE MemberID='" & Cint(objRs("MemberID")) &
"'",,&H80
response.redirect "/members/member-home.asp"
'response.write objrs("LoginCount")
else
response.redirect "../login.asp"
End if
%>
Works fine in SQL 7 but gives me:
Microsoft JET Database Engine error '80040e07'
Data type mismatch in criteria expression.
/asp/authorise.asp, line 29
In access 2000??
Any help much appreciated
Thanks
Sam
-----Original Message-----
From: asp [mailto:asp@w...]
Sent: 12 February 2003 19:28
To: ASP Databases
Subject: [asp_databases] Re: access XP
Ive come to a very good conclusion. ACCESS SUCKS !!!!!!! Going back to
mysql.
Thanks for all the help....
-Wiley
-----Original Message-----
From: asp [mailto:asp@w...]
Sent: Wednesday, February 12, 2003 11:20 AM
To: ASP Databases
Subject: [asp_databases] Re: access XP
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open
registry key 'Temporary (volatile) Jet DSN for process 0x59c Thread
0x720 DBC 0x2059004 Jet'.
-----Original Message-----
From: Ken Schaefer [mailto:ken@a...]
Sent: Monday, February 10, 2003 9:28 PM
To: ASP Databases
Subject: [asp_databases] Re: access XP
What is the error you get when you use the second connection string?
(with
the OLEDB Provider?)
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "asp" <asp@w...>
Subject: [asp_databases] access XP
: Microsoft OLE DB Provider for ODBC Drivers error '80004005'
:
: [Microsoft][ODBC Microsoft Access Driver]General error Unable to open
: registry key 'Temporary (volatile) Jet DSN for process 0x59c Thread
: 0x720 DBC 0x2059004 Jet'.
:
: I cannot figure out what is cuasing this error ??? I set read and
write
: permissions on EVERYBODY in iis and I still get the error. The
: connection string I am using is....
:
: strCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
: Server.MapPath("database/guestbook.mdb")
:
: I have also used...
: strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &
: Server.MapPath("database/guestbook.mdb")
:
: Im on IIS 5 Windows 2000 server using accessXP database for a simple
: guestbook.
:
: Please heeeeeeeeeeeeeeeeeeeeelp
Message #2 by "Peter Foti (PeterF)" <PeterF@S...> on Tue, 4 Mar 2003 11:01:38 -0500
|
|
Hi Sam,
If I had to guess, I would say it's because you are surrounding the value of
your WHERE clause with single quotes. It looks like MemberID might be
stored as a number in your Access database, so I would try removing the
single quotes:
" WHERE MemberID='" & Cint(objRs("MemberID")) & "'",,&H80
becomes:
" WHERE MemberID=" & Cint(objRs("MemberID")),,&H80
Not sure why it would work in SQL Server... unless you have the SQL Server
setup to store it as a different data type???
Anyway, hope this helps.
Regards,
Peter Foti
> -----Original Message-----
> From: Sam Clohesy [mailto:samc@e...]
> Sent: Tuesday, March 04, 2003 5:42 AM
> To: ASP Databases
> Subject: [asp_databases] RE: access hell
>
>
> Hi all- anyone have any idea why this code:
>
> <%@ Language=VBScript %>
> <%
> Response.Expires=0
> response.buffer = true
> %>
> <!--#include file="common.asp"-->
>
> <%
>
> '######################
> 'Login validating only email address not password
>
> Dim strSqL, objrs, strEmail, strPassword
> strEmail = TRIM(request.form("ID"))
> strPassword = TRIM(request.form("PWD"))
>
> Set objrs = Server.CreateObject("ADODB.Recordset")
> strSqL = "select * from tblMembers where MemberEmail = '" &
> strEmail & "'"
> objRs.open strSql,objConn,0
> If not objRs.EOF and not objRs.BOF Then
> Session("Members") = cint(objRs.fields("MemberID"))
> if objRs("LoginCount")<>"" then
> iCountViews=cInt(objRs("LoginCount"))
> else
> iCountViews=0
> end if
> '########################
> 'Code for updating number of logins
> objConn.Execute "UPDATE tblMembers SET " &_
> "LoginCount=" & iCountViews+1 &_
> " WHERE MemberID='" & Cint(objRs("MemberID")) &
> "'",,&H80
>
> response.redirect "/members/member-home.asp"
> 'response.write objrs("LoginCount")
>
> else
> response.redirect "../login.asp"
> End if
>
> %>
>
> Works fine in SQL 7 but gives me:
>
> Microsoft JET Database Engine error '80040e07'
>
> Data type mismatch in criteria expression.
>
> /asp/authorise.asp, line 29
>
> In access 2000??
>
> Any help much appreciated
>
> Thanks
>
> Sam
>
>
> -----Original Message-----
> From: asp [mailto:asp@w...]
> Sent: 12 February 2003 19:28
> To: ASP Databases
> Subject: [asp_databases] Re: access XP
>
>
> Ive come to a very good conclusion. ACCESS SUCKS !!!!!!!
> Going back to
> mysql.
>
> Thanks for all the help....
>
> -Wiley
>
>
> -----Original Message-----
> From: asp [mailto:asp@w...]
> Sent: Wednesday, February 12, 2003 11:20 AM
> To: ASP Databases
> Subject: [asp_databases] Re: access XP
>
> Microsoft OLE DB Provider for ODBC Drivers error '80004005'
>
> [Microsoft][ODBC Microsoft Access Driver]General error Unable to open
> registry key 'Temporary (volatile) Jet DSN for process 0x59c Thread
> 0x720 DBC 0x2059004 Jet'.
>
>
>
>
>
> -----Original Message-----
> From: Ken Schaefer [mailto:ken@a...]
> Sent: Monday, February 10, 2003 9:28 PM
> To: ASP Databases
> Subject: [asp_databases] Re: access XP
>
> What is the error you get when you use the second connection string?
> (with
> the OLEDB Provider?)
>
> Cheers
> Ken
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: "asp" <asp@w...>
> Subject: [asp_databases] access XP
>
>
> : Microsoft OLE DB Provider for ODBC Drivers error '80004005'
> :
> : [Microsoft][ODBC Microsoft Access Driver]General error
> Unable to open
> : registry key 'Temporary (volatile) Jet DSN for process 0x59c Thread
> : 0x720 DBC 0x2059004 Jet'.
> :
> : I cannot figure out what is cuasing this error ??? I set read and
> write
> : permissions on EVERYBODY in iis and I still get the error. The
> : connection string I am using is....
> :
> : strCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
> : Server.MapPath("database/guestbook.mdb")
> :
> : I have also used...
> : strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &
> : Server.MapPath("database/guestbook.mdb")
> :
> : Im on IIS 5 Windows 2000 server using accessXP database for a simple
> : guestbook.
> :
> : Please heeeeeeeeeeeeeeeeeeeeelp
>
>
>
>
>
>
>
>
Message #3 by Sam Clohesy <samc@e...> on Tue, 4 Mar 2003 16:09:12 -0000
|
|
Cheers Peter worked this out on my own (I feel very very stupid..)
Thanks for assistance
Sam
Sam Clohesy
Project Manager
T: 0208 772 3958
E: samc@e...
W: http://www.etypemedia.co.uk
W: http://www.siteactive.net
-----Original Message-----
From: Peter Foti (PeterF) [mailto:PeterF@S...]
Sent: 04 March 2003 16:02
To: ASP Databases
Subject: [asp_databases] RE: access hell
Hi Sam,
If I had to guess, I would say it's because you are surrounding the value of
your WHERE clause with single quotes. It looks like MemberID might be
stored as a number in your Access database, so I would try removing the
single quotes:
" WHERE MemberID='" & Cint(objRs("MemberID")) & "'",,&H80
becomes:
" WHERE MemberID=" & Cint(objRs("MemberID")),,&H80
Not sure why it would work in SQL Server... unless you have the SQL Server
setup to store it as a different data type???
Anyway, hope this helps.
Regards,
Peter Foti
> -----Original Message-----
> From: Sam Clohesy [mailto:samc@e...]
> Sent: Tuesday, March 04, 2003 5:42 AM
> To: ASP Databases
> Subject: [asp_databases] RE: access hell
>
>
> Hi all- anyone have any idea why this code:
>
> <%@ Language=VBScript %>
> <%
> Response.Expires=0
> response.buffer = true
> %>
> <!--#include file="common.asp"-->
>
> <%
>
> '######################
> 'Login validating only email address not password
>
> Dim strSqL, objrs, strEmail, strPassword
> strEmail = TRIM(request.form("ID"))
> strPassword = TRIM(request.form("PWD"))
>
> Set objrs = Server.CreateObject("ADODB.Recordset")
> strSqL = "select * from tblMembers where MemberEmail = '" &
> strEmail & "'"
> objRs.open strSql,objConn,0
> If not objRs.EOF and not objRs.BOF Then
> Session("Members") = cint(objRs.fields("MemberID"))
> if objRs("LoginCount")<>"" then
> iCountViews=cInt(objRs("LoginCount"))
> else
> iCountViews=0
> end if
> '########################
> 'Code for updating number of logins
> objConn.Execute "UPDATE tblMembers SET " &_
> "LoginCount=" & iCountViews+1 &_
> " WHERE MemberID='" & Cint(objRs("MemberID")) &
> "'",,&H80
>
> response.redirect "/members/member-home.asp"
> 'response.write objrs("LoginCount")
>
> else
> response.redirect "../login.asp"
> End if
>
> %>
>
> Works fine in SQL 7 but gives me:
>
> Microsoft JET Database Engine error '80040e07'
>
> Data type mismatch in criteria expression.
>
> /asp/authorise.asp, line 29
>
> In access 2000??
>
> Any help much appreciated
>
> Thanks
>
> Sam
>
>
> -----Original Message-----
> From: asp [mailto:asp@w...]
> Sent: 12 February 2003 19:28
> To: ASP Databases
> Subject: [asp_databases] Re: access XP
>
>
> Ive come to a very good conclusion. ACCESS SUCKS !!!!!!!
> Going back to
> mysql.
>
> Thanks for all the help....
>
> -Wiley
>
>
> -----Original Message-----
> From: asp [mailto:asp@w...]
> Sent: Wednesday, February 12, 2003 11:20 AM
> To: ASP Databases
> Subject: [asp_databases] Re: access XP
>
> Microsoft OLE DB Provider for ODBC Drivers error '80004005'
>
> [Microsoft][ODBC Microsoft Access Driver]General error Unable to open
> registry key 'Temporary (volatile) Jet DSN for process 0x59c Thread
> 0x720 DBC 0x2059004 Jet'.
>
>
>
>
>
> -----Original Message-----
> From: Ken Schaefer [mailto:ken@a...]
> Sent: Monday, February 10, 2003 9:28 PM
> To: ASP Databases
> Subject: [asp_databases] Re: access XP
>
> What is the error you get when you use the second connection string?
> (with
> the OLEDB Provider?)
>
> Cheers
> Ken
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: "asp" <asp@w...>
> Subject: [asp_databases] access XP
>
>
> : Microsoft OLE DB Provider for ODBC Drivers error '80004005'
> :
> : [Microsoft][ODBC Microsoft Access Driver]General error
> Unable to open
> : registry key 'Temporary (volatile) Jet DSN for process 0x59c Thread
> : 0x720 DBC 0x2059004 Jet'.
> :
> : I cannot figure out what is cuasing this error ??? I set read and
> write
> : permissions on EVERYBODY in iis and I still get the error. The
> : connection string I am using is....
> :
> : strCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
> : Server.MapPath("database/guestbook.mdb")
> :
> : I have also used...
> : strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &
> : Server.MapPath("database/guestbook.mdb")
> :
> : Im on IIS 5 Windows 2000 server using accessXP database for a simple
> : guestbook.
> :
> : Please heeeeeeeeeeeeeeeeeeeeelp
>
>
>
>
>
>
>
>
|
|
 |