ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old March 17th, 2003, 08:59 AM
feindflug feindflug is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 14 feindflug User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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
but that don't work either.

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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > MYSQL upload file w/ aspSmartUpload don't work!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway