View Full Version : Data size limit???
csdstudio
11-08-2005, 09:07 PM
I'm using Remoting to upload BitmapData from Flash8 to a CFC which inserts the data into a MYSQL database. It's really just a variable that contains a long (very very long) string representing each pixel data. Upon retrieval of that data, I can only receive around 64K of data back to flash, yet I've been able to upload and store more than 1.5MBs worth via Remoting to CF to MySQL just fine. Any ideas?
Rob
Paerez
11-08-2005, 09:26 PM
I dont have experience with bitmapdata in flash 8, but I'll give you my two cents...
So if you checked the SQL database you can tell if you have set a size limit on your data field (you probably did varchar, though, right?) and verify that all 1.5m are being stored in sql. Then my guess would be that flash's string variable maxes out at somewhere around 64k, even though it is not documented in the livedocs.
You may want to break up the string into a string array, holding the pieces of it so that you don't max out the string length.
csdstudio
11-08-2005, 09:36 PM
That's a good call, and yes I did verify the data, it's stored in a LongBLOB datatype field where I can check it's size in MySQL Browser. The string that CFC returns is exactly 64K characters long. If that is the limit, why did flash let me send up a string var that was 1500K long? Wierd huh.
Rob
csdstudio
11-08-2005, 09:41 PM
Is there a way to check the length of the string at the CFC stage? I don't see a method for variable.length() in CF.
Paerez
11-08-2005, 09:45 PM
This is odd, especially since it is sending the full 1500k string, but not receiving it. Sorry, but I don't know coldfusion...
Hmmmm
i just know for a week or so i was trying to put a were long string to Flash
in the IDE (around 65K) and flash was doing nothing when the movie was compiled
then i was try it whit a shorter string (ca 20K) and it was working
so there is some limit to the length of a string
BUT this seams not to apply if you make your string programaticaly
eg:
b="Xeef"
for (a=0;a<15;a++){
b+=b
trace(b.length)
}
trace(b)
the above trace manymany "Xeef" :p
now if i copy this output and make a new file
a="XeefXeef........"
trace(a)
NO output at all !!!!
Paerez
11-08-2005, 10:28 PM
So a solution to your problem would be to have:
var thestring;
var mybuffer;
function receiveData() {
.... data goes into the mybuffer var ...
if (mybuffer.length() > 60k) {
thestring += mybuffer;
mybuffer = "";
}
// now thestring has it all
}
csdstudio
11-09-2005, 04:20 AM
Get this, opened another can of worms. I decided to split the string into 6 strings of 50K each. Then use CF to take the uploaded array of strings, convert to wddx and then store in MySQL. But CF won't parse the wddx upon retrieval if it's over 64K, but a wddx string under 64K will parse just fine. What kind of limit is that? This sucks. I've tried it on two completely different CF servers, one is v6.1, the other v7. I get this error...
"WDDX packet parse error at line 1, column 49751. XML document structures must start and end within the same entity."
If I take that wddx packet directly from MySQL and parse it myself in an XML viewer, it is complete. Any ideas?
Rob
Paerez
11-09-2005, 04:42 AM
you could always use AMFPHP to do a simple sql query just for the string. Its free and (pretty) easy to set up. PHP works nicely with mySQL.
csdstudio
11-09-2005, 05:51 AM
Solved! Worked on it with my CF host, they enabled large binary BLOB retrieval within the CF admin control panel. It was CF and its datasource settings that wouldn't allow it to pull the entire data from MySQL.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.