473,765 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Type mismatch: '[string: ""]'

Hi All,

why am I getting this error..? Cheers.

Mark Sargent.
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: '[string: ""]'
/Classifieds/ClassifiedImage Resize.asp, line 27

<%
' Create instance of AspJpeg
Set Jpeg = Server.CreateOb ject("Persits.J peg")

' Compute path to source image
Path = Server.MapPath( FilePath)

' Open source image
Jpeg.Open Path

' Create an instance of AspUpload object
Set Upload = Server.CreateOb ject("Persits.U pload")

' Decrease image size by %
((***Line 27***)) Jpeg.Width = Jpeg.OriginalWi dth * Upload.Form("sc ale") /
100
Jpeg.Height = Jpeg.OriginalHe ight * Upload.Form("sc ale") / 100

' Apply sharpening if necessary
' Jpeg.Sharpen 1, 130

' create thumbnail and save it to disk
FilePath = Replace(FilePat h, "/", "\")
FilePath = Replace(FilePat h, "ImageUploads\" , "")
Jpeg.Save Server.MapPath( "ImageUploads\T humbs") & "\Thumb" & FilePath
%>
Jul 19 '05 #1
10 25892
What is line 27 and what does a response.write of the variables in question
yield?

Ray at home

"Mark Sargent" <do*********@ho tmail.com> wrote in message
news:OX******** ******@TK2MSFTN GP09.phx.gbl...
Hi All,

why am I getting this error..? Cheers.

Mark Sargent.
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: '[string: ""]'
/Classifieds/ClassifiedImage Resize.asp, line 27

<%
' Create instance of AspJpeg
Set Jpeg = Server.CreateOb ject("Persits.J peg")

' Compute path to source image
Path = Server.MapPath( FilePath)

' Open source image
Jpeg.Open Path

' Create an instance of AspUpload object
Set Upload = Server.CreateOb ject("Persits.U pload")

' Decrease image size by %
((***Line 27***)) Jpeg.Width = Jpeg.OriginalWi dth * Upload.Form("sc ale") /
100
Jpeg.Height = Jpeg.OriginalHe ight * Upload.Form("sc ale") / 100

' Apply sharpening if necessary
' Jpeg.Sharpen 1, 130

' create thumbnail and save it to disk
FilePath = Replace(FilePat h, "/", "\")
FilePath = Replace(FilePat h, "ImageUploads\" , "")
Jpeg.Save Server.MapPath( "ImageUploads\T humbs") & "\Thumb" & FilePath
%>

Jul 19 '05 #2
Upload.Form("sc ale") is probably not a number and as such the implicit
coercion to a number is failing.

Try debugging and finding out what this value is returning.

Chris.

"Mark Sargent" <do*********@ho tmail.com> wrote in message
news:OX******** ******@TK2MSFTN GP09.phx.gbl...
Hi All,

why am I getting this error..? Cheers.

Mark Sargent.
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: '[string: ""]'
/Classifieds/ClassifiedImage Resize.asp, line 27

<%
' Create instance of AspJpeg
Set Jpeg = Server.CreateOb ject("Persits.J peg")

' Compute path to source image
Path = Server.MapPath( FilePath)

' Open source image
Jpeg.Open Path

' Create an instance of AspUpload object
Set Upload = Server.CreateOb ject("Persits.U pload")

' Decrease image size by %
((***Line 27***)) Jpeg.Width = Jpeg.OriginalWi dth * Upload.Form("sc ale") /
100
Jpeg.Height = Jpeg.OriginalHe ight * Upload.Form("sc ale") / 100

' Apply sharpening if necessary
' Jpeg.Sharpen 1, 130

' create thumbnail and save it to disk
FilePath = Replace(FilePat h, "/", "\")
FilePath = Replace(FilePat h, "ImageUploads\" , "")
Jpeg.Save Server.MapPath( "ImageUploads\T humbs") & "\Thumb" & FilePath
%>

Jul 19 '05 #3
"Mark Sargent" wrote...
((***Line 27***)) Jpeg.Width = Jpeg.OriginalWi dth * Upload.Form("sc ale") /
100
Jpeg.Height = Jpeg.OriginalHe ight * Upload.Form("sc ale") / 100

Try :

27: Jpeg.Width = Jpeg.OriginalWi dth * (CInt(Upload.Fo rm("scale")) / 100)

and

28: Jpeg.Height = Jpeg.OriginalHe ight * (CInt(Upload.Fo rm("scale")) / 100)

(I assume the next line was 28 etc...)

Regards

Rob


Jul 19 '05 #4
Hi All,

thanx..here is what is being passed to the problem page. Cheers.

Mark Sargent.

<HTML>
<HEAD>
<TITLE>AspJpe g - Form.asp</TITLE>
</HEAD>
<BODY>
<%
Dim FilePath
if Request.QuerySt ring("FilePath" ) <> "" then
FilePath = Request.QuerySt ring("FilePath" )
End If
Response.Write FilePath
%>
<!-- Image upload form. Notice the ENCTYPE attribute -->
<FORM ENCTYPE="multip art/form-data" METHOD="POST"
ACTION="Classif iedImageResize. asp?FilePath=<% =FilePath%>">
<TABLE CELLPADDING="3" CELLSPACING="0" BORDER="0" BGCOLOR="#00FF0 0"
align="center">
<TR>
<TD>Thumbnail Size:</TD>
<TD>
<SELECT NAME="scale">
<OPTION VALUE="75">75%
<OPTION VALUE="50">50%
<OPTION VALUE="25">25%
<OPTION VALUE="10">10%
</SELECT>
</TD>
</TR>
<TR>
<TD>Description :</TD>
<TD>
<TEXTAREA NAME="Descripti on"></TEXTAREA>
</TD>
</TR>
<TR>
<TD COLSPAN="2">
<INPUT TYPE="SUBMIT" VALUE="Upload">
</TD>
</TR>
</TABLE>
</FORM>

</BODY>
</HTML>
Jul 19 '05 #5
Here is the error I get after adding what you suggested, Rob...Cheers..

Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'CInt'
/Classifieds/ClassifiedImage Resize.asp, line 27
Jul 19 '05 #6
And what's on line 27 again?

Ray at home

"Mark Sargent" <do*********@ho tmail.com> wrote in message
news:Of******** ******@TK2MSFTN GP10.phx.gbl...
Here is the error I get after adding what you suggested, Rob...Cheers..

Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'CInt'
/Classifieds/ClassifiedImage Resize.asp, line 27

Jul 19 '05 #7
LINE 27:
Jpeg.Width = Jpeg.OriginalWi dth * Upload.Form("sc ale") / 100

Mark, you *can't* fix this using syntax until you determine that the
following are both numeric:

Jpeg.OriginalWi dth
Upload.Form("sc ale")

My money's on the second one not being numeric.

Do you know how to debug or do you need some pointers on what to do?

Chris.
"Mark Sargent" <do*********@ho tmail.com> wrote in message
news:Of******** ******@TK2MSFTN GP10.phx.gbl...
Here is the error I get after adding what you suggested, Rob...Cheers..

Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'CInt'
/Classifieds/ClassifiedImage Resize.asp, line 27

Jul 19 '05 #8
My money's on Chris.

<%
Response.write Jpeg.OriginalWi dth & "<br>"
Response.Write Upload.Form("sc ale")
Response.End
%>

Ray at work

"Chris Barber" <ch***@blue-canoe.co.uk.NOS PAM> wrote in message
news:OW******** ******@TK2MSFTN GP11.phx.gbl...
LINE 27:
Jpeg.Width = Jpeg.OriginalWi dth * Upload.Form("sc ale") / 100

Mark, you *can't* fix this using syntax until you determine that the
following are both numeric:

Jpeg.OriginalWi dth
Upload.Form("sc ale")

My money's on the second one not being numeric.

Do you know how to debug or do you need some pointers on what to do?

Chris.
"Mark Sargent" <do*********@ho tmail.com> wrote in message
news:Of******** ******@TK2MSFTN GP10.phx.gbl...
Here is the error I get after adding what you suggested, Rob...Cheers..

Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'CInt'
/Classifieds/ClassifiedImage Resize.asp, line 27

Jul 19 '05 #9
Hi All,

I see..Okay, after debugging, it appears that either nothing is passing to
the page or, I'm not calling Upload.Form("sc ale")
correctly as it doesn't write. I posted before the code from the page
passing the variables; have I got it wrong..? Cheers..

Mark Sargent.
Jul 19 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2801
by: dmgauntt2002 | last post by:
I have some javascript ASP code that sets the expiry date on a cookie to five years from now. The code worked until today, when I got the following error message: Microsoft JScript runtime (0x800A000D) Type mismatch The code was var expiryDate=new Date();
2
1847
by: Andrew Proctor | last post by:
Hello This is not a big problem, but I was hoping someone a bit more knowlegable than I could explain something to me. I have a simple function behind a form which writes changed values to a table for tracking purposes : Public Sub RecordChanges() Dim strInsertValue As String strInsertValue = "INSERT INTO
2
782
by: exsuscito | last post by:
After about 30 minutes of frustration I finally discovered what was causing a general 500 internal server error and to my surprise it was something I seem to always take for granted for its simplicity. A type mismatch error trying to compare a string to a numerical value, which is something that PHP has no problem or qualms with. However, this continuous problem continues to haunt me year after year and has brought me to tears with...
1
5950
by: melda | last post by:
I am a real beginnner in ASP. Due to increasing demands on dynamic website, I've been working on ASP website now. I use a ready to use CMS program and right now I've been trying to combine a calendar module into my CMS. The calendar works fine except that if I click on the date or the month earlier or later, the page always goes back to the first page which is first opened. You can take a look at this address:...
3
30915
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:
5
4411
by: Davros9 | last post by:
Trying to get Regular Expressions working....... ---------------- Public Function SepString(InField As String) As String ''seperates on space and comma Dim RE As New RegExp Dim Matches As Match RE.IgnoreCase = True
17
5071
imrosie
by: imrosie | last post by:
I've tried this string to Sum up payments, moving brackets and paren's different ways, I still get error 'type mismatch'....not sure why. Can anyone point me in the right direction?? thanks LineTotal: Sum(CLng(**(1-)*100)/100) Rosie
10
4582
by: dstorms | last post by:
Hi, I'm trying to create a button on a form that: 1. Takes the ComputerID from the form linked to Table 1, 2. Checks Table 2 for a matching ComputerID, and 3. Opens the query qryEditData, and 4. If no match can be found, adds a new record in Table 2 and enters the ComputerID automatcially. The goal is to create a new record in Table 2 when a new record is created in table 1 and have the ComputerID fields match with a 1-to-1...
7
4445
vikas251074
by: vikas251074 | last post by:
I am getting error above in following code since few days giving tension day and night. How can I solve this? I am facing since Oct.25. in line no. 362 After doing a lot of homework, I am surrendered to you. <%@ Language=VBScript%> <%Option Explicit%>
0
9568
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
10164
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
10007
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
9959
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
9835
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
8833
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
7379
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
5277
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...
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.