mathgl 发表于 2013-1-30 01:19:55

bind parameters in SqlCommand...

for sql server 2005 (tested)
 
use batch insert with binding parameters like following:
 
 comm.Parameters.Add("@val", System.Data.SqlDbType.Binary, temp.Length).Value = temp;
 comm.ExecuteNonQuery();
 
don't forget
 
comm.Parameters.Clear();
 
otherwise an exception will be raised..
 
 
for sqlite with System.Data.Sqlite
 
comm.Parameters.Clear() is optional...
 
 
页: [1]
查看完整版本: bind parameters in SqlCommand...