473,888 Members | 1,452 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Microsoft VBScript runtime (0x800A000D)

2 New Member
Hello:

I have Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: '[string: "d-03-07, 0"]'
/OnlineLIB/BNosearch1.asp, line 32

The error happened at this line:bookno = chr(bookno)

The code like this:

Expand|Select|Wrap|Line Numbers
  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
  2. <!--#include file="Connections/Dcon.asp" -->
  3. <%
  4. Dim empno, dept, bookno, bookname, issuedate, returndate
  5.  
  6. Dim Recordset1, Recordset2
  7. Dim Recordset1_numRows
  8. Set Conn = Server.CreateObject("ADODB.Connection")
  9. 'Conn.open "DSN=MQIS"
  10. Conn.open "Driver={SQL Server};Server=KBLPC027;Database=libraryinfo;Trusted_Connection=Yes;"
  11. 'Conn.open "Initial Catalog=lib;Data Source=KBLPC107;Integrated Security=SSPI"
  12. 'Conn.open "Driver={SQL Server};Server=KBLPC107;Database=lib;Uid=sa;Pwd=;"
  13. %> 
  14. <%
  15. Set Recordset1 = Server.CreateObject("ADODB.Recordset")
  16. Recordset1.ActiveConnection = MM_Dcon_STRING
  17. Recordset1.Source = "SELECT *  FROM dbo.transact"
  18. Recordset1.CursorType = 0
  19. Recordset1.CursorLocation = 2
  20. Recordset1.LockType = 1
  21. Recordset1.Open()
  22.  
  23. Recordset1_numRows = 0
  24.  
  25. '----- Populate If Posted any Data
  26. bookno = Request.Form("book_no")
  27. 'search = Request.Form("search")
  28.  
  29. If bookno = "" Then
  30.     bookno = 0
  31. Else
  32.     bookno = chr(bookno)
  33. End If
  34.  
  35. If bookno = 0 Then
  36.     empno = ""
  37.     dept = ""
  38.     bookname = ""
  39.     issuedate = ""
  40.     returndate = ""
  41. Else
  42.     Set Recordset2 = Server.CreateObject("ADODB.Recordset")
  43.     Set Recordset2 = conn.Execute("SELECT * FROM transact WHERE book_no = " & bookno)
  44.     If Recordset2.BOF = True Then
  45.         empno = ""
  46.         dept = ""
  47.         bookname = ""
  48.         issuedate = ""
  49.         returndate = ""
  50.     Else
  51.         empno = Recordset2("emp_no")
  52.         dept = Recordset2("dept")
  53.         bookname = Recordset2("book_name")
  54.         issuedate = Recordset2("issue_date")
  55.         returndate = Recordset2("return_date")
  56.     End If
  57. End If
  58. %>
  59. <html>
  60. <head>
  61. <title>Untitled Document</title>
  62. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  63. </head>
  64.  
  65. <body bgcolor="#FFBFE1">
  66. <form name="form1" method="post" action="">
  67.   <p align="center">&nbsp;</p>
  68.   <div align="center">
  69.     <table width="590" border="1">
  70.       <tr> 
  71.         <td width="580"><div align="left"><font size="+1"><strong>Search by:</strong> 
  72.             </font><strong><a href="seaching.asp"><font color="#000000">Employee 
  73.             Number</font></a> <font color="#000000"><a href="Book No.asp">Book 
  74.             Number</a> <a href="bookname.asp">Book Name</a> </font></strong></div></td>
  75.       </tr>
  76.     </table>
  77.   </div>
  78.   <div align="center">
  79.     <table width="85%" border="1">
  80.       <tr bgcolor="#CC9966"> 
  81.         <td width="46%" bgcolor="#FF99CC"><strong>S e a r c h B y</strong></td>
  82.         <td width="54%" bgcolor="#FF99CC"> <select name="search">
  83.             <option value="empno">Employee Number</option>
  84.             <option value="dept">Department</option>
  85.             <option value="bookno">Book Number</option>
  86.             <option value="bookname">Book Name</option>
  87.             <option value="issuedate">Issue Date</option>
  88.             <option value="returndate">Return Date</option>
  89.             <option value="available">Availability</option>
  90.           </select>
  91.           <b> 
  92.           <input type="submit" name="Submit" value="  Submit  " style="font-size: 1em; color: #FFFF00; text-decoration: blink; font-family: Arial Narrow; font-weight: bold; background-color: #CA0000; background-image: url('Sandeep_pic/50.gif'); " tabindex="3">
  93.           </b> </td>
  94.       </tr>
  95.     </table>
  96.   </div>
  97.   <p align="center">&nbsp;</p>
  98.   <div align="center"> 
  99.     <table width="85%" border="1">
  100.       <tr> 
  101.         <td width="46%" height="13"><div align="left"><font color="#003300"><strong>Book 
  102.             Number </strong></font></div></td>
  103.         <td width="54%"><div align="left"><font color="#003300"> 
  104.             <select name="book_no" onChange="this.form.submit();">
  105.               <option value="0"></option>
  106.               <%If Recordset1.EOF = False Then 
  107.       Recordset1.MoveFirst
  108.       Do While Recordset1.EOF =False
  109.       %>
  110.               <option value="<%=(Recordset1.Fields.Item("book_no").Value)%>" <%If Recordset1("book_no") = bookno Then %> Selected <%End if%>  ><%=(Recordset1.Fields.Item("book_no").Value)%></option>
  111.               <%Recordset1.MoveNext
  112.       Loop
  113.       End If%>
  114.             </select>
  115.             </font></div></td>
  116.       </tr>
  117.     </table>
  118.   </div>
  119.   <p>&nbsp;</p>
  120.   <div align="center"> 
  121.     <table width="86%" border="1">
  122.       <tr> 
  123.         <td><strong><font color="#660033">E m p l o y e e N u m b e r</font></strong></td>
  124.         <td> <input name="emp_no" type="text" id="emp_no" value="<%= empno %>"> 
  125.         </td>
  126.       </tr>
  127.       <tr> 
  128.         <td><strong><font color="#660033">D e p a r t m e n t</font></strong></td>
  129.         <td><input name="dept" type="text" id="dept" value="<%= dept %>"></td>
  130.       </tr>
  131.       <tr> 
  132.         <td width="46%"><strong><font color="#660033">B o o k N u m b e r </font></strong></td>
  133.         <td width="54%"><input name="book_no" type="text" id="book_no" value="<%= bookno %>"></td>
  134.       </tr>
  135.       <tr> 
  136.         <td><strong><font color="#660033">B o o k N a m e</font></strong> </td>
  137.         <td><input name="book_name" type="text" id="book_name" value="<%= bookname %>"></td>
  138.       </tr>
  139.       <tr> 
  140.         <td><strong><font color="#660033">I s s u e D a t e</font></strong></td>
  141.         <td><input name="issue_date" type="text" id="issue_date" value="<%= issuedate %>"></td>
  142.       </tr>
  143.       <tr> 
  144.         <td><strong><font color="#660033">R e t u r n D a t e</font></strong></td>
  145.         <td><input name="return_date" type="text" id="return_date" value="<%= returndate %>"></td>
  146.       </tr>
  147.     </table>
  148.   </div>
  149.   <p>&nbsp;</p>
  150.   <div align="center"> 
  151.     <table width="86%" border="1">
  152.       <tr> 
  153.         <td height="23" bgcolor="#FF99CC"><div align="center"> </div></td>
  154.       </tr>
  155.     </table>
  156.   </div>
  157.   <p>&nbsp;</p>
  158.   <p>&nbsp;</p>
  159.   <p>&nbsp;</p>
  160. </form>
  161. </body>
  162. </html>
  163. <%
  164. Recordset1.Close()
  165. Set Recordset1 = Nothing
  166. %>
  167. .....
  168.  
