Did you try to increase max_allowed_packet in server config to 5M, for example. 
The default size is 1M and it is less then the size of your file (1.5M).

Artem

> -----Original Message-----
> From: J.R. Bullington [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 24, 2005 11:45 AM
> To: mysql@lists.mysql.com
> Cc: 'Mark Mchugh'
> Subject: RE: adding a large file to a database....
> 
> 
> I have found that MySQL really doesn't like the rs.Update and 
> rs.AddNew features like SQL and Access
> do. You are better off with the INSERT INTO <tblname> 
> (`rs.Flds`) VALUES ('objitem') or the UPDATE
> <tblname> SET <column1=value1,column2=value2,...> statements 
> with CONPUBS.EXECUTE.
> 
> It's a pain to convert, but you will find that it writes 
> faster to your MySQL database and you have
> less errors.
> 
> Just a little more info...
> 
> J.R.
> 
> -----Original Message-----
> From: Mark Mchugh [mailto:[EMAIL PROTECTED] 
> Sent: Monday, January 24, 2005 11:31 AM
> To: mysql list
> Subject: adding a large file to a database....
> 
> hi all,
> I am trying to add a large file to my database, and it does 
> not seem to work? 
> i am using the following code
> 
> 
>     Dim mystream As ADODB.Stream
>     Set mystream = New ADODB.Stream
>     mystream.Type = adTypeBinary
>     Set rs = New ADODB.Recordset
>     rs.ActiveConnection = connMySQL
>     rs.Open sqlstr, connMySQL, adOpenStatic, adLockOptimistic
>     
>     rs.AddNew
>     mystream.Open
>     mystream.LoadFromFile strFileName
>     
> 
>     rs!file_name = CatDir
>   
>     rs!file_size = mystream.Size
>       rs!File = mystream.Read
>     
>     rs.Update
>     mystream.Close
>     rs.Close
> 
> 
> when i try to add a file that is ( dont laugh) 1.5 megs or 
> over, i get a message saying " lost
> connection to mysql server during query"
> 
> can anybody help?
> 
> 
> thanks
> 
> 
>               
> __________________________________
> Do you Yahoo!? 
> Take Yahoo! Mail with you! Get it on your mobile phone. 
> http://mobile.yahoo.com/maildemo 
> 
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe:    
http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

 
Attention:
Any views expressed in this message are those of the individual sender, except 
where the message states otherwise and the sender is authorized to state them 
to be the views of any such entity. The information contained in this message 
and or attachments is intended only for the person or entity to which it is 
addressed and may contain confidential and/or privileged material.  If you 
received this in error, please contact the sender and delete the material from 
any system and destroy any copies.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to