|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
MYSQL upload file w/ aspSmartUpload don't work!
I really can't get my File data uploaded into the database
My table called "file" have the following structure: id..................tinyint(3) unsigned NOT NULL auto_increment name............varchar(64) default '0' content......... blob date_added..varchar(10) default '0' size...............int(6) unsigned default NULL folder_id.......tinyint(2) unsigned Everything works fine until the BinaryData is about to be inserted. This is my code for adding a file: Code:
else
' // Lägger till ny post i slutet med följande data
rec.AddNew
rec("id") = NULL
rec("name") = object.Filename
object.FileToField rec.Fields("content")' // Line simply don't work!
rec("date_added") = date
rec("size") = object.Size
rec("folder_id") = file.form("folder")
rec.Update
end if
...returns an error msg: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC Driver Manager] Ogiltig längd på sträng eller buffert ...and in english something like "Invalid length of string or buffer" However, all other fields get inserted properly if i comment the error line (content) I have also tried to manually inserted the data using Code:
rec("content") = object.BinaryData
One said this has something to do with the ODBC Driver (I use 3.51) and that it works fine in Access, but i would REALLY don't like to swith to access. Also if you need i use those properties: con.Open conString rec.ActiveConnection = con rec.Source = sql rec.CursorType = adOpenStatic rec.LockType = adLockOptimistic rec.Open I would REALLY appreciate all help Thanks in advance, feindflug |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > MYSQL upload file w/ aspSmartUpload don't work! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|