in VB 2005 the class myClass, I have
Dim someStringArrar y() As String
---
sub New()
MyBase.New()
... 'values assigned to elements of someStringArrar y
End Sub
......
Function xxx() As String()
return someStringArrar y
End Function
Function getxxxSz() As Integer
Return
End Function
In vbscript I have
set objMyClass = CreateObject((" myClass.myClass ") " work fine so far
....
Dim strResults()
strResults = objMyClass.xxx " give me type mismatch
I even tried in vbscript
Dim strResults(), sz
sz = objMyClass.getx xxSz()
ReDim strResults(sz) ' I tried with and without this statement'
strResults = objMyClass.xxx " still give me type mismatch
what should I do instead of getting values element by elements 3 2160
jg wrote: in VB 2005 the class myClass, I have
Dim someStringArrar y() As String
Function xxx() As String() return someStringArrar y End Function
In vbscript I have set objMyClass = CreateObject((" myClass.myClass ") " work fine so far .... Dim strResults() strResults = objMyClass.xxx " give me type mismatch
I believe strings are handled differently in .Net than in vbscript. In
..Net they are actually classes, but in vbscript they are strings. Maybe
you could have your class return an array, and in vbscript dim the
strResults() as Any?
Just a guess.
Tom
what should I do instead of getting values element by elements
"as any" in VB script?
Or do you mean as VB DOT?
"ng" <t_*****@yahoo. com> wrote in message
news:EX******** *********@bigne ws1.bellsouth.n et... jg wrote:
in VB 2005 the class myClass, I have
Dim someStringArrar y() As String
Function xxx() As String() return someStringArrar y End Function
In vbscript I have set objMyClass = CreateObject((" myClass.myClass ") " work fine so far .... Dim strResults() strResults = objMyClass.xxx " give me type mismatch
I believe strings are handled differently in .Net than in vbscript. In .Net they are actually classes, but in vbscript they are strings. Maybe you could have your class return an array, and in vbscript dim the strResults() as Any? Just a guess.
Tom
what should I do instead of getting values element by elements
perhaps in the vbScript, try:
Dim strResults
set strResults = objMyClass.xxx
"jg" <ju**@mail.pl s> wrote in message
news:Ot******** ******@TK2MSFTN GP14.phx.gbl...
in VB 2005 the class myClass, I have
Dim someStringArrar y() As String
---
sub New()
MyBase.New()
... 'values assigned to elements of someStringArrar y
End Sub
......
Function xxx() As String()
return someStringArrar y
End Function
Function getxxxSz() As Integer
Return
End Function
In vbscript I have
set objMyClass = CreateObject((" myClass.myClass ") " work fine so far
....
Dim strResults()
strResults = objMyClass.xxx " give me type mismatch
I even tried in vbscript
Dim strResults(), sz
sz = objMyClass.getx xxSz()
ReDim strResults(sz) ' I tried with and without this statement'
strResults = objMyClass.xxx " still give me type mismatch
what should I do instead of getting values element by elements This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Arun Wadhawan |
last post by:
Hello
MY SQL Server is causing me this problem :
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'ident'
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
I am getting from the table datingnew the value of the ident field.
|
by: LJgrnl |
last post by:
I've got a type mismatch error that's driving me nutty. Variable blnNoData
has the initial value False. If a recordset comes back empty (both .EOF and
..BOF are true) then blnNoData is set to True. I then have an if statement to
determine what to write to the screen depending on blnNoData. As long as the
if statement is true (doesn't have to go to the else clause), the code runs
fine. Otherwise, a type mismatch error is returned. In...
|
by: Mark |
last post by:
Hi - I tried this in VS.Net, and also in the Web Matrix code below: -
but I am getting a type mismatch error.
The sql statement runs perfectly from within the Access Query Designer.
Can anyone verify the syntax, and that my .net code is ok - the type
mismatch is happening at: DataGrid1.DataSource =
myCommand.ExecuteReader(CommandBehavior.CloseConnection)
Thanks in advance,
|
by: middletree |
last post by:
I've been messing with this for hours, and have been to various sites,
including Aaron's site, and am truly stumped.
The short version: in SQL Server, the 4 fields in question are datetime. I
have a page that allows users to type in the info (actually a calendar
pop-up allows me to make sure they do it in the correct format), into a
textbox.
When this page gets called up again, I want to prefill the box with the
existing data, in case...
|
by: Mike |
last post by:
I am getting a type mismatch error when I do a bulk insert.
---Begin Error Msg---
Server: Msg 4864, Level 16, State 1, Line 1
Bulk insert data conversion error (type mismatch) for row 1, column 14
(STDCOST).
---End Error Msg---
The STDCOST is set to decimal (28,14) and is a formatted in Access as a
number, single with 14 decimal. I don't know why I would be getting a Type
| |
by: amitbadgi |
last post by:
I am getting teh following error while converting an asp application to
asp.net,
Exception Details: System.Runtime.InteropServices.COMException: Type
mismatch.
Source Error:
Line 347: 'response.Write(sql2)
|
by: Brett |
last post by:
I have a form that calls a method within a DLL. By clicking a button on the
form, the DLL is instantiated and the SaveOutlookMessage() method invoked.
The DLL code copies messages from Outlook to an HTML file. When I execute
the EXE, which is only the form, and click the button, I get a "Type
Mismatch" error on this line in the form: mailobj.SaveOutlookMessage()
Any suggestions on why I'm getting the type mismatch error?
--Form code
|
by: Howard Kaikow |
last post by:
I'm doing a VB 6 project in which I am trying to protect against type
mismatch errors.
Is the process any different in VB .NET?
Here's what I'm doing in VB 6.
I have an ActiveX DLL.
The class has stuff initialized by calling a sub SetClass that wants some
Word specific objects passed-in.
If the user mistakingly uses the wrong object, say, uses an Excel object
|
by: kjworm |
last post by:
Hello Everyone,
I have been fighting with a type mismatch error for many hours today and I can't seem to find what the problem is. Hopefully it is more than a missing apostrophe! I have isolated each SQL statement using a MsgBox and then input that exact code as a Query in access which works. I'm using Access 97 on Windows XP. My code is below:
Dim strKaizen As String
strKaizen = "UPDATE KaizenEvents SET(TeamLeader)= '" & & "' WHERE...
|
by: Lysander |
last post by:
I have written a query that takes three integers representing day,month and year, forms a date from them and compares this date to the date the record was entered and returns any records where the date is more than 10 months out.
The query runs fine, but I when I put the criteria of >10 I get 'Data Type mismatch' error. The code below is the original query. I have since put all the datediff bit in code, with all variables declared as date,...
|
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...
| |
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,...
|
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...
|
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,...
|
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...
|
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...
|
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...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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...
| |