LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

More than 8kB into a single sql cell via database connectivity toolkit

I want to use the database connectivity toolkit to fill into a single sql database cell a binary file of 16kB. It only works with files they are smaller than 8kB.

What shall i do?
0 Kudos
Message 1 of 7
(2,910 Views)
Hello Dani,

I guess you need to set the correct datatype for the cell. If you set the cell as type 'image' you can store larger datasets.

--- From SQL help ----
Assigning a data type to an object defines four attributes of the object:
1) The kind of data contained by the object. For example, character, integer or binary.
2) The length of the stored value, or its size. The length of an image, binary, and varbinary data type is defined in bytes.
3) The precision of the number (numeric data types only).
4) The scale of the number (numeric data types only).

Binary Strings
binary - Fixed-length binary data with a maximum length of 8,000 bytes.
varbinary - Variable-length binary data with a maximum length of 8,000 bytes.
image - Variable-length binary data with a maximum length of 2^31 - 1 (2,147,483,647) bytes.
----------------------

I have successfully used image data type to store data of size in MBs

Hope this helps.

- Gurdas
Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 2 of 7
(2,900 Views)
Hi Gurdas,

Thank you very much for your quick answer. You´re right, but I still have tried this. The datatype of the target cell in the SQL database is "image". I think the problem is somewhere in the database connectivity toolkit. Maybe you have a example which youcan show me how you programmed your connection.

Thank´s in advance...

Daniel
0 Kudos
Message 3 of 7
(2,892 Views)
Hello Daniel,

We do not save files directly into cells.
The data is sent as array or cluster etc.

In the attached image we are sending a large array (2D with 5000 rows and 2 columns) into a table called "Test_Master" and a field called "Measured_Data" in this table.

Let me know if you have further queries.

- Gurdas
Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 4 of 7
(2,891 Views)
HI Gurdas,

it seems to me, that I don´t do anything else like you. See the attached file where you can see my .vi with the database connection and the received error code.

Maybe you have an idea.

Thank you in advance...

Daniel
0 Kudos
Message 5 of 7
(2,881 Views)
Hi Gurdas,

I fixed the problem. it was the wrong driver I used...now it works.

Thank you for your help....

Greetings from Austria
0 Kudos
Message 6 of 7
(2,855 Views)
Hello Daniel,

Great to hear you could solve it and sorry for my absence for the last few days.
We've had a hectic project delivery week 🙂

Which driver did you get wrong? I could watch out from similar mistake ....
Was there soemthing wrong with the "multicluster#1.vi" ?


Best,
Gurdas
Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 7 of 7
(2,844 Views)