It could also be that the SQLParameter system doesn't understand
NSData. It's just a byte[] under the hood, but you might have to do
something to pull that out.

On Wed, Apr 18, 2012 at 17:31, chris.s <[email protected]> wrote:
> Thanks for the reply.
>
> 'Going round the houses' does work, even tho 'data' reports as being null
> despite having a valid Length property.
>
> The actual image I'm saving is a 'captured signature', but I've eliminated
> any problem with that by loading an existing image on the device using...
>
> NSData data = UIImage.FromFile(@"sampleimage.png").AsPNG();
>
> which gives the same error sql error.
>
> I'm now wondering if the setting of the parameter value using ...
>
> command.Parameters[0].Value = data;
>
> ... is assigning null to the parameter value and causing the sql error since
> 'data' shows as being null despite it containing valid image data,
> especially when you recall the error is 'Argument cannot be null'.
>
> Chris
>
>
>
>
>
>
>
>
> --
> View this message in context: 
> http://monotouch.2284126.n4.nabble.com/Inserting-image-into-SQLite-tp4565016p4568237.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch



-- 
Nic Wise
t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
b. http://www.fastchicken.co.nz/

Earnest: Self-employed? Track your business expenses and income.
http://earnestapp.com
Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p
mobileAgent (for FreeAgent): get your accounts in your pocket.
http://goo.gl/IuBU
Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to