How can I use a mySQL database schema with numeric auto increment primary key instead of GUID?

Hello!
I'm using the TestStand "MySQL Insert (NI)" database schema with GUID as primary key. So everything works fine.
But I prever using numeric values as primary key, because the database is in conjunction with another database which uses numeric values as primary key.
Is this possible?
Has anyone an idea how I can modify the "Generic Recordset (NI)" for use with MySQL?
Thanks!
Configuration:
Microsoft Windows XP
TestStand 3.1
MySQL 4.1.12a
MySQL ODBC 3.51 Driver
Brosig

Adam -
The TestStand Database Logging feature does not allow you to run a separate SQL command after executing the command for a statement(table), so I do not think that you can use an auto incrementing column for the tables. There is just no way to get it back in a generic way. One option that I tried is something similar to the Oracle schema where you call a store procedure to return a sequence ID for each record that you want to add.
So you would have to create the following sequence table in MySQL:
CREATE TABLE sequence (id INT NOT NULL);
INSERT INTO sequence VALUES (0);
Then create a stored procedure as shown below that will increment the sequence value and return it in a recordset:
CREATE PROCEDURE `getseqid`()
BEGIN
        UPDATE sequence SET id=LAST_INSERT_ID(id+1);
        SELECT LAST_INSERT_ID();
END
Then update the MySQL tables to use INT primary and foreign key values, so the TestStand MySQL SQL file to create all tables would have text like this:
CREATE TABLE UUT_RESULT
 ID    INT  PRIMARY KEY,
~
CREATE TABLE STEP_RESULT
 ID    INT  PRIMARY KEY,
 UUT_RESULT   INT  NOT NULL,
~
Then update the schema primary and foreign key columns in the TestStand Database Options dialog box to be INT to match the table. For the primary key columns, you will have to set the Primary Key Type to "Get Value from Recordset" and set the Primary Key Command Text to "call getseqid()". This will call the stored procedure to determine the next value to use as the ID value.
Hope this helps...
Scott Richardson
National Instruments

