Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 2nd, 2010, 11:49 AM
Registered User
 
Join Date: Jul 2010
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default (0x800A000D) Type mismatch

receive an error above; here is the code from the page trying to get line 222 is in red:
Code:
<%@Language=VBScript%>

<!--#include file="sts_inc_login_check.inc"-->

<%

'COMING from Current Form

strWhichButton = Request.Form("txtWhichButton")
strWhichRecord = Request.Form("txtWhichRecord")
strWhichProjectNumber = Request.Form("txtProjectNumber")

If strWhichButton = "New" Then
   Response.Redirect ("sts_submittal_items_detail_add_edit.asp?txtWhichButton=" & strWhichButton & "&txtWhichProjectNumber=" & strWhichProjectNumber)
End If

If strWhichButton = "Edit3" Then
   Response.Redirect ("sts_submittal_items_detail_add_edit.asp?txtWhichButton=" & strWhichButton & "&txtWhichRecord=" & strWhichRecord)
End If

'PMT Change 12/10

'COMING from Submittal Items Add/Edit

If len(Request.QueryString("txtWhichButton")) > 0 Then  
   strWhichProjectNumber = Request.QueryString("txtWhichProjectNumber")
   strWhichSubId = Request.QueryString("txtWhichRecord")
End If

'End of PMT Change 12/10

'PMT change 12/5

'COMING from Submittal View, Submittal Add, Submittal Edit,
'Submittal Reviewers View, Submittal Reviewers Add/Edit, 
'Submittal Comments View, Submittal Comments Add/Edit Forms 
'after clicking drop down

If len(Request.QueryString("txtDoWhat")) > 0 Then  
   strWhichProjectNumber = Request.QueryString("txtWhichProjectNumber")
   strWhichSubId = Request.QueryString("txtWhichRecord")
End If

'Submittal, Comment and Reviewer Drop Down Selections

If strWhichButton = "What" And Request.Form("do_what") <> "" Then
   strDoWhat = Mid(Request.Form("do_what"),1,2)
End If

'GOING to another form

'Pass Do What, Project Number and Submittal Id

If strDoWhat = "VS" Then
   Response.Redirect ("sts_submittal_view.asp?txtDoWhat=" & strDoWhat & "&txtWhichProjectNumber=" & strWhichProjectNumber & "&txtWhichRecord=" & strWhichRecord)

'Pass Do What, Project Number and Submittal Id

ElseIf strDoWhat = "VR" Then
   Response.Redirect ("sts_submittal_reviewers_view.asp?txtDoWhat=" & strDoWhat & "&txtWhichProjectNumber=" & strWhichProjectNumber & "&txtWhichRecord=" & strWhichRecord)

'Pass Do What, Project Number and Submittal Id

ElseIf strDoWhat = "VC" Then
   Response.Redirect ("sts_submittal_comments_view.asp?txtDoWhat=" & strDoWhat & "&txtWhichProjectNumber=" & strWhichProjectNumber & "&txtWhichRecord=" & strWhichRecord)

'Pass Do What, Project Number and Submittal Id

ElseIf strDoWhat = "NS" Then
   Response.Redirect ("sts_submittal_add.asp?txtDoWhat=" & strDoWhat & "&txtWhichProjectNumber=" & strWhichProjectNumber & "&txtWhichRecord=" & strWhichRecord)

'Pass Do What, Project Number and Submittal Id

ElseIf strDoWhat = "ES" Then
   Response.Redirect ("sts_submittal_detail_edit.asp?txtDoWhat=" & strDoWhat & "&txtWhichProjectNumber=" & strWhichProjectNumber & "&txtWhichRecord=" & strWhichRecord)

'Pass Do What, Project Number and Submittal Id

ElseIf strDoWhat = "NI" Then
   Response.Redirect ("sts_submittal_items_detail_add_edit.asp?txtDoWhat=" & strDoWhat & "&txtWhichProjectNumber=" & strWhichProjectNumber & "&txtWhichRecord=" & strWhichRecord)

ElseIf strDoWhat = "NR" Or strDoWhat = "ER" Then
   Response.Redirect ("sts_submittal_reviewers_detail_add_edit.asp?txtDoWhat=" & strDoWhat & "&txtWhichProjectNumber=" & strWhichProjectNumber & "&txtWhichRecord=" & strWhichRecord)

'Pass Do What, Project Number and Submittal Id

ElseIf strDoWhat = "NC" Or strDoWhat = "EC" Then
   Response.Redirect ("sts_submittal_comments_detail_add_edit.asp?txtDoWhat=" & strDoWhat & "&txtWhichProjectNumber=" & strWhichProjectNumber & "&txtWhichRecord=" & strWhichRecord)

End If

'End of PMT change 12/5

strSecurity = Session("security_level_cd")

%>  
 
   <html>
   <head>

   <meta http-equiv="Content-Language" content="en-us">
   <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
   <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
   <meta name="ProgId" content="FrontPage.Editor.Document">
   <title>Submittal Tracking System - View Submittal Items</title>

<LINK REL=stylesheet TYPE="text/css" HREF="sts.css">

</head>

   <body>

   <!--sts_submittal_items_view.asp-->
   <!--Developed By P. Taylor 7/2/01-->
   <!--Last Modified By P. Taylor 7/2/01-->
   
   <!--#include file="ADOvbs.inc"-->

   <!--What happens when the submit button is clicked.-->

   <form method="post" action="sts_submittal_items_view.asp" name=Form1>
   <INPUT TYPE=hidden NAME=txtWhichButton>
   <INPUT TYPE=hidden NAME=txtWhichRecord>
   <INPUT TYPE=hidden NAME=txtWhichProject>
   <INPUT TYPE=hidden NAME=txtSecurity VALUE=<%Response.Write strSecurity%>>

   <SCRIPT LANGUAGE="vbscript">

   Sub WhichButton(anyButton)
   
      If anyButton = "New" And Form1.txtSecurity.value = "Entry" Then
         v = MsgBox ("You don't have permissions to add information.",vbOKOnly, "No Permissions")
         Exit Sub
      End If   

      document.forms.item("Form1").txtWhichButton.Value=anyButton
      Call Form1.submit
   
   End Sub

   Sub WhichRecordAndButton(anyRecord, anyButton)
   
      If anyButton = "Delete" And Form1.txtSecurity.value = "Entry" Then
         v = MsgBox ("You don't have permissions to delete information.",vbOKOnly, "No Permissions")
         Exit Sub
      End If   
      
      If anyButton = "Delete" Then
        If MsgBox ("Are you sure you want to delete this record?",vbYesNo, "Delete Confirm") = vbNo Then
           Exit Sub
        End If
      End If  

      document.forms.item("Form1").txtWhichButton.Value=anyButton
      document.forms.item("Form1").txtWhichRecord.Value=anyRecord
      Call Form1.submit
   
   End Sub
   
   Sub DoWhat(anyRecord, anyButton)

     document.forms.item("Form1").txtWhichRecord.Value=anyRecord
     document.forms.item("Form1").txtWhichButton.Value=anyButton
     Call Form1.submit

   End Sub
   
   Sub DoSubmit()
     Call Form1.submit
  End Sub  

   </SCRIPT>

<!--Do section containing logo, heading and navigation links-->
<%strTitle = "View Submittal Items" %>
<!--#include file="sts_inc_top.inc"-->


<td width="522" height="30">
<TABLE border=0 RULES=rows width="522" height="20" Class="Standard">

<tr>

<td width= "522" align=center>

                <!--Section containing Find drop down, and Refresh buttons-->
  
                     <%      

                     Dim strWhichButton
      
                     'Declare recordset and string variables

                     Dim strEditId   
                     Dim rst  
                     Dim objRS

                     strWhichButton = Request.Form("txtWhichButton") 
                   
                     If strWhichButton = "Delete" Then

                        strId = Request.Form("txtWhichRecord")
 
                        set objRS = Server.CreateObject("sts.sts_delete")
                        Call objRS.submittal_items_delete(strId)
                                
                     End If

                    'Populate Table
           
           'Change 12/5 PMT  Coming from current form or Views
           
           If len(strWhichProjectNumber) > 0 Then
              strProjectNumber = strWhichProjectNumber
           Else
              strProjectNumber = Request.Form("txtProjectNumber")
           End If

           'End of PMT change

            set objRS = Server.CreateObject("sts.sts_get")
            set rst =  objRS.submittal_items_projects_get()            
            %> 
           
           <tr><td width="30%" align=right><b>Show Records for Project:</td>
           <td width="70%" align=left><SELECT NAME='txtProjectNumber' OnChange=DoSubmit()></b>
           <OPTION VALUE=''>
           </OPTION>

          <%
           'Populate the drop down
         
               Do While Not rst.EOF
               
               If strProjectNumber =  rst("project_number") Then
                  Response.Write "<OPTION VALUE= '" & rst("project_number") & "' SELECTED>"
               Else
                  Response.Write "<OPTION VALUE= '" & rst("project_number") & "'>"
               End If                   
                  Response.Write rst("project_number") & "&nbsp;&nbsp;&nbsp;" & Mid(rst("project_name"),1,50) &  "</OPTION>"
                  rst.MoveNext
              Loop
              Response.Write "</SELECT></td></tr>"
         
              rst.Close
              Set rst=nothing       