I got mismatch "'[string: "d-03-07, 0"]'
" error.

What am I missing here?

Your help is highly appreciated.
Apr 26 '07 #1
1 4076
jhardman
3,406 Recognized Expert Specialist
Expand|Select|Wrap|Line Numbers
  1. '----- Populate If Posted any Data
  2. 'bookno = Request.Form("book_no")
  3. 'search = Request.Form("search")
  4.  
  5. If request.form("book_no") = "" Then
  6.     bookno = chr(0)
  7. Else
  8.     bookno = chr(request.form("book_no"))
  9. End If
  10.  
The problem was coming up because you tried to change the variable type. Even though you don't choose a variable type when you declare a variable, you can't change the type of variable after it is assigned a value.

Let me know if this helps.

Jared
Apr 26 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
15210
by: Matt | last post by:
<% hour = Request("controlname") %> will yield the following error: Microsoft VBScript runtime (0x800A01F5) Illegal assignment: 'hour' However, if I declare hour, then it is fine. <% Dim hour hour = Request("controlname") %>
1
2772
by: PaulieS | last post by:
Hi all. Am migrating a customer from IIS5 on W2K server to IIS6 on W2K3. Zipped all the websites and unzipped them to the identical locations on new server. Used IISMT to migrate metabase. Got this error when I tried to run a very basic page... code:
3
30922
by: Snow | last post by:
Hello: I have Error Type: Microsoft VBScript runtime (0x800A000D) Type mismatch: '' The error happened at this line: if session("systemIdCount" & arrSystems(iLoop)) 0 The code like this:
2
15814
by: anidmarty | last post by:
Hey I'm a Sysadmin and my users are getting this error on my production box. It works fine on the dev box. There is a script that is run that generates this error. Production is clustered environment using Microsoft Application Center. This was working before and starting throwing this error about 15 days ago. any help would be much appreciated thanks
0
2071
by: =?Utf-8?B?TWF0dCBDYWxob29u?= | last post by:
HI there, I am getting an error on my page which calls up a web service. Microsoft VBScript runtime error '800a13ba' Unknown runtime error: 'SearchQueryXML' /SearchResults.asp, line 142
0
1204
by: monika | last post by:
Hello: I have Error Type: Microsoft VBScript runtime (0x800A000D) Type mismatch: '' The error happened at this line:bookno = chr(bookno) The code like this: bookno = Request.Form("book_no")
4
8857
by: Genken | last post by:
Hi can anybody help me i get this error when running this code. Error Type: Microsoft VBScript runtime (0x800A01A8) Object required: '' And then a line number indicating where the error is, i cant see any errors with this code please assist. Thanks in advance. <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
1
3258
by: FOREST GOLDEN | last post by:
i'M want to select multiple choice by using checkbox, but it come out the above mistake, plz help me solve it, thankx....... my ItemCode is using text eg:cg001 <%@ Language=VBScript %> <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> </HEAD> <title>Multiple checkbox select sample</title> <BODY>
10
8062
by: jasone | last post by:
hi everyone! any advice given will be MUCH appreciated, i have spent about 10 hours on this bit of script... a rating system. I am having realt trouble overcoming this problem at runtime Microsoft VBScript runtime (0x800A01A8) Object required: '' /ddwassignment2/full_catalogue2.asp, line 180 please find the complete code listing below, i have highlighted line 180... if you spot any other errors please let me know! The function...
0
9800
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11180
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10778
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10885
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10439
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9597
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7990
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7148
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5817
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.