Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Error When Test Executive Tries to Create a Table in Excel

Primary Software: LabVIEW Toolkits>>Test Executive
Primary Software Version: 5.1
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem: I have the Test Executive software package, which supports database data logging. The ConnectionString specified in my testexec.ini file refers to a valid Data Source Name (DSN) in my ODBC administrator. Microsoft Excel is used as a database type and my database is a new Excel file. Everything looks fine, but I get an error when Test Executive tries to communicate with Excel. What might be wrong?

Solution: Each sheet within the Excel file is referred to as a table. Before sending data to a database, Test Executive checks for the table's existence. If required tables (e.g., UUT, SEQUENCE, TEST, etc. -- see testexec.ini) do not exist, then they are created. This is the place where Test Executive fails.

SQL syntax is standardized, but each database contains different datatypes that you can use for table columns. When you create a table, you need to specify the requested column datatypes. There is no generic create statement that will work for all databases. The one used in Test Executive works for dBase, but not for Excel. You need to change the create statement to successfully pass this step. Here's how to do that:

  1. Open each of the table files; there are three files with names like "Create .... table.vi" in the LabVIEW » LVEXECxxx » Database » callback.llb file.

  2. Switch to the block diagram for each file and locate the part of the statement that defines columns. You should see something similar to:

    "(SN Char(6), Result Number(3), TestDate Date, Operator Char(32), SeqName Char(32), Exec_Time Number(8))"

    The problem is the Number(n) datatype. You need to delete the width specification, so that the new string looks like this one:

    "(SN Char(6), Result Number, TestDate Date, Operator Char(32), SeqName Char(32), Exec_Time Number)"
This should fix the problem.

Related Links:

Attachments:


You can use the following file for Test Executive 5.1.1 and Excel 97:
Book1.xls


Report Date: 02/16/2000
Last Updated: 12/02/2004
Document ID: 1UFCSSJ6

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit