[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

VBS Runtime error 800A000D - Type mismatch

Posted on 2014-08-15
7
Medium Priority
?
469 Views
Last Modified: 2014-08-20
Hello i have this code:

<%@ LANGUAGE="VBSCRIPT" %>

<%
Function RndStr(Length, UseChrs)
 If IsNull(UseChrs) OR (UseChrs = "") Then UseChrs = "0123456789abcdefghijklmnopqrstuvwxyz!@#$%^&*()_+=-"
 NewStr = ""
 Randomize(CByte(Left(Right(Time(),5),2)))
 For gpIndex = 1 To Length
  NewStr = NewStr & Mid(UseChrs, Int((Len(UseChrs)) * Rnd + 1), 1)
 Next
 RndStr = NewStr
End Function
%>

<HTML>
<HEAD>
<TITLE>Info</TITLE>
</HEAD>
<BODY  bgcolor="#FFFFFF">

<font face="Arial" color="#000000" size ="2">

<br>
<textarea rows="20" cols="200" STYLE="font-family: Arial; font-size: 12px; background-color: #E8E8E8; word-wrap: normal; overflow: auto;">


Cookie = "<%= RndStr(40,"0123456789abcdefghijklmnopqrstuvwxyz")%>"
Password = "<%= RndStr(40,"0123456789abcdefghijklmnopqrstuvwxyz")%>"

</textarea>

</font>

</BODY>
</HTML>

Open in new window


   But when I run i get this error "VBS Runtime error 800A000D - Type mismatch"
Any know why is not working or what is needed to change to make work?
Thank you
0
Comment
Question by:coerrace
  • 4
  • 3
7 Comments
 
LVL 34

Expert Comment

by:Big Monty
ID: 40263713
What line is the error occurring?
0
 

Author Comment

by:coerrace
ID: 40263724
This area:

Cookie = "<%= RndStr(40,"0123456789abcdefghijklmnopqrstuvwxyz")%>"
Password = "<%= RndStr(40,"0123456789abcdefghijklmnopqrstuvwxyz")%>"

Open in new window

0
 
LVL 34

Expert Comment

by:Big Monty
ID: 40263731
Try running the code directly (not through the function) that should give you a better sense where the error occurs
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:coerrace
ID: 40263787
I used this:

<%

 If IsNull(UseChrs) OR (UseChrs = "") Then UseChrs = "0123456789abcdefghijklmnopqrstuvwxyz!@#$%^&*()_+=-"
 NewStr = ""
 Randomize(CByte(Left(Right(Time(),5),2)))
 For gpIndex = 1 To Length
  NewStr = NewStr & Mid(UseChrs, Int((Len(UseChrs)) * Rnd + 1), 1)
 Next
 RndStr = NewStr
 CookieEncryptionKey = RndStr(40,"0123456789abcdefghijklmnopqrstuvwxyz")
 PasswordEncryptionKey = RndStr(40,"0123456789abcdefghijklmnopqrstuvwxyz")
 Response.write (CookieEncryptionKey)
Response.write ("pass" & PasswordEncryptionKey)


%>

Open in new window



   And now the error say:

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'CByte'
0
 
LVL 34

Expert Comment

by:Big Monty
ID: 40263802
Change cbyte to cdbl
0
 

Accepted Solution

by:
coerrace earned 0 total points
ID: 40263870
Not work but i solved adding this:


<% Session.LCID = 2057 %>

Open in new window

after

<%@ LANGUAGE="VBSCRIPT" %>

Open in new window


Is a problem of regional settings on the server but with that is solved thank you anyway
0
 

Author Closing Comment

by:coerrace
ID: 40272110
Solved
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses
Course of the Month18 days, 3 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question