473,789 Members | 2,898 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Microsoft VBScript runtime error - Type mismatch

3 New Member
Hello,

I got a type mismatch error on my script when compare the null value collect from the sql server.

From the beginning, I code as below:
Expand|Select|Wrap|Line Numbers
  1.  <% If (rst_rs("Amount"))="" then %> 
  2. Sorry the amount is 0
  3. <%else%>
  4. Amount : <%=rst_rs("Amount")%>
  5. <% end if%>
  6.  
And I found that the value nullable, and I have check that the value is NULL in the sql server, so I change my script to check if it is null value:

Expand|Select|Wrap|Line Numbers
  1.  <% If isnull(rst_rs("Amount"))=true then %> 
  2. Sorry the amount is 0
  3. <%else%>
  4. Amount : <%=rst_rs("Amount")%>
  5. <% end if%>
  6.  
However, I still got the Type mismatch error, any idea??
Jul 31 '07 #1
1 3057
omerbutt
638 Contributor
Hello,

I got a type mismatch error on my script when compare the null value collect from the sql server.

From the beginning, I code as below:
<% If (rst_rs("Amount "))="" then %>
Sorry the amount is 0
<%else%>
Amount : <%=rst_rs("Amou nt")%>
<% end if%>

And I found that the value nullable, and I have check that the value is NULL in the sql server, so I change my script to check if it is null value:

<% If isnull(rst_rs(" Amount"))=true then %>
Sorry the amount is 0
<%else%>
Amount : <%=rst_rs("Amou nt")%>
<% end if%>

However, I still got the Type mismatch error, any idea??
can you specify at which line
May 3 '08 #2

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

Similar topics

3
11497
by: jimbly | last post by:
Hello, can someone help! I am getting an error: Microsoft VBScript runtime error '800a000d Type mismatch /bps/srch-detail.asp, line 137 I didn't write this asp - I know very little about asp - I'm just trying to get this site working on my server! I think the offending lie is
2
3689
by: Jozsef Bekes | last post by:
Hello Everyone, I am trying to access a C# class from vbscript. All is file, except for the case when I want to use optional parameters or function overloading. As I found out, optional parameters are not supported by C#, function overloading is not supported by COM. There is an attribute: that does not seem to work, I still have to fill the parameter in vbscript,
3
30917
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:
3
8164
by: easter | last post by:
I have inherited an ASP site and am new to ASP. Part of the site allows the client to update event information about their centre. When they try to add a new event, the following error occurs: Microsoft VBScript runtime error '800a000d' Type mismatch: 'incoming_date' includes/common_functions.asp, line 113 but I can't figure out where to make the correction. The code that contains the error is below. Line 113 is :...
1
4071
by: monika | last post by:
Hello: I have Error Type: Microsoft VBScript runtime (0x800A000D) Type mismatch: '' /OnlineLIB/BNosearch1.asp, line 32 The error happened at this line:bookno = chr(bookno) The code like this:
1
3887
by: mudasserrafiq | last post by:
I am using following asp file default.asp <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <META http-equiv=Content-Type content="text/html; charset=windows-1252"> <META content="0 Days" name=revisit-after> <META content=info@siderinternational.com name=email> <META content="Omer Safdar" name=author> <META content=MegaStudios.com name=publisher> <META content="Copyright ©2005 - MegaStudios.com" name=copyright> <SCRIPT...
1
3256
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>
4
4672
by: ghanson | last post by:
I have started to have problems with my code. On one server the code works fine and on another (which is the one I need to run the scrpt on) I get Microsoft VBScript runtime error '800a000d' Type mismatch /ops/eus/clrm/ck_avail.asp, line 243 The code is:
1
3810
by: morrisqueto | last post by:
Hello, One of my websites just started sending a new rare error. The site has been working for almost 2 years without trouble, but today morning started giving away this error in all my views. Microsoft VBScript runtime error '800a01fb' An exception occurred: 'MoveNext' /test.asp, line 544 Here is the code:
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
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
10410
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...
1
10139
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,...
1
7529
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
5418
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...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4093
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3701
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.