From: Christopher W. <chr...@ad...> - 2003-05-29 14:30:25
|
Hello, I am attempting to use the Firebird Net-Provider to store binary data that can be included in a where clause. I am modifying code that works on MS SQL Server where the column is varbinary with a length of 4096. If I use a blob subtype binary, NetProvider works fine on the insert, but I also want to be able to delete rows based on the value contained in the binary data. Someone please correct me if I am wrong, but the firebird blob seems only for storage and retrieval and it does not appear you can use it as a column in the where clause... I researched it a bit on the web and I have seen the recommendation to store binary data by using char(size) character set octets. Apparently, firebird won't perform any transliteration on the data and stores it in its native binary format. I have tried this solution using the Net-Provider two different ways and in both cases it throws an Invalid Cast exception. I tried setting the FbType of the parameter to Char and also setting it to Binary... I was also wondering if I should use C# to somehow transform the byte[] into a string representing the binary information... Any suggestions on how to solve this problem would be greatly appreciated. Regards, Chris Whelan |