I use System.Data.SQLite library for working with databse file, avoiding any specific class names connected with that library, using interface names. e.g. IDbConnection = new SQLiteConnection, and etc.
So Instead of SQLiteCommand i have IDbCommand interface instance.
The problem that i want to add BLOB data into my command and i cannot do this, as IDbCommand.Properties.Add() has no suitable implementation for me - it only accepts object parameter.
I cannot use SQLiteCommand class name explicitly, so i need to find some proper way to do as in example i've found (http://www.akadia.com/services/dotnet_read_write_blob.html):
sqliteCommand.Parameters.Add("@Photo",
SqlDbType.Image, photo.Length).Value = photo;
Why do i do like this? In future, i probably will use my code for remote SQL connections, not just SQLite.... Really need to find some solution...
Thank you!
photo? is it abyte[]? Also: do you meanIDbCommand.Parameters.Add()?