473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Strange Error in Function

Can anyone help me with this error?

code start ____________________________________________
Microsoft VBScript compilation error '800a03ee'
Expected ')'
/example.asp, line 142
Private Function FuncDiff(ByVal DateOne As DateTime, ByVal DateTwo As
DateTime)
------------------------------------------^
code end ____________________________________________

(for those of you using proportional fonts, the ^ is pointing to the space
between "DateOne^As")

The surrounding code is

<%
Private Function FuncDiff(ByVal DateOne As DateTime, ByVal DateTwo As
DateTime)
Dim Year1, Month1, Day1 As Integer
:
%>

A Google on this didn't help. The code looks good to me (of course).

Anybody have any ideas how to fix this?

THANKS,

Tony

Jul 22 '05 #1
3 1672
Tony wrote:
Can anyone help me with this error?

code start ____________________________________________
Microsoft VBScript compilation error '800a03ee'
Expected ')'
/example.asp, line 142
Private Function FuncDiff(ByVal DateOne As DateTime, ByVal DateTwo As
DateTime)
------------------------------------------^

All variables are variants in vbscript. It is illegal to try to asssign
datatypes to them

Private Function FuncDiff(ByVal DateOne , ByVal DateTwo)
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 22 '05 #2

"Bob Barrows [MVP]" wrote...
Tony wrote:
Can anyone help me with this error?

code start ____________________________________________
Microsoft VBScript compilation error '800a03ee'
Expected ')'
/example.asp, line 142
Private Function FuncDiff(ByVal DateOne As DateTime, ByVal DateTwo As
DateTime)
------------------------------------------^

All variables are variants in vbscript. It is illegal to try to asssign
datatypes to them

Private Function FuncDiff(ByVal DateOne , ByVal DateTwo)
--


Got it - thanks, Bob. But I've got a new problem - when the function tries
to return a string, I'm getting
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'Return'

How do I define an ASP function so as to return a string?


Jul 22 '05 #3
"Tony" wrote...
:
Got it - thanks, Bob. But I've got a new problem - when the function tries
to return a string, I'm getting
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'Return'

How do I define an ASP function so as to return a string?


Never mind, I fixed it.
Instead of

Private Function FuncDiff(ByVal DateOne , ByVal DateTwo)

' answer is the return value
Return answer

I needed

FuncDiff = answer

Jul 22 '05 #4

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

Similar topics

2
by: inonzuk | last post by:
why strange you ask? here goes: I have been working with Php and Mysql for a week without any problems. Today I tried executing a php page that connects to mysql and creates a new database, I...
2
by: Olaf | last post by:
I have a frameset page witch contains the myFuc() function. The function is accessed from a page in one of the frames in the frameset. An example is shown below. <input...
6
by: WindAndWaves | last post by:
Hi Gurus The page below has a strange error. It seems to be working very well, just when you enter 8 or 9 for day, month or year then you get an error. I really have no idea where that is...
3
by: Bruno van Dooren | last post by:
Hi All, i have some (3) different weird pointer problems that have me stumped. i suspect that the compiler behavior is correct because gcc shows the same results. ...
8
by: grundmann | last post by:
Hello, i got a strange compiler error. When compiling the following: // forward declarations typedef AvlTree<LineSegment,LineSegmentComperator> LSTree; void handleEventPoint (const...
25
by: Neil Ginsberg | last post by:
I have a strange situation with my Access 2000 database. I have code in the database which has worked fine for years, and now all of a sudden doesn't work fine on one or two of my client's...
6
by: Gary | last post by:
I have an application that has been working just fine for a couple of years. It queries a SQL database and returns some formatted data back to the client. I have a new client, who has a larger...
4
by: Praveen_db2 | last post by:
Hi All I am getting strange errors in my db2diag.log can any one tell me what these errors mean?? Following is the code from my db2diag.log...
0
by: Wescotte | last post by:
<?php global $TABLE_GL_DATA; global $connect; $PREPARED_SQL = odbc_prepare($connect, "INSERT INTO $TABLE_GL_DATA VALUES (?,?,?,?,?,?,?)"); function Generate_GL_Data() {
4
by: Hole | last post by:
Hi There! I'm trying to use Zope and the product OpenFlow. I got the following error while I was using the built-in function getattr() to retrieve an OpenFlow object: attribute name must be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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...
0
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...
0
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...

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.