Hi, we are migrating an existing application from Corelab.Postgresql to dotconnect for Postgresql but constrained by the many Uuid data types that are treated as a string data type.
can dotconnect treat Uuid data type as a string as in Corelab. Postgresql?
string _oid = par_ds.Tables ("os"). Rows (i). Item ("oid");
CoreLab.PostgreSql => OK
DotConnect PostgreSql => ERROR
we cannot use the search and replace feature, I'm afraid.., it's too many cases.
Uuid data type as a string data type
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Uuid data type as a string data type
The UUID type is mapped to System.Guid. It is the designed behaviour. And we recommend you to use Guid values instead of string ones and replace code that casts them to strings in your program. If it is not possible or will take a lot of time, we can create a static class with a static property, which will force returning string values from UUID columns. Please post here whether such solution suits you.
-
- Posts: 9
- Joined: Thu 13 Dec 2018 07:25
Re: Uuid data type as a string data type
i know, but when using CoreLab.PostgreSql, we did not cast to anything, it just works, but when we migrate to the latest version of dotconnect.. all uuid columns stop working, invalid data type.
we use old CoreLab.PostgreSql (PostgreSQLDirect .NET)
we are migrating from Net Framework 2.0 to 4.7 (VS 2008 to VS 2017)
can you give me an example on how to "create a static class with a static property, which will force returning string values from UUID columns" please?
we use old CoreLab.PostgreSql (PostgreSQLDirect .NET)
we are migrating from Net Framework 2.0 to 4.7 (VS 2008 to VS 2017)
can you give me an example on how to "create a static class with a static property, which will force returning string values from UUID columns" please?
-
- Posts: 9
- Joined: Thu 13 Dec 2018 07:25
Re: Uuid data type as a string data type
Sorry for the delay.
We will implement this option (static property) and provide the internal build to you.tommyiraone wrote: ↑Tue 09 Jul 2019 18:53can you give me an example on how to "create a static class with a static property, which will force returning string values from UUID columns" please?
Re: Uuid data type as a string data type
The build is provided by email.
-
- Posts: 9
- Joined: Thu 13 Dec 2018 07:25
Re: Uuid data type as a string data type
it works like a charm, thank you.