File Size on Calculation Column only shows '0'

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jhstephenson
Posts: 303
Joined: Wed Apr 22, 2015 11:44 pm

File Size on Calculation Column only shows '0'

Post by Jhstephenson »

I want to show the sizes for files that have been uploaded to an app, so I put a Calculated Column on a Query with the following for the Calculation:

FILE_SIZE(MediaFiles.MediaDocument)

Should be pretty straight forward shouldn't it?

All it shows though is '0' for the value on every single record.

What am I missing here?
customaware
Posts: 2414
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: File Size on Calculation Column only shows '0'

Post by customaware »

Jim,

Have you tried assigning the result to an attribute also. That way you could tell if the problem is the function or the calculated query column.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Jhstephenson
Posts: 303
Joined: Wed Apr 22, 2015 11:44 pm

Re: File Size on Calculation Column only shows '0'

Post by Jhstephenson »

I did and ran into an issue when I tried to update each record in my BO with the size of the media file.

I keep running into a max packet size limit in MySql. Some of these files are big, really big, as in 3 to 4gig and Aware seems to have a problem somewhere in dealing with them.

Which actually brings up a whole other issue in that whenever I try to go to a record that has one of these large files, even if I am not trying to play the video, it still acts like Aware us trying to open it.
BenHayat
Posts: 2749
Joined: Thu Dec 23, 2010 5:48 am
Location: Fla, USA
Contact:

Re: File Size on Calculation Column only shows '0'

Post by BenHayat »

Jhstephenson wrote:I did and ran into an issue when I tried to update each record in my BO with the size of the media file.

I keep running into a max packet size limit in MySql. Some of these files are big, really big, as in 3 to 4gig and Aware seems to have a problem somewhere in dealing with them.

Which actually brings up a whole other issue in that whenever I try to go to a record that has one of these large files, even if I am not trying to play the video, it still acts like Aware us trying to open it.
Are you storing these BLOBs (files) inside of DB? I warned you before not to, and you said you're using FS. But now you're talking about MsSQL complaining about Packet size.
Jhstephenson
Posts: 303
Joined: Wed Apr 22, 2015 11:44 pm

Re: File Size on Calculation Column only shows '0'

Post by Jhstephenson »

No. These are just stored in the File System.
BenHayat
Posts: 2749
Joined: Thu Dec 23, 2010 5:48 am
Location: Fla, USA
Contact:

Re: File Size on Calculation Column only shows '0'

Post by BenHayat »

Jhstephenson wrote:No. These are just stored in the File System.
So, why are you having Packet size issue? Doesn't make sense. MySQL dodn't have anything to do with a file stored in directory. You're only storing a string in DB that points to the location of the file on directory.
PointsWell
Posts: 1464
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: File Size on Calculation Column only shows '0'

Post by PointsWell »

What if you use COMMIT TRANSACTION after you read a file size and add it to the relevant BO?
Post Reply