%>
          </td>
          </tr>
          <tr>
          <% If len(strProjectNumber) = 0 Then %>
          <td>&nbsp;
          </td>
          </tr>
          <tr>
          <td align=center colspan=2><INPUT TYPE='button' VALUE='New Item' onClick="WhichButton('New')"></td>
          <%End If%>
          </tr>
          </table>
          </td>
          </tr>
          
          <%

          If Len(strProjectNumber) > 0 Then

          %>
 <tr>

<td height="192">
<TABLE BORDER=1 RULES=rows width=522" Class="Standard1">

<tr>

             <td width = 10%><b>*RGV #</b></td>
             <td width = 25%><b>Sub Name</b></td>
             <td width = 10%><b>*Item #</b></td>
             <td width = 10%><b>Type</b></td>
             <td width = 20%><b>*Item Desc</b></td>
             <td width=25%>
             <INPUT TYPE='button' VALUE='New' onClick="WhichButton('New')">
             <INPUT TYPE='button' VALUE='Refresh' onClick="WhichButton('Refresh')">
</td>
</tr>

<tr>

       <%
                         'Prepare the grid recordset
                         
                         strWhichButton = Request.Form("txtWhichButton")
                         strWhichRGV = Request.Form("rgv_submittal_number")
                               
                         'PMT Change 12/5
                         
                         If strWhichSubId <> "" Then
                            strWhichSubmittalId = strWhichSubId  'Coming from Other Forms
                         Else
                            strWhichSubmittalId = Request.Form("submittal_id")  'Coming from User Selection
                         End If
                         
                        'End of PMT Change 12/5

                         strWhichItemId = Request.Form("submittal_item_id")
                         strWildcard = Request.Form("txtWildcard")
                         
                         strWhere = " project_number = '" & strProjectNumber & "'"
                         
                         Set rstGrid=Server.CreateObject("ADODB.Recordset")

                         If Len(strWhichRGV) = 0 And Len(strWhichSubmittalId) = 0 And Len(strWhichItemId) = 0 And strWhichButton <> "Wildcard" And strWhichButton <> "SubmittalId" And strWhichButton <> "ItemId" Then 
                            'get all records
                         set objRS = Server.CreateObject("sts.sts_get")
                         set rstGrid =  objRS.submittal_items_grid_get(strProjectNumber, Null, Null, Null, Null)
                         
                         'Sort buttons are clicked
                         
                         ElseIf strWhichButton = "SubmittalId" Then
                         'Submittal sort button was clicked
                         set objRS = Server.CreateObject("sts.sts_get")
                         set rstGrid =  objRS.submittal_items_grid_get(strProjectNumber, "submittal_name", Null, Null, Null)
                         
                         ElseIf strWhichButton = "ItemId" Then
                         'Item sort button was clicked
                         set objRS = Server.CreateObject("sts.sts_get")
                         set rstGrid =  objRS.submittal_items_grid_get(strProjectNumber, "item_desc", Null, Null, Null)
                         
                         'Drop downs are populated
                         
                        ElseIf Len(strWildcard) > 0 Then 
                        'Wildcard populated 
                         set objRS = Server.CreateObject("sts.sts_get")
                         set rstGrid =  objRS.submittal_items_grid_wildcard_get(strProjectNumber, strWildcard)
                         
                         ElseIf Len(strWhichRGV) > 0 Then
                          'RGV drop down was populated                          
                         set objRS = Server.CreateObject("sts.sts_get")
                         set rstGrid =  objRS.submittal_items_grid_get(strProjectNumber, Null, strWhichRGV, Null, Null)
                         
                         ElseIf Len(strWhichSubmittalId) > 0 Then
                          'Submittal Name drop down was populated                          
                         set objRS = Server.CreateObject("sts.sts_get")
                         set rstGrid =  objRS.submittal_items_grid_get(strProjectNumber, Null, Null, strWhichSubmittalId, Null)
                         
                         ElseIf Len(strWhichItemId) > 0 Then
                          'Item was populated                          
                         set objRS = Server.CreateObject("sts.sts_get")
                         set rstGrid =  objRS.submittal_items_grid_get(strProjectNumber, Null, Null, Null, strWhichItemId)

                        End If
                       
                         %>
       <td>
  
                         <SELECT NAME="rgv_submittal_number" onChange="DoSubmit()">
                         <OPTION VALUE=''></OPTION>
                         <% 
          
                         'Populate the drop down
        
                         set objRS = Server.CreateObject("sts.sts_get")
                         set rst =  objRS.submittal_items_grid_dd_get(strProjectNumber, "rgv_submittal_number")

                         Do While Not rst.EOF
                            Response.Write "<OPTION VALUE= '" & rst("rgv_submittal_number") & "'>"
                            Response.Write rst("rgv_submittal_number") & "</OPTION>"
                            rst.MoveNext
                         Loop
         
                         rst.Close
                         Set rst=nothing
                         %>       
                         </SELECT>
       </td>
       <td>
                        <SELECT NAME="submittal_id" onChange="DoSubmit()">
                         <OPTION VALUE=''>
                         </OPTION>
                         <% 
          
                         'Populate the drop down
                         
                         set objRS = Server.CreateObject("sts.sts_get")
                         set rst =  objRS.submittal_items_grid_dd_get(strProjectNumber, "submittal_name")         
                        
                         Do While Not rst.EOF
                            Response.Write "<OPTION VALUE= '" & rst("submittal_id") & "'>"
                            Response.Write Mid(rst("submittal_name"),1,20) & "</OPTION>"
                            rst.MoveNext
                         Loop
         
                         rst.Close
                         Set rst=nothing
                         %>       
                         </SELECT>
       </td>

