type-mismatch

"Type mismatch" error when calling a simple method in a c# assembly registered for COM interop

I've build a classlibrary using c# and the .net framework 3.5. In my class library there is a class called Utilities with two methods. public string Method1(int length) { } public string Method2(int length, string aStringParameter) { } Now I went and build a simple asp page calling my methods. Method1 work like a charm. Method2 cause...

VBScript Type Mismatch

I have a type mismatch in my VBScript script. I know that the value is correct, but not sure why it's coming up. This is the line where the script terminates: WScript.Echo "DNS Server Search Order: " & objNicItem.DNSServerSearchOrder The script requires a file named servers.txt (which has a list of servers in it, I am tesing using my...

Dictionary Type mismatch in VBScript

The error I'm receiving is: Type mismatch: 'stylesheets' Stylesheets is defined as: sub stylesheets(collection) for each key in collection.Keys response.write(stylesheet(key, collection.Item(key))) next end sub ' returns a link tag for each object in the collection function stylesheet(asset, media_type) if (media_type...

Create WCF client programmatically...

Hello all, I have a website with a Silverlight-enabled WCF service. The service works fine, and I can browse to the WSDL page in the browser with no problems. Now, I am trying to create a client in a DLL. I need to create the whole client programmatically though, because it is being called in a DLL, which for whatever reason (by design...

VB6 Type Mismatch in For loop condition

I have been trying to find out why in the following code, the third time through the loop I am getting a Error type 13 Mismatch when the line "For lCount = 0 To maxCount" is being evaluated. I had originally thought the problem was in getting the value from the vArray, but testing shows it to be triggered by the "For" line. I haven't a c...

varargs puzzle?

I'm sure the answer is pretty simple, but I got stuck in this: Welcome to Scala version 2.7.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_14). Type in expressions to have them evaluated. Type :help for more information. scala> def f(x:Int*)=0 f: (Int*)Int scala> val xs:Seq[Int]=1::2::3::4::Nil xs: Seq[Int] = List(1, 2, 3, 4) ...

DBD::SQLite::st execute failed: datatype mismatch

Here's a snippit of perl code: sub insert_timesheet { my $dbh = shift; my $entryref = shift; my $insertme = join(',', @_); my $values_template = '?, ' x scalar(@_); chop $values_template; chop $values_template; #remove trailing comma my $insert = "INSERT INTO timesheet( $insertme ) VALUES ( $values_template...

Type-mismatch in between List.reduce and defined type

Hello guys, I'm trying to make a function array, which I'm using inside a List.reduce HOF. I used to have a let minimax = [| (min : int->int->int); max |] which was working great, but now I want to get the max value of a list, so I thought: let minimax = [|List.min; List.max|] This, however, throws the following error: Minimax.f...

Parametric type + function requires a string as second parameter?

class TestClass[T](val x: T) { def +(other: TestClass[T]) = x + other.x } this definition gives me the following compile error: error: type mismatch; found : T required: String def +(other: TestClass[T]) = x + other.x is it not possible to use Int or Double as a type parameter and use addition in Scala?? ...

Null check on a COleVariant

Is it possible to do a null check on a COleVariant or at the very least check if it's type is set to VT_NULL? I see that there is a ChangeType() method but was hoping I could somehow figure out what the current type was before I attempt to change the type as changing from VT_NULL to VT_INT throws a type mismatch. ...

Why can't i do this iteration with json data?

I tried this, var rows = []; for (var i = 0; i < 10; i++) { rows.push(['row' + i, i]); } data.addRows(rows); This seems to work but when i do the same with json, var data = new google.visualization.DataTable(); data.addColumn('string', 'dbZipcode'); data.addColumn('number', 'countusers'); var rows = [...

Generics - Type mismatch when providing a concrete type to a generic class

Hi, Simple Java generics question: I have two classes - one of which uses generics to define its type, the other which extends this class providing a concrete type. public class Box<Item> { ... } public class Toolbox extends Box<Tool>{ ... } Given that Toolbox extends Box providing a Tool as the actual type for the generic ...