NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Schemas for Different Sequence Files

I  have a database that is storing my results from Test Stand.  I'm having trouble creating the tables for the 6 different sequel files in the same database.  I tried making a new schema to rename all the tables, but I cant execute a new SQL window to build the tables because all the files I have to open are the text files TestStand supplies which all create the same table names.  Do I have to create all those text files myself to make the tables for a new schema?  As you all can see I am a struggling novice.  Thanks for the help. 
0 Kudos
Message 1 of 9
(3,865 Views)
I'm having trouble creating the tables for the 6 different sequence files in the same database (sorry for the typo)
0 Kudos
Message 2 of 9
(3,849 Views)

Hey Roons,

TestStand actually makes this really simple for you.  After you have created your new schema within the Database Options dialog, return to the Schemas tab, and click on the Build .sql File.  This will bring up a file save dialog box and will allow you to save the .SQL file that will build the tables necessary to utilize the schema.  You will want to run this .SQL statement on a database that does not have tables currently that are named the same as the tables in your schema, otherwise you will get an error that the table already exists since it builds CREATE TABLE commands.   Give this a shot and let me know if you have any additional questions.  Have a good one.

0 Kudos
Message 3 of 9
(3,836 Views)
I can't seem to find that option.  I am looking everywhere in the database options.  When I click on the Schema Tab, there is not an option to build .sql file.  Here is my screen:
 
 
0 Kudos
Message 4 of 9
(3,831 Views)
Hi Roons,

It appears you must be using a TestStand version prior to 3.0.  TestStand 3.0 and above have a utility to build a .SQL file directly from your schema.  With your version, you still have 2 options:
 
1.  You still have the default schema .SQL files in the C:\Program Files\National Instruments\TestStand 2.0.1\Components\NI\Models\TestStandModels\Database directory that you can work against.  You can use these as a template for creating the CREATE TABLE statements for your particular database.
 
2.  You could open up your database in TestStand Database Viewer (Click the View Data button of the Data Link tab in Database Options) and can then use the Right Click options to Add the tables and columns you need and, if necessary, drop any tables that you don't need.  If you are not familiar with SQL, this may be easier to do.
 
Give either method a shot and please repost with any other questions you have as you go through this process.  Thanks and have a good one.
0 Kudos
Message 5 of 9
(3,819 Views)
Hi
  Yes,TestStand makes this really simple for us by using a built-in sql file. However, when I have Microsoft SQL Sever 2000 and use the "SQL Server Create Generic Recordset Result Tables.sql", I always have an error of "The SQL syntax for a selected data type(double) could not be acquired from the privider". Please see attached file. And if I delete the columns that have "double" data type, it will be OK. So does it say that Microsoft sql sever could not deal with "Double" data type?
 
 
Thanks!
Jacky
0 Kudos
Message 6 of 9
(3,653 Views)
It sounds like that is exactly what is happening. SQL Server does not have a data type called "Double" so this could be causing the problem. Does this problem occur with any other version of SQL or SQL Server?

Brandon Vasquez | Software Engineer | Integration Services | National Instruments
0 Kudos
Message 7 of 9
(3,633 Views)
    I have no chance to verify it on newer SQL Server. By the way, it also doesn't support  float data type (I'm using Teststand3.5 and SQL Server 2000 personal version). So what's your recommendation except upgrading my SQL server version?
 
 
Thanks!
Jacky
0 Kudos
Message 8 of 9
(3,626 Views)
    However, SQL Server 2000 indeed supports float data type, see attached 1.gif. So why Teststand will popup an error message saying "The SQL sytax for a selected data type(float) could not be acquired from the provider" when trying to building a sql file.
 
Thanks!
JACKY
0 Kudos
Message 9 of 9
(3,623 Views)