<td>
&nbsp;
</td>
       
<td>
&nbsp;
</td>
  
       <td>
  
                         <SELECT NAME="submittal_item_id" onChange="DoSubmit()">
                         <OPTION VALUE=''></OPTION>
                         <% 
          
                         'Populate the drop down
        
                         set objRS = Server.CreateObject("sts.sts_get")
                         set rst =  objRS.submittal_items_grid_dd_get(strProjectNumber, "submittal_item_desc") 
                         
                         Do While Not rst.EOF
                            Response.Write "<OPTION VALUE= '" & rst("submittal_item_id") & "'>"
                            Response.Write Mid(rst("submittal_item_desc"),1,25) & "</OPTION>"
                            rst.MoveNext
                         Loop
         
                         rst.Close
                         Set rst=nothing
                         %>       
                         </SELECT>
                         
         </td>
     
<td>

 <SELECT NAME="do_what">
                  
    <%If strSecurity = "Entry" Then %>
                  
       <OPTION VALUE=''></OPTION>
       <OPTION VALUE= "VS">View-Submittal</OPTION>
       <OPTION VALUE= "VR">View-Reviewers</OPTION>
       <OPTION VALUE= "VC">View-Comments</OPTION>
       <OPTION VALUE= "NC">New-Comment</OPTION>
       <OPTION VALUE= "ES">Edit-Submittal</OPTION>
       <OPTION VALUE= "ER">Edit-Reviewer</OPTION>
       <OPTION VALUE= "EC">Edit-Comment</OPTION>

    <%Else%>

       <OPTION VALUE=''></OPTION>
       <OPTION VALUE= "VS">View-Submittal</OPTION>
       <OPTION VALUE= "VR">View-Reviewers</OPTION>
       <OPTION VALUE= "VC">View-Comments</OPTION>
       <OPTION VALUE= "NS">New-Submittal</OPTION>
       <OPTION VALUE= "NI">New-Item</OPTION>
       <OPTION VALUE= "NR">New-Reviewer</OPTION>
       <OPTION VALUE= "NC">New-Comment</OPTION>
       <OPTION VALUE= "ES">Edit-Submittal</OPTION>
       <OPTION VALUE= "ER">Edit-Reviewer</OPTION>
       <OPTION VALUE= "EC">Edit-Comment</OPTION>

     <%End If%>
     
    </SELECT>
</td>
     
</tr>

<tr>

