5 messages in com.mysql.lists.win32Re: adding a large file to a database...| From | Sent On | Attachments |
|---|---|---|
| Mark Mchugh | 24 Jan 2005 08:30 | |
| Mike Hillyer | 24 Jan 2005 08:32 | |
| Armando | 24 Jan 2005 08:34 | |
| John L.Utz III | 24 Jan 2005 08:47 | |
| Mark Mchugh | 24 Jan 2005 08:55 |
| Subject: | Re: adding a large file to a database....![]() |
|---|---|
| From: | John L.Utz III (jo...@utzweb.net) |
| Date: | 01/24/2005 08:47:43 AM |
| List: | com.mysql.lists.win32 |
Hello Mark;
At Mon, 24 Jan 2005 08:30:38 -0800 (PST), Mark Mchugh wrote:
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
it may not be your exact problem, but it's generally a smart idea to check Open statements for returned error codes, that makes it much easier to diagnose trouble when things go wrong....
rs.AddNew mystream.Open mystream.LoadFromFile strFileName
all of these also could stand some error chacking...
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/win32?unsub=jo...@utzweb.net




