Common namespace, Boolean and Currency

Common namespace, Boolean and Currency

Postby JvanDorsten » Thu 19 Jan 2006 11:07

Why do i get an error when i use the DbType.Boolean and DbType.Currency value in the Common namespace when i try to set them into a parameter.

Can't you internaly convert the type to a type you can handle, so i can use the boolean and currency value within the common namespace?
Now i have to build in an workaround only for MySQL, Jet and MsSql works fine.
JvanDorsten
 
Posts: 10
Joined: Tue 03 Jan 2006 15:59

Postby Serious » Thu 19 Jan 2006 12:37

There is no Currency type in MySQL Database. Boolean values are fetched as Int16 (MySqlType.TinyInt).
Please use MySqlType enumeration when defining MySqlParameter's type.
Serious
 

Postby JvanDorsten » Thu 19 Jan 2006 15:25

Serious wrote:There is no Currency type in MySQL Database. Boolean values are fetched as Int16 (MySqlType.TinyInt).
Please use MySqlType enumeration when defining MySqlParameter's type.


I understand, but that is not what i want i want to work with the common namespace and the providerfactory. I have an method wich loads a serie of parameters independently from an server type.

Only MySQL does not know the boolean type, MsSQL and JET do. When i use the common namespace (wich i want) i have to program an exception for MySql.

I think, since MySQLDirect implements the Common namespace it should also work with the dbType.Boolean type, internally it can convert it to the int16 type.

It is not a question, rather an request for a next update.
JvanDorsten
 
Posts: 10
Joined: Tue 03 Jan 2006 15:59

Postby Serious » Thu 19 Jan 2006 15:54

In MySQL BOOLEAN data type is just a synonym for TINYINT. Query metadata has no information what type is actually fetched, BOOLEAN or TINYINT, so we can't distinguish them. MySQL developers say that full boolean type handling will be introduced in future versions in accordance with standard SQL. When MySQL will support this in protocol, we will support it too.
We also do not know what type in your MySQL schema represents currency data, so we cannot map DbType.Currency type to any of MySqlType enumeration value.
Serious
 

Postby JvanDorsten » Fri 20 Jan 2006 06:58

Ok Clear, thanks for you reply.
JvanDorsten
 
Posts: 10
Joined: Tue 03 Jan 2006 15:59


Return to dotConnect for MySQL