Similar Messages

  • How can I use an Express database build with RAA in Express Objects???

    Hello, everybody!
    I have installed Express Server and Client on my computer. I've build an Express database With Relational Access Manager mapping data from an Oracle database.
    Now I want to use this express database in Oracle Express Objects.
    I understand that an express database build with understand can be used by defining a connection to Express Server and using the option Relational Access Manager Connection.
    But, I didn't understand the settings of this option. I open the settings window and there it is :
    - the MASTER DATABASE Box where I have to write the name of the CUBE from the express database build with understand?
    - the RDC File Box : what do I have to write here? I've read the HELP but I didn't understood. There is no file with the RDC extension in my computer.
    Thank you for your help!
    Anca.
    [email protected]

    you can extend it, very easly, with an Airport Express.
    once you connect the AExpress, on the App Airport Utility, in Wireless tab choose to "Extent a Network", you will be able to select your Network enter your Network Password and it is done
    i have 2 AExpress to extend my signal and also to Airplay to Remote Speakers and works perfectly
    good luck

  • How can i use offline & online database in the same time?

    how can i use offline & online database in the same time?
    my database in another server when the connection true it connect
    but if not does not work
    i wanna make offline database if the server not connected it connect offline then the server is on it alter all data from the offline to the server.

    User, please tell us your Jdev version!
    There is no such functionality build into the framework. The offline data base is only for designing the db, not to have a backup db.
    If you can't connect to the db the application will not work.
    Timo

  • How can I use the old Apple TV with new iTunes?  It tells me to input a code in iTunes but iTunes no longer has a spot to input this code to allow sync.  I can access the iTunes Store fine, just none of my Library

    How can I use the old Apple TV with new iTunes?  It tells me to input a code in iTunes but iTunes no longer has a spot to input this code to allow sync.  I can access the iTunes Store fine, just none of my Library

    read this
    https://discussions.apple.com/message/20429789#20429789

  • How can you use iMessage between 3 iPads with 3 different users but only one Apple ID?

    how can you use iMessage between 3 iPads with 3 different users but only one Apple ID?

    No you do not need separate Apple ID's in order to use 3 devices with one Apple ID. I use 4 devices to Message and FaceTime and all use the same Apple ID. You do need to add additional email addresses for the other devices.
    Look at this very informative video for the instructions.
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l

  • How can I use a Verizon iPhone 5 with US Cellular?

    How can I use a Verizon iPhone 5 with US Cellular?

    You can't. Doing so is not supported.

  • I purchased a iphone i USA. How can i use this iphone in india with vodafone.

    I Purchased a iPhone 5s in USA. How can I use this phone in India with Vodafone.
    <Edited By Host>

    First, the iPhone would need to be unlocked. That would depend on where you bought it. Next, the North American phone would not work with all of the networks outside of the US. Also, the warranty for the device is only good in the US, so if you have a problem with the phone, you would need to bring it back to the US to an Apple Store. Where did you purchase the phone?

  • HT1515 How can I use Airport Express (1st generation) with OS X Mavricks?

    How can I use Airport Express (1st Generation) with OS X Mavericks?

    1st Generation AirPort Express will work fine with Mavericks.
    Are you sure that you have a 1st Gen Express?
    Check the model number on the side of the Express. 1st Gen is A1264.
    If you see A1084 or A1088, these are much older versions of the Express that were sold long before Apple began to use the Generation naming with "n" wireless devices in 2007.
    Mavericks will not support the A1084 or A1088. Use another Mac running Leopard, Snow Leopard, or a PC if you need to administer the older Express.

  • How can I use my photoshop elements 10 with windows 8 upgrade

    How can I use my photoshop elements 10 with my windows 8 uograde

    All versions of PSE except versions 1, 3, 5 & 6 will work with Windows 8.
    Microsoft Windows 8 compatibility.

  • How can I use my old imac24" 2008, with my. New iMac 21,5" as a monitor? What camble do I need ? new iMac

    How can I use my old mac 24" as a second monitor? What cable do I need?

    https://discussions.apple.com/docs/DOC-6351 may offer some techniques.

  • How can I use the NI PXI-6508 with Lab View 7? what are the first steps to get started??How can I use the channels with lab view 7????

    I have a 8 slot PXI system with 2 NI PXI 6508 and 1 DMM 4070 in it. I want to get started with programming the digital I/O cards (6508)! How can I use this cards with LabView 7?what is the best way to get started, or where can I get examples showing how to use the several channels?
    Thanks!
    Philipp

    Philipp,
    The best way to get started is to decide if you want to use traditional NI-DAQ or NI-DAQmx. Recently we released NI-DAQ 7.1 which provides NI-DAQmx support for the PXI-6508. In my opinion, NI-DAQmx is more efficient and much easier to use.
    To get started with examples, simply launch LabVIEW and go to Help>>Find Examples. Then expand Hardware Input and Output>>DAQmx and select the appropriate digital group for your application. This should help get you started.
    Please repost if you need addition assistance. Good luck with your application!

  • How can we use 2 Apple ID's with 1 Apple TV??

    We just bought an Apple TV device.  We anticipate liking it, but are a bit stuck at the moment.
    We have 2 laptops (PC), 2 Apple ID's and 1 Apple TV device.  How can we use the Apple TV with each of our unique ID's?
    Any help appreciated.
    Thanks - s2557

    The answer is YES. with no problems. In fact you can connect up to FIVE units in one itunes (But no more). I have no idea why OR who was the FOOL, that picked only 5 units. This has set limitation on their own product. I currently use 5 Apple Tvs at work for a interdepartmental media network. It just runs slide shows and training video's. I needed 9 units up and running, So I have another computer just to pickup the last 4 units, and shared the file folders I run 5 units at home as well. However you have to leave that itunes up and running. The five authorized limitation is also a pain. Steve said he was dong away with DRM, I guess that didn't work out to well. In short, I run 5 laptops, 3 desktops, 1 Mac Pro, 4 Ipads, 4 Iphones AND one Mac Mini with server 10.5.6 for a family of 4. The FIVE number limitation is a major pain. Best of luck to you.

  • How can I configure a mysql-database for new cms install?

    I just install a mac os x server on os x 10.8.4, but can't create a database to install a cms, how can I do this ? How cann I access the database from admin window or else ?

    Consider acquiring some external hosting as part of your efforts, then?  Various folks offer this hosting, and that gets you out of maintaining (most of) MySQL and Drupal, and more time to spend on your web site and whatever else you're working on.
    As for your questions, please follow the installation instructions for installing MySQL, then follow the instructions for installing Drupal.  The OS X Server setup is basically the same as any other Unix system, too; what you're doing on Ubuntu is more or less the same as what you're doing on other Linux and Unix systems, and on OS X and OS X Server.  (This is also at the core of why most of these add-on widgets expect you to set up your PATH, too.)
    The Drupal database connections are managed under the sites directory, a subdirectory located within the Drupal directory tree.  You'll find subdirectories for the specific Drupal sites you've configured there, with a settings.php file for each.  There's also a general sites directory with modules and themes that can be applied generically.  The settings.php file itself can be edited with nano, vim or emacs via the command line, or with one of a very few ASCII-capable GUI editors.  If you don't know what I'm referring to here, use nano editor.
    Yes, you can install phpmyadmin on OS X.  I wouldn't, though.  Sequel Pro has a much more familiar interface for folks that use OS X, and you don't have to protect that tool quite like you have to protect and maintain phpmyadmin against attack.  Do not allow remote access to phpmyadmin, as ill-secured sites are a popular target for remote attacks.
    The Drupal web forums are a pretty good resource for Drupal-related questions, too.

  • How can I use the latest Berkeley DB with SQL API in PHP app?

    Hi,
    I'm a PHP developer and I already use Berkeley DB in my applications using the [DBA Functions|http://www.php.net/manual/en/ref.dba.php] . I'm very interested in the latest Berkeley DB release. How can I write a PHP program that uses the SQL API of the latest Berkeley DB release?

    Hi Kurt,
    I'm not a PHP expert (far from it), but the simplest way to get started with the Berkeley DB SQL interface is to run Berkeley DB's <tt>configure</tt> script with the <tt>--enable-sql_compat</tt> flag.  This will create a library called <tt>libsqlite3.so</tt> that you can use as a drop-in replacement for SQLite at the API level.  Database files still need to be converted with a SQLite <tt>.dump</tt> followed by a <tt>.read</tt> with the <tt>dbsql</tt> tool.
    This should then allow the existing PHP driver and application code to switch over to Berkeley DB without any code changes by setting <tt>LD_LIBRARY_PATH</tt> to find the Berkeley DB version of <tt>libsqlite3.so</tt> ahead of SQLite. Note that any other code that relies on SQLite will also run against Berkeley DB with this configuration, which can cause problems if the system libraries use SQLite (for example, on Mac OS X). For that reason, a better long term solution would be for the PHP SQLite driver to have a mode where it loads <tt>libdbsql.so</tt> rather than <tt>sqlite3.so</tt>.
    I hope this helps, please let us know how you go because I'm sure lots of other PHP developers will be interested in the answer.
    Regards,
    Michael Cahill, Oracle Berkeley DB.

  • How can i use my old airport express with my new imac and wireless hp print

    i just bought my first imac (intel) and a wireless hp printer. i now realize that a wireless connection between my imac and my printer needs a router.
    i have an airport express base station, which is a few years old. I can't find my documentation, so i don't know its specifications.
    how can i find out the specs of the airport express i have and whether i can use it now? it says that it is model a1084 100-240v~ 0.2a 50-60 hz.
    does that tell any knowledgeable people out there about the specs? can i search the apple website by serial number and find the specs?
    thank all of you potential responders ahead of time.

    Hi green jean
    Try this > http://www.apple.com/airportextreme/features/printing.html
    but also see > http://docs.info.apple.com/article.html?artnum=305293
    Dennis

Maybe you are looking for

  • Creating a medical leave plan

    Hi everyone, I'm being asked to create a medical leave plan for the organization im with. No exp in Oracle HR prior to this. The reqs are below. Pro-ration of 7 days for new joiners is based on days of the year served. If employee hire date = 6 Feb 2

  • Creative Cloud is suddenely a trial version?

    Really? What is Adobe doing? Seems as tho' others are experiencing the same issue. MAC and PC.... [groan] First they launch updates that disable 3D in Ps CS6 EXT and now I'm getting these alerts on other CC apps as well (Ai and Id) to register and bu

  • How do I get a game key

    I purchased Civ V from mac app store, I need the registration key to register this game with steam, how do I get it?

  • Muvo Slim Not playing fi

    My recently purchased Muvo Slim is no longer playing music files. It will play Audible files since I upgraded the firmware. When I try and sync the device with WMP0 the program locks. I've looked all over the KB to no avail. Actually, the whole KB is

  • Can I center the text in vertical direction in JTextArea

    for example , if the JTextArea is 50 pixels high, and the text 's height is 20 pixels, then how can I center the text in vertical direction in this JTextArea which means there is a extra space whose height is 15 pixels over and under the text?