From: F L <flo...@ho...> - 2003-08-22 07:46:11
|
Hello, >Which version of Firebird and .NET Provider are you using ?? I'm using Firebird 1.0.2 & .NET Provider 1.1 Alpha 2 >Can you send a test case ?? OK, well, I'm sending a snippet of the code I use. I've tried it different ways I still end up having an error somewhere. The thing is the app some times kind of freezes, but most of the times I get the same error. The error codes I get are 335544794 and 335544569. I've tried to pinpoint the problem exactly but the closest I've gotten to see where the error lies is that it complains that there is an unknown token, which is the ] in System.Byte[] that is passed as a parameter, which is the Byte array that has my file. Anyway, the code I use the get the byte array is this: string strPracticeBlob = this.txtDemoPic.Text.Trim(); FileStream fsPracticeBlob = new FileStream(strPracticeBlob, FileMode.Open, FileAccess.Read); Byte[] bytePracticeBlob = new Byte[fsPracticeBlob.Length]; fsPracticeBlob.Read(bytePracticeBlob, 0, bytePracticeBlob.Length); fsPracticeBlob.Close(); And then I call my procedure...(I omitted where I make the connection and all that before I use the command for the purpose of this mail) FbCommand myCommand = new FbCommand(); myCommand.CommandText = "EXECUTE PROCEDURE SP_INSERT_PROC(?,?,?,?,?,?)"; myCommand.Connection = connection; myCommand.Transaction = transaction; myCommand.CommandType = CommandType.StoredProcedure; // other parameters are added // bytePracticeBlob is a Byte[] myCommand.Parameters.Add("@PRACTICE", FbType.Binary).Value = bytePracticeBlob; myCommand.ExecuteNonQuery(); transaction.Commit(); myCommand.Dispose(); the error happens at ExecuteNonQuery() Any ideas? Let me know if more code is needed to pinpoint my problem. Thanks again for your help. Lopez _________________________________________________________________ Get MSN 8 and help protect your children with advanced parental controls. http://join.msn.com/?page=features/parental |