It was decided that we would store files the user selects in the database for several reason. I've implemented this in 2 databases, since we are using Sql Express on the clients db size was in mind. One db has the record for the data about the file with an FK to the other database with the file data.
The database with the file data has one table, with 2 fields, a PK and the varbinary(max) field. I haven't had any problems navigating between the business objects, editing and deleted. The problem I'm having is with adding a new file.
The Code basically instances the FileData BO, creates a newrow (the PK Guid is generated by code in the BO), sets the varbinary(max) field to the byte array returned from the My.Computer.FileSystem.ReadAllBytes method. Then I call save on the BusinessObject.
This method runs great with small files < 1mb, but if it goes over say 10-15mb it hangs and errors out. So I thought I would step through and see where it is dropping out. But when I step through the code, it seems to run and complete and returns the Microfour.Strataframe.Business.SaveOjbect (forgot the whole namespace) Success.
So I ditched the BusinessObject thinking it was just having problems with varbinary(max) fields and just wrote the ADO code, but then I remember you guys talking about storing images in your Medical software in a similar fashion.
So I figured I'd throw this to you guys and see if you have any pointers.
Thanks,
Robin Giltner