tags:

views:

32

answers:

3

is it possible to upload video in sqlite not the url ? hi iam new to the iphone ... i want to upload video in sqlite not the url of video. i have tried it but not got the sucess if any one know the solution plz post the answer..

A: 

It sounds like a bad idea to store big files in a SQL database, especially SQLite. If you really need to do it, make sure to use a BLOB column and to escape your data correctly.

Emil Vikström
i am using blob type and it also convert the url into..base64 string but data is not save in table....if u have the code plz send me...
parvind
http://thedailywtf.com/Articles/plz-email-me-teh-codez.aspx
Emil Vikström
A: 

It is a really bad practice to try to store large binary data in a database, you are much better off storing the video on the phone and the location of the video in the database. This will drastically improve your speed in opening the file since a file lookup on the iPhone is much faster than pulling all of those bytes from the database.

Liam
i want to build standalone application so that user can use it without any network connection,so i need to save the vedio in phone memory it self...
parvind
Liam is not talking about a network location, but a filesystem folder.
vikingosegundo
+1  A: 

It won't be the exact answer for this question. But I would like to give solution. You can save the video in documents directory as a file format. And insert the file name in your SQLITE database.

And whenever you want to access the video, you can do easily by querying the file name.

As SQLITE is a low-weight database & thus it won't be recommended to add heavy load on it.

Sagar