Home > Archive > SQL Anywhere database > December 2005 > No support for ICloneable in ASAParameter?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author No support for ICloneable in ASAParameter?
Karl Kemp

2005-12-16, 8:23 pm

I'm porting a data adapter written for SQLServer to work with ASA. I have
the following code:

clonedParameters[count] =
(AsaParameter)((IClo
neable)originalParam
eters[count]).Clone();

(originalParameters is declared as type AsaParameter)

At compile time, this produces the error:

"Cannot convert type 'iAnywhere.Data.AsaClient.AsaParameter' to
'System.ICloneable'"

Does AsaParameter not implement the ICloneable interface? All the MSFT
provided data providers do (OleDB, ODBC, Oracle, SQL, and SQLCE). I'm
running the CE ASAClient.



Scott Holman

2005-12-19, 11:23 am

Karl,

AsaCommand, AsaConnection and AsaDataAdapter also suffer from this problem.
This is quite unfortunate because it makes using ASA with Microsoft's
Enterprise Library Data Access Application Block extremely difficult. Had
ICloneable been implemented by ASA then it would have been quite easy to use
ASA with the data access application block or change existing code from
SqlParameter, SqlCommand ... to ASAParameter, ASACommand ....





"Karl Kemp" <kkemp@prezzatech.com> wrote in message
news:43a33e63$1@foru
ms-2-dub...
> I'm porting a data adapter written for SQLServer to work with ASA. I have
> the following code:
>
> clonedParameters[count] =
> (AsaParameter)((IClo
neable)originalParam
eters[count]).Clone();
>
> (originalParameters is declared as type AsaParameter)
>
> At compile time, this produces the error:
>
> "Cannot convert type 'iAnywhere.Data.AsaClient.AsaParameter' to
> 'System.ICloneable'"
>
> Does AsaParameter not implement the ICloneable interface? All the MSFT
> provided data providers do (OleDB, ODBC, Oracle, SQL, and SQLCE). I'm
> running the CE ASAClient.
>
>
>



Scott Holman

2005-12-19, 11:23 am

There is also a difference in the inheritance of SqlDataAdapter and
ASADataAdapter that may cause issues with your port. SqlDataAdapter derives
from DbDataAdapter while ASADataAdapter derives from Component.


"Scott Holman" <sholman@micros.com> wrote in message
news:43a6db85@forums
-2-dub...
> Karl,
>
> AsaCommand, AsaConnection and AsaDataAdapter also suffer from this
> problem. This is quite unfortunate because it makes using ASA with
> Microsoft's Enterprise Library Data Access Application Block extremely
> difficult. Had ICloneable been implemented by ASA then it would have been
> quite easy to use ASA with the data access application block or change
> existing code from SqlParameter, SqlCommand ... to ASAParameter,
> ASACommand ....
>
>
>
>
>
> "Karl Kemp" <kkemp@prezzatech.com> wrote in message
> news:43a33e63$1@foru
ms-2-dub...
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com