Re: [sqlite] Reading Blob/Writing to File in C# 2008
Hmmm, I know I've done this before. I'll have to dig deeper and find an example. -- Joel LucsySeysan wrote: When I used your code I get: No current row If I use: rdr.Read(); before your code, I get the same exception as before. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Reading Blob/Writing to File in C# 2008
On Tue, Jun 16, 2009 at 6:44 PM, Seysanwrote: > String cmd = String.Format("SELECT filename,content FROM documents > WHERE did={0}",did); > contentCommand = sqlconn.CreateCommand(); > contentCommand.CommandText = cmd; > rdr = contentCommand.ExecuteReader(); If rdr is a IDataReader, then it should work like: int len = rdr.GetBytes( 0, 0, null, 0, 0 ); byte[] buf = new byte[ len ]; rdr.GetBytes( 0, 0, buf, 0, len ); -- Joel Lucsy "The dinosaurs became extinct because they didn't have a space program." -- Larry Niven ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Reading Blob/Writing to File in C# 2008
On Tue, Jun 16, 2009 at 6:44 PM, Seysanwrote: > String cmd = String.Format("SELECT filename,content FROM documents > WHERE did={0}",did); > rdr = contentCommand.ExecuteReader(); What type is rdr? I believe it should be byte[] -- Joel Lucsy "The dinosaurs became extinct because they didn't have a space program." -- Larry Niven ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users