hi all, i'm using the client 2.5.2.0 from a net 2.0 project with a window fb
server
i have ths tables:
table:user_infos
column: ID integer
table view_infos
column:ID integer
table:User_Views_Map
column: view_id integer //FK to view_infos.ID
column: User_Id integer //FK to user_infos.ID
(in my code this is used to map a user object wich have a collection of views)
i have this query to get all the users wich have a specific view
select userinfo0_.id as x0_0_
from user_infos userinfo0_
where (@p0 in(select views1_.View_Id from User_Views_Map views1_ where
userinfo0_.id=views1_.User_Id))
(the alias are autogenerates)
my problem is that i get this exception
Dynamic SQL Error
SQL error code = -804
Data type unknown
this is the c# code to reproduce it
string connString = ***;
string query = "select userinfo0_.id as x0_0_ from user_infos
userinfo0_ where (@p0 in(select views1_.View_Id from User_Views_Map views1_
where userinfo0_.id=views1_.User_Id))";
using (FbConnection conn = new FbConnection(connString))
{
conn.Open();
using (FbCommand cmd = conn.CreateCommand())
{
cmd.CommandText = query;
cmd.Parameters.Add("@p0", FbDbType.Integer);
cmd.Parameters[0].Value = 2021;
using (FbDataReader reader = cmd.ExecuteReader())
{
reader.Read();
}
}
}
note:the code to set the parameters can be commented
note 2: if i do the query directly to firebird all is ok so the problem is with
the .net data provider
it's a bug or i'm doing samething wrong?
thanks
------------------------------------------------------------------------------
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider