Solved

blob of sql server

Posted on 2001-08-17
8
442 Views
Last Modified: 2010-04-06
i use a dbimage item in delphi to insert into a image data in sql server, but it always tell me the "invalid blob length",

what's the problem

ws1999
0
Comment
Question by:ws1999
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 4

Expert Comment

by:jsweby
ID: 6396673
FAQ4271B

Question:
How come I'm getting the error "Invalid Blob Length" when
trying to post a blob to an ODBC datasource when the blob is greater than 1000000 bytes?

Answer:
This is a current limitation of the BDE ODBC driver. Native drivers do not have this limitation.


J.
0
 
LVL 22

Accepted Solution

by:
mnasman earned 100 total points
ID: 6396697
if you are using the BDE to connect to sql server

1) go to the BDE Admin
2) click in your alias(sql server)
3) change the blob size to be more than 32kb, use value bigger than the image that u want to store in the database

if you still have problems, for storing images in database, use the Stream, specially if you are store not bitmap images (like jpg)

I made a simple project for storing images in the database, using the stream, I test it with oracle, paradox, ms access, without any change of the code

I post it in old question
http://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=20145695

Best regards
Mohammed Nasman
0
 

Author Comment

by:ws1999
ID: 6475570
hello mansman

still when i save jpg file ,the program will tell me "bitmap image invalid", it seems only bitmap can be saved here is my code:

if OpenPictureDialog1.Execute then
  with Table1 do
begin
  //Button1.Enabled := false;
  FileStream := TFileStream.Create(OpenPictureDialog1.FileName, fmOpenRead);
  Table1.Edit;
  BlobStream := TBlobStream(CreateBlobStream(FieldByName('ThumbImage'), bmWrite));
  BlobStream.Seek(0,soFromBeginning);
  BlobStream.Truncate;
  BlobStream.CopyFrom(FileStream,FileStream.Size);
  FileStream.Free;
  BlobStream.Free;
  Table1.Post;
  //ReadPicFromDB;
  //Button1.Enabled := True;
end;

what will be the problem?

worried ws1999

0
 
LVL 22

Expert Comment

by:mnasman
ID: 6475782
send me email, and  i will send you the full project
i tried it with oracle database, access, and paradox without any modification, just change the alias
send me email at nasman@mogaza.org
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:ws1999
ID: 6475868
wu_song@sohu.com
0
 

Expert Comment

by:amp072397
ID: 6789173
ws1999:

You have many open questions to which you must return:

http://www.experts-exchange.com/jsp/qShow.jsp?ta=msaccess&qid=20264790
http://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=20256743
http://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=20250343
http://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=20249986
http://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=20187323
http://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=20184015
http://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=20181707
http://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=20180448
http://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=20169990
http://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=11401958
http://www.experts-exchange.com/jsp/qShow.jsp?ta=java&qid=20230693
http://www.experts-exchange.com/jsp/qShow.jsp?ta=java&qid=20194172
http://www.experts-exchange.com/jsp/qShow.jsp?ta=java&qid=20187856
http://www.experts-exchange.com/jsp/qShow.jsp?ta=java&qid=20187852
http://www.experts-exchange.com/jsp/qShow.jsp?ta=java&qid=20187466
http://www.experts-exchange.com/jsp/qShow.jsp?ta=java&qid=20182301
http://www.experts-exchange.com/jsp/qShow.jsp?ta=java&qid=20182182
http://www.experts-exchange.com/jsp/qShow.jsp?ta=java&qid=20181487
http://www.experts-exchange.com/jsp/qShow.jsp?ta=java&qid=20181301
http://www.experts-exchange.com/jsp/qShow.jsp?ta=java&qid=20180787
http://www.experts-exchange.com/jsp/qShow.jsp?ta=java&qid=20180436
http://www.experts-exchange.com/jsp/qShow.jsp?ta=java&qid=20172201
http://www.experts-exchange.com/jsp/qShow.jsp?ta=java&qid=20153303

To assist you in your cleanup, I'm providing the following guidelines:

1.  Stay active in your questions and provide feedback whenever possible. Likewise, when feedback has not been provided by the experts, commenting again makes them receive an email notification, and they may provide you with further information. Experts have no other method of searching for questions in which they have commented, except manually.

2.  Award points by hitting the Accept Comment As Answer button located above and to the left of that expert's comment.

3.  When grading, be sure to read:
http://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp#3
to ensure that you understand the grading system here at EE. If you grade less than an A, you must explain why.

4.  Questions that were not helpful to you should be PAQ'd (stored in the database for their valuable content?even if not valuable to you) or deleted. To PAQ or delete a question, you must first post your intent in that question to make the experts aware. Then, if no experts object after three full days, you can post a zero-point question at community support to request deletion or PAQ. Please include the link(s) to the question(s).
CS:  http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
At that point, a moderator can refund your points and PAQ or delete the question for you. The delete button does not work.

5.  If you fail to respond to this cleanup request, I must report you to the Community Support Administrator for further action.

Our intent is to get the questions cleaned up, and not to embarrass or shame anyone. If you have any questions or need further assistance at all, feel free to ask me in this question or post a zero-point question at CS. We are very happy to help you in this task!


thanks!
amp
community support moderator

2/8
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6863434
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY REGARDING YOUR ACCOUNT AND OPEN QUESTIONS.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, please comment to advise the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below and include the question QID/link(s) that it regards.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Please click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.11401958.html
http://www.experts-exchange.com/questions/Q.20169990.html
http://www.experts-exchange.com/questions/Q.20180448.html
http://www.experts-exchange.com/questions/Q.20181301.html
http://www.experts-exchange.com/questions/Q.20182182.html
http://www.experts-exchange.com/questions/Q.20184015.html
http://www.experts-exchange.com/questions/Q.20249986.html
http://www.experts-exchange.com/questions/Q.20264790.html
http://www.experts-exchange.com/questions/Q.20180436.html
http://www.experts-exchange.com/questions/Q.20187323.html


To view your locked questions, please click the following link(s) and evaluate the proposed answer.
http://www.experts-exchange.com/questions/Q.20181707.html

PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange

P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6887580
Finalized
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now