Re: DeriveParameters and Jet OLEDB Provider
- From: "Stephany Young" <noone@localhost>
- Date: Mon, 4 Apr 2005 20:33:47 +1200
>From ADO.Command object:
<quote>
Using the Refresh method on a Command object's Parameters collection
retrieves provider-side parameter information for the stored procedure or
parameterized query specified in the Command object. The collection will be
empty for providers that do not support stored procedure calls or
parameterized queries.
<unquote>
>From OleDBCommandBuilder.DeriveParameters method:
<quote>
You can only use DeriveParameters with stored procedures. You cannot use
DeriveParameters to populate the OleDbParameterCollection with arbitrary
Transact-SQL statements, such as a parameterized SELECT statement.
<unquote>
In Jet a 'saved' query is not a stored procedure.
"Doug" <doug@xxxxxxxxxxxxxxxx> wrote in message
news:57F1EB53-5F0A-4A19-A52C-688D65AED9AE@xxxxxxxxxxxxxxxx
> Hi
>
> I've just discovered that the Jet OLEDB Provider does not support
> OleDbCommandBuilder.DeriveParameters, to discover the number and type of
> parameters expected by a Microsoft Access query.
>
> I'm a little surprised, as it was always possible to use the ADO Refresh
> method with this provider to populate a Paramters collection.
>
> Is there a reason for this? Is there a workaround?
>
> I know that it's an expensive operation which should be avoided anyway,
> but
> it's sometimes useful, and I'd like to use the same code against both
> Access
> and SQL Server.
>
> Thanks in advance.
>
> --
>
> Doug
.
- Follow-Ups:
- Re: DeriveParameters and Jet OLEDB Provider
- From: Kevin Yu [MSFT]
- Re: DeriveParameters and Jet OLEDB Provider
- References:
- DeriveParameters and Jet OLEDB Provider
- From: Doug
- DeriveParameters and Jet OLEDB Provider
- Prev by Date: Re: ADO.NET 2.0 - Question for Microsoft Employees
- Next by Date: Using Transactions in C#
- Previous by thread: DeriveParameters and Jet OLEDB Provider
- Next by thread: Re: DeriveParameters and Jet OLEDB Provider
- Index(es):
Relevant Pages
|