<td>
<INPUT TYPE='button' VALUE='  Sort  ' onClick="WhichButton('Refresh')">
</td>

<td>
<INPUT TYPE='button' VALUE='  Sort  ' onClick="WhichButton('SubmittalId')">
</td>

<td>
&nbsp;
</td>

<td>
&nbsp;
</td>

<td>
<INPUT TYPE='button' VALUE='  Sort  ' onClick="WhichButton('ItemId')">
</td>

<td>
&nbsp;
</td>

</tr>


<tr><td align=left colspan=6>Wildcard will return submittal item records where the wildcard value is in the associating submittal's name, submittal type, drawing reference, specification paragraph reference or internal notes or the submittal item's submittal type code or item description or the associated submittal's comment.</td></tr>
<tr><td align=center colspan=5><b>Wildcard: 
<% If strWhichButton = "Wildcard" Then %>
<INPUT TYPE=TEXT NAME='txtWildcard' SIZE = 45 VALUE='<%Response.Write strWildcard %>'></b>
<%Else%>
<INPUT TYPE=TEXT NAME='txtWildcard' SIZE = 45></b>
<%End If%>
</td>
<td>
<INPUT TYPE='button' VALUE='Wildcard' onClick="WhichButton('Wildcard')">
</td>
</tr>

     
      <%

      If rstGrid.BOF Or rstGrid.EOF Then
         Response.Write "<tr><td align=center colspan=10><b>No records meet your criteria.</b></td></tr>"
      Else   
         Do While NOT rstGrid.EOF
         Response.Write "<tr><td>" & rstGrid("rgv_submittal_number") & "&nbsp;</TD>"
         Response.Write "<td>" & rstGrid("submittal_name") & "&nbsp;</TD>"
         Response.Write "<td>" & rstGrid("submittal_item_number") & "&nbsp;</TD>"
         Response.Write "<td>" & rstGrid("submittal_type_cd") & "&nbsp;</TD>"
         Response.Write "<td>" & rstGrid("submittal_item_desc") & "&nbsp;</TD>"

         %>
         <TD colspan=1>
         <INPUT TYPE='button' NAME=EditButton VALUE="Edit" onClick="WhichRecordAndButton '<%Response.Write(rstGrid("submittal_item_id"))%>','Edit3'">
         <INPUT TYPE='button' NAME=DeleteButton VALUE=" Del " onClick="WhichRecordAndButton '<%Response.Write(rstGrid("submittal_item_id"))%>','Delete'">
         <INPUT TYPE='button' NAME=GoButton VALUE=" Go " onClick="DoWhat '<%Response.Write(rstGrid("submittal_id"))%>','What'">
         </TD>   
         <%                     
            rstGrid.MoveNext
         Loop
         
      End If   
         rstGrid.Close
         Set rstGrid = Nothing     
         Set objRS = Nothing
      
    End If

  'New code as of 1/23/02
      
     set objRS = Server.CreateObject("sts.sts_close_connection")
     Call objRS.close_connection()
     Set objRS = Nothing
          
  'End of New Code as of 1/23/02

      %>    
  </tr>       
  </table>

  </form>
  </table>
  </center>

  </body>
  </html>
here is the sts.
Reply With Quote
  #2 (permalink)  
Old August 2nd, 2010, 03:35 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

That object you are creating -- "sts.sts_get" -- is some kind of custom object. Without having recourse to the documentation or code for it, I don't think anybody could begin to guess what the ASP code should then be.

And you asked the same question 2 years ago in the Wrox and MSDN forums. I gather you never solved it in 2008???

You could *TRY* doing
Code:
           Response.Write "DEBUG:  TypeName is " & TypeName(objRS.submittal_items_projects_get() ) & "<HR>"
but if the call, per se, is causing the error that's not going to help.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
type mismatch peonysmiles ASP.NET 1.0 and 1.1 Basics 0 August 26th, 2008 08:38 AM
(0x800A000D) datatype mismatch peonysmiles ASP.NET 1.0 and 1.1 Basics 1 August 26th, 2008 08:13 AM
Error-0x800A000D-Type mismatch kishy449 Classic ASP Basics 0 July 23rd, 2007 04:48 AM
Type Mismatch Anup Gavate VB How-To 4 March 28th, 2005 01:48 PM
Type mismatch sporkman43 Classic ASP Basics 4 August 14th, 2003 03:27 AM



All times are GMT -4. The time now is 02:35 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.