Video into BLOB?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
DavJans
Posts: 270
Joined: Thu Dec 12, 2013 4:21 pm
Location: Spokane, WA USA

Video into BLOB?

Post by DavJans » Fri Aug 05, 2022 7:03 pm

Is there a way for me to put a video file into a MySQL BLOB?
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här

DavJans
Posts: 270
Joined: Thu Dec 12, 2013 4:21 pm
Location: Spokane, WA USA

Re: Video into BLOB?

Post by DavJans » Fri Aug 05, 2022 9:26 pm

I tried this, didn't get an error but it doesn't do anything.

Code: Select all

UPDATE Books SET book = LOAD_FILE("U:\\Books\\In-Memory Data Grids for Dummies.pdf") WHERE id = 1
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här

DavJans
Posts: 270
Joined: Thu Dec 12, 2013 4:21 pm
Location: Spokane, WA USA

Re: Video into BLOB?

Post by DavJans » Fri Aug 05, 2022 9:37 pm

I also changed it into a LONGBLOB
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9823
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Video into BLOB?

Post by FourthWorld » Fri Aug 05, 2022 10:27 pm

How did you confirm nothing happened, and what does the LiveCode you're using to check for errors look like?

Offhand, with the switch to LONGBLOB the only other part I might check would be the ID.

While only a subset of LiveCode devs use MySQL, 100% of MySQL users do. I'd guess a quicker answer may be findable among MySQL resources, such as this one I found searching with DuckDuckGo for "storing video in MySQL blob":

https://stackoverflow.com/questions/103 ... sing-mysql
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

DavJans
Posts: 270
Joined: Thu Dec 12, 2013 4:21 pm
Location: Spokane, WA USA

Re: Video into BLOB?

Post by DavJans » Tue Aug 09, 2022 7:31 pm

I have not done anything with livecode yet, just using MySQL Workbench to get the query working first. I found that same stackoverflow and that's where I started but couldn't get it to work. I get that this may not be the best place for a MySQL question but the community is awesome.
Screenshot 2022-08-09 113029.jpg
No syntax error no change
Screenshot 2022-08-09 113029.jpg (5.27 KiB) Viewed 1636 times
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9823
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Video into BLOB?

Post by FourthWorld » Tue Aug 09, 2022 9:38 pm

I'm glad you like it here. It's a good crew. It's even better when we find solutions. :)

May I ask why you want the video in the DB file? Most folks just store the path in the DB and keep their media in separate files. Not only does this help keep the DV structure lean and tidy, it opens up options for streaming the media from the server.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”