[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

03/07/2003 at 07:28PM PST, ID: 20543119
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.2

Type mismatch: '[string: "SELECT user, pw"]'

Asked by kpu8 in Active Server Pages (ASP)

Tags: errorhandlerlog, type

With the code from below I keep getting the following error and I'm at a lose since it appears my parameters are being passed. What I currently have is a login screen where a person logs in and hits submit - then they
go to submitlogin.asp (see full code below) which checks them. Then provided everything is A-OK then move on to nextpage.asp - A database.asp page (see full code below)is used to connect to my SQL 2000 Server - I'm running Windows 2000 Server and as you can see using classic ASP:

Type mismatch: '[string: "SELECT user, pw"]'
/TestWeb/submitlogin.asp, line 18

Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Page:
POST 31 bytes to /TestWeb/submitlogin.asp

POST Data:
user=TESTUSER&pw=testpw


<% @LANGUAGE = VBScript %>

<% ' submitlogin.asp
   
   ' test if a bill_code and eventually a password were
   ' entered. If not, transfer back to the login page.
   If Request.form( "pw" ) = "" Or _
         Request.form( "user" ) = "" Then
      Session( "loginFailure" ) = True
      Call Server.Transfer( "login.asp" )
   End If    
     
   Dim connection, loginData
   

 
   ' create the SQL query
   Session( "query" ) = _
      "SELECT user, pw FROM mydb.dbo.users where user = UPPER'" & _
      Request.form("user")  & "'" and pw = UPPER'" & _
      Request.form("pw") & "'"
     
   Call Server.Execute( "database.asp" )
   SetloginData = Session( "loginData" )
 
   If Request( "user" ) = loginData( "user" ) Then
     
      ' user is OK, adjust loginFailure
      Session( "loginFailure" ) = False
     
      ' write a cookie to recognize them the next time they
      ' go to login.asp
      Response.Cookies( "user" ) = Request( "user" )
     
      ' give it three days to expire
      Response.Cookies( "user" ).Expires = Date() + 3
   

      ' send them to nextpage.asp
   

           Call Server.Transfer( "nextpage.asp" )
   
         
   Else
     Session( "loginFailure" ) = True
     Call Server.Transfer( "login.asp" )
   End If

%>



<% @LANGUAGE = VBScript %>

<%
   ' database.asp
   ' ASP document for interacting with the database
   Option Explicit

   Dim connection, loginData
   
   ' provide error handling code
   On Error Resume Next
   Session( "errorString" ) = ""

   Set connection = Server.CreateObject( "ADODB.Connection" )
   connection.Mode = 3    
   Call connection.Open( "TestWeb" )
   Call errorHandlerLog()

   ' create the record set
   Set loginData = Server.CreateObject( "ADODB.Recordset" )
   Call loginData.Open( Session( "query" ), connection )
   Set Session( "loginData" ) = loginData

   Call errorHandlerLog()

   Sub errorHandlerLog()
      If Err.Number <> 0 Then
         Dim errorString

         errorString = Session( "errorString" )
         errorString = errorString & "<p class = " & _
            Chr( 34 ) & "error" & Chr ( 34 ) & ">Error (" _
            & Err.Number & ") in " & Err.Source & "<br />" & _
            Err.Description & "</p><br />"
         Session( "errorString" ) = errorString
      End If
   End Sub
%>
[+][-]03/07/03 07:35 PM, ID: 8092440

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/07/03 07:36 PM, ID: 8092444

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/07/03 07:40 PM, ID: 8092450

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/07/03 07:42 PM, ID: 8092456

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/07/03 07:45 PM, ID: 8092464

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/07/03 07:46 PM, ID: 8092467

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/07/03 07:47 PM, ID: 8092471

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/07/03 08:06 PM, ID: 8092538

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/07/03 08:11 PM, ID: 8092555

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/07/03 08:12 PM, ID: 8092557

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/07/03 08:13 PM, ID: 8092563

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/07/03 08:14 PM, ID: 8092565

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/07/03 08:15 PM, ID: 8092569

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/07/03 08:17 PM, ID: 8092584

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/07/03 08:18 PM, ID: 8092586

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/07/03 08:34 PM, ID: 8092639

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/07/03 08:35 PM, ID: 8092642

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Active Server Pages (ASP)
Tags: errorhandlerlog, type
Sign Up Now!
Solution Provided By: gladxml
Participating Experts: 3
Solution Grade: A
 
 
[+][-]03/07/03 08:37 PM, ID: 8092650

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/08/03 06:23 AM, ID: 8093810

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/09/03 08:04 PM, ID: 8100518

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20090824-EE-VQP-74