RE: Error MSDAAB ExecuteDataset

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi larzeb,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that when you are using
SqlHelper.ExecuteDataSet method to execute a stored procedure which fills a
DataSet, an error stating that there is no stored procedure with the name
of '4' was generated. If there is any misunderstanding, please feel free to
let me know.

Thanks for your code to repro the problem. I tried your code on my machine.
And I can reproduce it. Based on my research, this occurs because the array
of parameters are untyped. It is an object array. In VB, it gives the
compiler different meanings, which makes the compiler calls the incorrect
overload of ExecuteDataSet

Actually, it is calling this overload:

public static DataSet ExecuteDataset(string connectionString, string
spName, params object[] parameterValues)

So in the error message, we see spName as '4'. The resolution is to dim the
param array as an SqlParameter array like the following:

Dim parm() as SqlParameter = New SqlParameter(0) {}

Also, in a VB project, it is suggested to turn on the Option Strict. When
you turn in on in the project setting page, you will see the error for
overload resolution in the Task List window.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

.



Relevant Pages

  • Re: I dont understand the definition of DOES>
    ... on stack on code entry). ... You can use DOES to make ARRAY and then use ARRAY ... CREATE CELLS ALLOT ... First you'd make the code that will execute on the child word. ...
    (comp.lang.forth)
  • Re: Special characters and superscripts in PostScript and EPS
    ... When does one use bind def and load def? ... what you actually are doing is creating an executable array on the stack ... When you execute the array, if it contains any names the interpreter ... The 'load' operator searches dictionaries looking for a named value. ...
    (comp.lang.postscript)
  • Re: Space leak in Haskell code
    ... prettiness, here's another solution. ... It's 2-3 times slower than C++, ... code the recursion in execute'. ... access the array, or using unsafeAt, but the first won't work in my ...
    (comp.lang.functional)
  • Re: Code wont execute Main Macro Calls - non breaking spaces
    ... I am going to attach my first array which is the same as you have ... So each macro will execute one after the other. ... separated each find string and each replace string for the sake of ...
    (microsoft.public.word.vba.general)
  • Re: Does Array Declaration Provide Zero Initial Values ??
    ... executable statement will execute many thousands of times faster ... Results in a small object file and small executable file. ... Presumably this is a C-ism as C requires static variables to be zero ... the other array elements are zero. ...
    (comp.lang.fortran)