LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i upload a "realy" big file as a BLOB to a DB

Hi everyone.

I have a Problem. I wanna upload files up to 200MB to a Database as a BLOB. (Im using an ODBC driver)

Now I have the Problem everytime i open it it will make the file corrupt (even if its only a local copy).

I wanne read the file as a binary (because I won't know the filetype) and afterwards write it as a binary  file.
It works perfect for smal files (I tested it until a few MB) then I made the test with a 200MB large movie file and I wasn't able to copy it.

 

Is there a way to copy it (to the Database) in smaller parts?

 

0 Kudos
Message 1 of 7
(4,071 Views)

Have you tried querying the database, retrieving small parts of the overall DB, and loading them in sequence?  Just a first pass suggestion.

0 Kudos
Message 2 of 7
(4,054 Views)

@CryDeb wrote:

Hi everyone.

I have a Problem. I wanna upload files up to 200MB to a Database as a BLOB. (Im using an ODBC driver)

 

 


That's probably not such a great idea. Normally I would suggest placing the file somewhere accessible to the host (such as an ftp server) and linking to the full filepath within the database. Putting the burdon of large binary data onto a database can cripple performance and isn't really what they're designed for.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Message 3 of 7
(4,048 Views)

I'm seconding Thoric's comment - most database engines aren't designed for handling large amounts of binary data. Normally you would store the file on a filesystem and reference the file location in the database.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 7
(4,041 Views)

Okey maybe I can upload files biger than 10MB (not a lot of them) to an ftp server. But can I create a Linkfile with Labview?

0 Kudos
Message 5 of 7
(4,031 Views)

Sounds like you want filestreaming.

 

"FILESTREAM provides a way to store and access large binary values, either through SQL Server or by direct access to the Windows file system. A large binary value is a value larger than 2 gigabytes (GB)." (source)

 

Bit overkill maybe but it's a good protocol to know and is there to solve exactly the problem you're having.

0 Kudos
Message 6 of 7
(4,003 Views)

@crabstew wrote:

Sounds like you want filestreaming.

 

"FILESTREAM provides a way to store and access large binary values, either through SQL Server or by direct access to the Windows file system. A large binary value is a value larger than 2 gigabytes (GB)." (source)

 

Bit overkill maybe but it's a good protocol to know and is there to solve exactly the problem you're having.


But how can I use these with the ODBC Driver?

I forgot i use the ANSII ODBC Driver. I can't / wan't change the communication way because the Application is to big.

0 Kudos
Message 7 of 7
(3,984 Views)