Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread EDBParameter object problem
Fri, Nov 20 2009 2:05 PMPermanent Link

"James Relyea"
Perhaps I am missing something simple (C#, VS2008, EDB2.03.b6):

2 lines of code to create an EDBParameter & set the DBType:
 Elevate.ElevateDB.Data.EDBParameter paramX =3D new =
Elevate.ElevateDB.Data.EDBParameter();
 paramX.DbType =3D Elevate.ElevateDB.Data.EDBType.Guid;


EDBParameter objects look like they're using System.Data.DBType objects =
instead of EDBType objects because when the values are set to EDBType =
enum values, cast errors are generated when compiling ("Cannot =
implicitly convert type 'Elevate.ElevateDB.Data.EDBType' to =
'System.Data.DbType'")

Right now, I'm dead in the water because TableAdapter.Update methods =
don't recognize open connections and I can't set param data types to use =
DataAdapters. I can't work.

Does anyone have any suggestions or maybe known work arounds? I can cast =
to compile but I doubt that'll work properly because of data =
conversions. I don't want to keep writing band-aids to keep making =
progress.

Smile

jr



Fri, Nov 20 2009 2:34 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

James,

<< Perhaps I am missing something simple (C#, VS2008, EDB2.03.b6):

2 lines of code to create an EDBParameter & set the DBType:
 Elevate.ElevateDB.Data.EDBParameter paramX = new
Elevate.ElevateDB.Data.EDBParameter();
 paramX.DbType = Elevate.ElevateDB.Data.EDBType.Guid;

EDBParameter objects look like they're using System.Data.DBType objects
instead of EDBType objects because when the values are set to EDBType enum
values, cast errors are generated when compiling ("Cannot implicitly convert
type 'Elevate.ElevateDB.Data.EDBType' to 'System.Data.DbType'") >>

Per the manual:

http://www.elevatesoft.com/manual?action=mantopic&id=edb2dac&category=3&topic=25

You need to set the ProviderType property if you want to use the EDBType to
determine the type of the parameter.

Also, see my prior response about auto-populating parameters.  You shouldn't
need to manually define parameters in most cases, just let EDB do it and
then all you have to do is assign the parameter values.

You can see more information on this here, also:

http://www.elevatesoft.com/articles?action=view&articleno=4

under "Automatic Parameter Population".

--
Tim Young
Elevate Software
www.elevatesoft.com

Sat, Nov 21 2009 12:03 AMPermanent Link

"James Relyea"
I am good now. Thanks.

Smile
jr


"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message
news:F8BEE302-95C7-423F-A17F-8EE63648BC4C@news.elevatesoft.com...
> James,
>
> << Perhaps I am missing something simple (C#, VS2008, EDB2.03.b6):
>
> 2 lines of code to create an EDBParameter & set the DBType:
>  Elevate.ElevateDB.Data.EDBParameter paramX = new
> Elevate.ElevateDB.Data.EDBParameter();
>  paramX.DbType = Elevate.ElevateDB.Data.EDBType.Guid;
>
> EDBParameter objects look like they're using System.Data.DBType objects
> instead of EDBType objects because when the values are set to EDBType enum
> values, cast errors are generated when compiling ("Cannot implicitly
> convert type 'Elevate.ElevateDB.Data.EDBType' to 'System.Data.DbType'") >>
>
> Per the manual:
>
> http://www.elevatesoft.com/manual?action=mantopic&id=edb2dac&category=3&topic=25
>
> You need to set the ProviderType property if you want to use the EDBType
> to determine the type of the parameter.
>
> Also, see my prior response about auto-populating parameters.  You
> shouldn't need to manually define parameters in most cases, just let EDB
> do it and then all you have to do is assign the parameter values.
>
> You can see more information on this here, also:
>
> http://www.elevatesoft.com/articles?action=view&articleno=4
>
> under "Automatic Parameter Population".
>
> --
> Tim Young
> Elevate Software
> www.elevatesoft.com
>

Image