03-09-2010 01:41 PM
thanks for the thread - it looks like the same 8kb limit is built into TestStand 4.2.1 😞
I spend a full day figuring out why I could not upload anything larger than this! I need to upload measurement graphs during automated testing.
04-06-2010 07:16 PM
04-08-2010 02:16 AM
I would like to see how you do it 🙂
04-08-2010 12:07 PM
04-09-2010 11:02 AM
The attached VI establishes a connection to a DB, writes a string, a double, and an 8MB 3D array of doubles to a table with 3 fields. Then it reads the data out of the DB and displays it along side the values it initially saved to the DB so you can compare them. Keep in mind that it writes a new row to the DB every time you execute it, and only the last row in the DB will match the input values you see during any particular run, so as you run it subsequent times you will see historical values in the first N-1 rows retrieved and your current "initial" values in the Nth row.
Below is the schema that the VI expects your DB to conform to. You can name your DB anything you like; mine is named leh_test.
USE leh_test
DROP TABLE big_data
CREATE TABLE [big_data] (
"id" INT NOT NULL IDENTITY(0,1),
"big_text" VARCHAR(8000) NOT NULL,
"num" REAL NOT NULL,
"can_hold_2gb" image NOT NULL
PRIMARY KEY ("id")
)
After you have loaded the schema into your DB, load the VI, enter the path and name of the UDL file that contains your connection information, then run the VI and watch what happens. Every time it is executed it will insert a new row into the DB, then it will display every row in the DB, pausing with a dialog after each row is loaded.
The VI was written in Labview 2009 and was tested running against SQL Server 2008 Express, which has the wonderful feature of being free. What other redeeming qualities SQL Server has is an open question. 🙂 I ran it about a dozen times and it worked perfectly for me every time. If you run into difficulties with it I'll be happy to help where I can, but bear in mind that it's will almost certainly be some kind of problem with your environment.
This VI is light on error checking and user friendliness, but should get the point across well enough.
Enjoy!
Lynwood Hines, CLAD
07-12-2010 09:54 PM
hi there i'm also facing difficulty in retrieving image from the database could anyone covert the vi to labview8.6 version please because i could not open the 2009 version to see the VI
07-12-2010 10:11 PM
07-12-2010 10:11 PM
thanks for the vi
01-15-2011 10:41 PM
Thanks for sharing.
02-09-2011 03:01 AM
I would just like to answer some of the problems users were talking about earlier on in this topic.
SQL Server 2000 had a maximum limit of 8,000 characters for any one column, regardless of the datatype used, AND in-fact a single ROW could also contain no more than 8,000 characters - hence the "rigth truncation" error appearing.
This limit is no longer present in the Server 2005 and 2008 versions
Instead of using a UDL File we use the Connection String approach eg. For SQL Server 2005
Driver={SQL Native Client}; Server=MC4332\SQLEXPRESS; Database=database_name; Uid=username; Pwd=password;
You can check to see if this Driver is present by looking in your ODBC Data Souce Administrator in the Control Panel
For SQL Server 2008 we use:
Driver={SQL Server Native Client 10.0}; Server=MC6603\SQLEXPRESS; Database=database_name; Uid=username; Pwd=password;
But as Lynwood mentioned above you will probably need to download this driver if you have a Windows XP systems.
This website is an excellent source of all the different types of connections strings - http://connectionstrings.com/
Chris