blob issue

blob issue

am 15.04.2005 17:14:10 von Mark Mchugh

hi,
I am trying to add files to my database, on the server

max_allowed_packet = 1073741824


and i am using the following code..

sqlstr = "select * from files where 1=0;"

rs.Open sqlstr, connMySQL, adOpenStatic,
adLockOptimistic
rs.AddNew
mystream.Open
Debug.Print strFileName
mystream.LoadFromFile strFileName
rs!file_name = "All Scanned"
rs!Fromp = CatDir
rs!Desc1 = ronsnotes
rs!file_size = mystream.Size
rs!policyid = fdesc
rs!file = mystream.Read
rs.Update
mystream.Close
rs.Close


i get the error message "lost connection to mysql
server during query"

any ideas?

thanks






__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: blob issue

am 15.04.2005 18:11:32 von Daniel da Veiga

If it takes some times for your app to load and use the file data, the
server considers this idle time, and thus disconnect you after a few
seconds, try setting a higher value for "wait_timeout" and
"interactive_timeout", or rebuild your code to connect and insert the
data only after all processing of the file is complete. So, your
rs.Open would be executed only AFTER mystream.LoadFromFile, avoiding
idle time.

Hope that helps,

On 4/15/05, Mark Mchugh wrote:
> hi,
> I am trying to add files to my database, on the server
>=20
> max_allowed_packet =3D 1073741824
>=20
> and i am using the following code..
>=20
> sqlstr =3D "select * from files where 1=3D0;"
>=20
> rs.Open sqlstr, connMySQL, adOpenStatic,
> adLockOptimistic
> rs.AddNew
> mystream.Open
> Debug.Print strFileName
> mystream.LoadFromFile strFileName
> rs!file_name =3D "All Scanned"
> rs!Fromp =3D CatDir
> rs!Desc1 =3D ronsnotes
> rs!file_size =3D mystream.Size
> rs!policyid =3D fdesc
> rs!file =3D mystream.Read
> rs.Update
> mystream.Close
> rs.Close
>=20
> i get the error message "lost connection to mysql
> server during query"
>=20
> any ideas?
>=20
> thanks
>=20
> __________________________________
> Do you Yahoo!?
> Read only the mail you want - Yahoo! Mail SpamGuard.
> http://promotions.yahoo.com/new_mail
>=20
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe: http://lists.mysql.com/win32?unsub=3Ddanieldaveiga@gma=
il.com
>=20
>=20


--=20
Daniel da Veiga
Computer Operator - RS - Brazil

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org