Home > Back-end >  Using ado store image binary data field image (SQL)
Using ado store image binary data field image (SQL)

Time:11-10

The picture or file to store binary data with ado SQL server's image in the field, such as the following code, if the file is less than 100 m, dozens can be successful, if close to 100 m and above storage failure, give advice or comments please!

ADOQuery1 - & gt; SQL - & gt; The Clear ();
ADOQuery1 - & gt; SQL - & gt; Add (" Select * from table where FID=241 ");
ADOQuery1 - & gt; The Open ();
ADOQuery1 - & gt; Edit ();
TBlobField * aaa=(TBlobField *) ADOQuery1 - & gt; FieldByName (" image field ");
Aaa - & gt; LoadFromFile (OpenPhoto - & gt; FileName);
ADOQuery1 - & gt; Post ();

(or file first put TMemoryStream * iLoadStream, again - & gt; LoadFromStream (iLoadStream); Too small file success, large file out of the question)

Breakpoint debugging in ADOQuery1 - & gt; Post (); A connection error, then and database disconnect often





CodePudding user response:

Is it database features, field has the limit?

CodePudding user response:

Transmission timeout?

CodePudding user response:

SQL server BLOB field support 2 gb of data, may be your table when the design limits the BLOB biggest 100 MB

  • Related