Board index » delphi » Q: MSSQL 6.5 and Invalid Blob Size?

Q: MSSQL 6.5 and Invalid Blob Size?

I have program that saves files in the database. What I do wrong because
every time that I try to save file in the database with Query1.LoadFromFile
method, Delphi gives me a error message 'Invalid Blob size'

Table is created with following script:

CREATE TABLE Test1 (
test_id            int,
test_file          text
)

And Delphi code is following:

Query1.Append;
Query1test_id.Value := Edit1.Text;
Query1test_file.LoadFromFile(Edit2.Text);
Query1.Post;

I'm sure that filename and path is correct, but there is something wrong
because I can't save BLOBs.

Please help me,

Ville Virtanen
w...@saunalahti.fi

 

Re:Q: MSSQL 6.5 and Invalid Blob Size?


In article <7cvnhs$cr...@forums.borland.com>,
  "Ville Virtanen" <w...@saunalahti.fi> wrote:

Quote
> I have program that saves files in the database. What I do wrong because
> every time that I try to save file in the database with Query1.LoadFromFile
> method, Delphi gives me a error message 'Invalid Blob size'

> Table is created with following script:

> CREATE TABLE Test1 (
> test_id            int,
> test_file          text
> )

> And Delphi code is following:

> Query1.Append;
> Query1test_id.Value := Edit1.Text;
> Query1test_file.LoadFromFile(Edit2.Text);
> Query1.Post;

> I'm sure that filename and path is correct, but there is something wrong
> because I can't save BLOBs.

> Please help me,

> Ville Virtanen
> w...@saunalahti.fi

I have the same problem with IBM DB2. If the file is greater 20-30KB
I get the same error.
This must be a problem with BDE and/or ODBC.
If I use a native dbase-table, it works just fine.

Do you connect through  ODBC? or native?

I posted this question already in several discussion-groups, but did not
receive an answer yet.

Heinrich Braun
HOMAG AG
Germany

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

Re:Q: MSSQL 6.5 and Invalid Blob Size?


Re:Q: MSSQL 6.5 and Invalid Blob Size?


There is an update for MS SQL6.5 that effects the reactions of MS SQL6.5
with Blobs Operation try to get this update from MS, if not just email me.

Ville Virtanen a crit dans le message <7cvnhs$cr...@forums.borland.com>...

Quote
>I have program that saves files in the database. What I do wrong because
>every time that I try to save file in the database with Query1.LoadFromFile
>method, Delphi gives me a error message 'Invalid Blob size'

>Table is created with following script:

>CREATE TABLE Test1 (
>test_id            int,
>test_file          text
>)

>And Delphi code is following:

>Query1.Append;
>Query1test_id.Value := Edit1.Text;
>Query1test_file.LoadFromFile(Edit2.Text);
>Query1.Post;

>I'm sure that filename and path is correct, but there is something wrong
>because I can't save BLOBs.

>Please help me,

>Ville Virtanen
>w...@saunalahti.fi

Other Threads