RE: Error MSDAAB ExecuteDataset
- From: v-kevy@xxxxxxxxxxxxxxxxxxxx (Kevin Yu [MSFT])
- Date: Fri, 27 May 2005 02:58:46 GMT
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."
.
- References:
- Error MSDAAB ExecuteDataset
- From: larzeb
- Error MSDAAB ExecuteDataset
- Prev by Date: CSV read problem using Jet OLEDB
- Next by Date: Re: How does Dataset.Relations work internally?
- Previous by thread: Error MSDAAB ExecuteDataset
- Next by thread: Re: Error MSDAAB ExecuteDataset
- Index(es):
Relevant Pages
|