Possible DateTime bug in Database Toolkit

Hi!
I dont have the database toolkit here, and it seems you cannot download a 64-bit evaluation ...
Bug?  I've been writing DateTime fields to a database through the proper use of clusters and Inserts, but it seems i never get any fractional seconds. The datetime controls shows them and the database fields should support them (atleast it's showing .000 at the end) so i'm wondering: Does it somehow use regional settings for time so it's using my decimal comma and thus ditching the fractions?
/Yamaeda
LabVIEW 8.2 - 2014
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
G# - Free award winning reference based OOP for LV
Solved!
Go to Solution.

Actually if you do a parametrized insert there is not necessarily any string involved. The datatime value could be directly passed as a DB variant. But I'm not sure what the internal LabVIEW conversion from it's native control datatypes to a variant does.
Another idea might be a mismatch with the used decimal character. Some local settings use decimal comma, others use decimal point. ADO, which is used by the Database Toolkit, has a strong preference to use  the local decimal format, and so does LabVIEW, unless you disable that with an INI file setting. But if your server uses a different setting you have a problem!
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • Bug in Database Toolkit - freeing commands

    I am pretty sure I have found a bug in the database toolkit.
    When an 'insert' SQL command fails, the CMD Execute.vi returns an error.
    The 'CMD Delete.vi' then doesn't correctly remove the command object from
    the system.
    (it removes it, but does not adjust the count because of the incoming
    error)
    A workaround like this causes the counting to be correct.
    I have attached the modified VI
    Can you put this fix in the next release?
    Thanks.
    Attachments:
    Cmd Delete.vi ‏15 KB

    Sure,
    Look at the ExceltoDatabaseCore.vi. basically it tries to insert a record, and if it already exists it will do an update instead (with an optional clause such as 'where mykey='identifying key'  '
    In that particular case, the first record counter will fail to decrease count.
    -Nild
    Attachments:
    Insert Error.zip ‏81 KB

  • SQL Query Works in MS SQL Server 2008 but not when using Database Toolkit

    I have this SQL query:
    DECLARE @DataTypeTable TABLE (
    Name varchar(128),
    TypeID INT)
    --Add comma delimeted data type names to temp table
    INSERT INTO @DataTypeTable (Name)
    SELECT * FROM WhatWeShouldDoRead.func_Split(@DataTypeTrimmed,',')
    SELECT Name FROM @DataTypeTable
    Which takes a comma delimited string and returns the string as a table.  It works correctly in Microsoft SQL Server Management Studio.  When I run this as a stored procedure  I get back nothing.  There are no errors, SQL or otherwise.  I've verified that I am connected to the correct database and that the stored procedure is loaded by changing the no error string that is reported from this stored procedure (that code is not shown in the above example).  Has anyone seen this problem before, or have any experiance with SQL/Labview interfaces to tell me what I'm doing wrong?
    Thanks in advance. 
    Solved!
    Go to Solution.

    After doing some more research it appears that the database toolkit cannot interface with any table results from any type of temp table.  It may have to do with the fact that MS SQL 2008 stores temp tables in a seperate database (tempdb) and not the database you are currently connected to.  See this link for a good artical on temp tables:
    http://databases.aspfaq.com/database/should-i-use-a-temp-table-or-a-table-variable.html
    If possible,  I'd like a someone to prove me wrong, but for now will have to settle for exporting the contents of a temp table through a string.

  • Database toolkit memory leaks

    I have memory leaks in my Labview application connecting and inserting data into a MSSQL server using Labview Database Toolkit.
    Versions: Labview 7.1, Toolkit 1.0.1.
    I have searched the forums and searhed everywhere else...I see there are some issues. (For example List tables vi). Removing the list tables vi helped a lot. But I can still see that I'm loosing memory here and there, now and then.
    My question is: Is there any general guidlines to prevent all memory leaks mentioned? 
    Or possibly, will it all go away if I upgrade the versions. (As I understand I have too update Labview to be able to update the Toolkit?)
    Best Regards
    /Jesper
    Solved!
    Go to Solution.

    Have you seen this Developer Zone document?
    LabVIEW Database Connectivity Toolset 1.0.1 Known Issues
    Functions, VIs, and Express VIs - ID 2F7E2352    
    Memory Leak in the Database Toolset in DB Tools Open Schema VI
    The DB Tools Open Schema VI leaks memory which if called continuously eventually causes a LabVIEW crash. This is a sub VI of the DB Tools Insert Data VI.
    Workaround—At the highest level, if you are continuously updating values in a table, make sure the table already exists and leave the Create Table input to the DB Tools Insert Data VI set to FALSE.
    Other than this, the most important thing is to close all references...
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • Using get properties VI from database toolkit

    Hello I'm using database toolkit to read and import data from a MySql database.
    I want to read the last row that has been written in a table. I don't know how to do this but i think i can know the number of the last row written using the get properties block.
    But using this VI i have to use execute query block.....and i get an error, i think that the sql query is not defined correctly.
    I have posted a part of my VI where i use this blocks.
    I have two questions: is this the way to read the last row that has been written in  a table of a database??
    The other question is why doesn't run this subVi and what is the correct way to define a SQL query (you have to put the table name, o some other thing)
    Thank you very much
    Larson
    Attachments:
    example.PNG ‏12 KB

    I hate when this happens... if I press TAB + SPACE the message is sent to forum... :-s
    Hi, Larson:
    You can't read "the last row written" in a DataBase, as records are not sorted, by definition. You could have a field in a record that grows every time you insert in a table, like AutoNumeric, or DateTime and then you could know exactly wich record is the last one.
    Once you know how to get "the last row written" you have to translate it to SQL. Provided you have an AutoNumeric field named "IdRow" in your table "TestTable", you could write:
    SELECT * FROM TestTable WHERE IdRow = (MAX(t.IdRow) from TestTable t)
    Now you should build a call to the DataBase.
    First you need ExecuteQuery, as you did use, and SQL Query input should be the like "SELECT * FROM..."
    Second you have to retrieve the data with, for example, "DB Tools Fetch Recordset Data", in DB Palette, next to Execute Query. The output will be a Variant 2D Array that you can convert to anything you want, like String 2D Array, for example using Variant palette functions
    And third you have to close the recordset Reference with "DB Tools Free Object", the rightmost function in the same row as Execute Query.
    And once you have done all, you can close de DataBase.
    Hope it helps,
    Aitortxo.

  • Install database toolkit

    I just realized that I didn't install my database toolkit during my labview installation.  What is the quickest way to go back and just install that kit alone?  Which DVD should I execute first? 
    Yik
    Kudos and Accepted as Solution are welcome!

    Hi,
    Which version are you installing?
    In our Academic Site License 2008 (LV 8.6) pack, the Database Toolkit is in the green DVD - LabVIEW Extended Development Suit. 
    The 2010 Spring and Fall DVDs are here with me too, but I haven't installed them so far. So not sure about the new arrangements.
    Once you put the appropriate DVD in the driver, and start installation, you will have possibility to install the extra toolkits you install. Be careful, you will have to select all the components that you want to install (or keep, if already installed), otherwise, it will overwrite the new selection over the existing one. So please make sure you are marking all the toolkits you require (including the ones you already have on your computer).
    I hope this helps.
    Vaibhav

  • Windows Embedded Standard 7 - database toolkit compatible​?

    I am looking at the TPC-2212 and the option of WES7 for an OS and wondering if it will be able to utilize the database toolkit?
    Thank you.
    Ryan Vallieu
    Automation System Architect
    Solved!
    Go to Solution.

    After further digging and search terminology refinment I found my answer here: http://www.ni.com/white-paper/13047/en
    4. Do I Need to Directly Connect to a Database From My System?
    WES7 supports data logging to a database via the LabVIEW DSC Module. Database logging with LabVIEW DSC was specifically designed for easy configuration and operation. It can easily connect and log directly to many common relational databases such as Oracle, mySQL, and Microsoft SQL. LabVIEW DSC also includes its own integrated database, Citadel, optimized for efficient long-term logging.
    WES7 also works with the LabVIEW Database Connectivity Toolkit, which allows more customized creation, querying, and retrieval of data from any provider that adheres to the Microsoft AciveX Data Object (ADO), OPC database connectivity (ODBC), or object linking and embedding database (OLE DB) standard. Similar to LabVIEW DSC, the Database Connectivity Toolkit supports communication to common databases such as Oracle and Microsoft SQL.
    Like OPC, many common database communication methods are based on Windows technologies such as ActiveX. Because of this, the LabVIEW Database Connectivity Toolkit does not work in LabVIEW Real-Time applications.
    Learn more about data-logging options with LabVIEW DSC.
    Database connectivity is still possible using LabVIEW Real-Time, but an intermediate Windows host computer must be used; similar to the method employed to achieve OPC communication, as well as HMI capabilities from LabVIEW Real-Time. Standard communication methods such as TCP, UDP, and LabVIEW shared variables are used to communicate with this separate Windows host computer.
    Learn more about communicating with relational databases in LabVIEW Real-Time.
    Ryan Vallieu
    Automation System Architect

  • Application doesn't work after build (database toolkit and report gen toolkit).

    I wrote an application using database toolkit and report gen toolkit to retrieve some data from a database,  put into a Word doc, save the Word doc and print it.  It works fine when I run the vi, but when I build and run it, it does nothing.   I have tried all of the settings in Projec Manager that I think might help but it still won't work right.  Labview 8.2.1, XP.
    Thanks,
    Charlie
    Solved!
    Go to Solution.

    Thanks for the help.  I finally abondened the Word append table and used the regular report gen append table and got it to work fine.  The error was 214682314.  That led me to the thread about column numbers must vbe between 1 and 63, but like I said, my coulumn number is 7 so don't know what is going on.  Anyway I got the vi to work and do what I want so I guess now the problem is solved (moot).
    Charlie

  • How can I delete a row in access using the database toolkit?

    I want to delete just one row of a access table using the database toolkit. Can it be done and if so How?

    Take a look at page A-1 of the database connetivity manual. It has information on making a sql query that will delete. You will need to use this command with the dbtools execute query function. Look in the shipping examples for an example with this function.

  • How to create a database in SQL Server Express 2014 to be used with LV Database Toolkit

    I use LV Database Toolkit, which by default uses Jet database. Now I want to use SQL database with LV Database Toolkit. I have downloaded and installed "SQL Server 2014 Express with Tools" in my Labview Laptop. Now I want to create a database in SQL Server, because I think it is a requirement for creating a "udl connection file" (*.udl file). Please help me!
    Solved!
    Go to Solution.

    I made a database whose path is: C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\depot1
    I tried to make .udl connection file, but when I click on "test connection" with the provider: "OLEDB Provider for Microsoft SQL Server" I get the Error "UDL Connection File Failure" (attached below)
    When I tried to make the .udl connection file with the provider "Microsoft SQL native Client 11.0" and when I click on "Test Connection" I get the Error" UDL Native Client_1"& " UDL Native Client_2".
    Please help!
    Thanks!
    Attachments:
    UDL Connection File Failure.png ‏78 KB
    UDL with Native Client_1.png ‏702 KB
    UDL with Native Client_2.png ‏714 KB

  • Using SQLplus command in LabView Database toolkit

    Hi ,
    I would like to ask something but before that this is my set up background
    OS          : Win 7,
    LabVIEW : 2012
    I have successfully connected with Oracle database using Labview Database toolkit.
    The problem now is since I need to query the data from the database,
    it will takes time for the labview to process it (since there is so much data in a specific table),
    let say that the table in database is "Serial Number", and the data that I want from that table is "SN123"
    if I query the data from that table, the labview will process it in a long time since it will not only give me "SN123" but also other data inside the "Serial Number" table.
    (Refer to attachment)
    but if in SQLplus, there is a command that can be execute to specifically call the "SN123" data,
    For the SQLplus, the steps to retrieve the data is like this:
    1. Key in the command to get the ID of the "SN123"
    2. Key in the command "SN123" ID to retrieve the data.
    I wonder if there is a way to put this command on labview database so it will be faster to retrieve the data.
    Attachments:
    Database.png ‏84 KB

    An  instrument driver written in Labview, is not the same as a instrument driver used by say Windows. A Labview instrument driver uses standard Labview functions to send SCPI commands to the instrument. You can learn a lot about the instrument by looking into the Labview instrument driver, and how it sends the commands to the instrument. But having the instrument programming manual at hands is also important.
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Selecting data on basis of string from ms access using database toolkit

    i want to read data from ms access in labview using database toolkit,but the problem is that i want to enter/select pipetype and other fields must be filled from the database with respect to pipe type intead of indexing(1,2,3,....)..kindly tell me how to make my selectio from database depending on pipe type.
    Attachments:
    database.zip ‏324 KB

    What is pipetype and what exactly do you mean by 'selecting data on basis of string'.

  • How to connect labviewv database toolkit to SQL CE server

    Dear sir,
                      i am using labview 8.2.1 and Database Connectivity 8.2.i need same simple  concept of how to connect  LV database toolkit to SQL CE Server.

    When opening the database connection, you will need to provide either a connection string, or a path to a UDL (which will contain a conenction string). The easiest way to get a connection string is to go to (no I am not kidding) www.ConnectionStrings.com. Once there you enter the type of DBMS you are trying to connect to, and the system will list connection strings that you can use based on the drivers that you're using.
    How much experience do you have with LV and/or databases?
    Mike...
    PS: you might also want to check out a series I did a bit ago on database connectivity in my blog. See the link in my signature...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How do I delete a row in Microsoft Access from a vi using the database toolkit

    Using the database toolkit 1.01 how can I delete a row from my vi

    Bambi,
    I know you already got the answer from Jeremy in the LabVIEW Forum, but I wanted to place this link here so that other users could see the answer.
    How do I delete a row in Microsoft Access from a vi using the database toolkit
    Evan

  • Database toolkit Included in LabView 12?

    I thought i read somewhere but cannot confirm
    Does Labview 12 come with the database toolkit? 
    thanks in advance
    -Kurt
    Solved!
    Go to Solution.

    Clarification: the Database Connectivity Toolkit has been included with LabVIEW 2014 Professional Development - it is not included with the Base or Full Development systems.  The Database Connectivity Toolkit is an add-on for previous versions of LabVIEW.
    Chris H
    Applications Engineer
    National Instruments

Maybe you are looking for

  • File Receiver Content Conversion

    I have the following XML: <n0:CostCentreServiceCreateRequest>      <n0:ESB_Header>           <MessageId>4E77E43F-1D1D-0096-E100-8000AC182411</MessageId>           <Timestamp>2011-09-19T14:00:00Z</Timestamp>           <SourceSystem>SAP</SourceSystem>

  • Do I need to close it ?

    Consider following example... Example 1:             FileInputStream fis = new FileInputStream("test.txt");             DataInputStream dis = new DataInputStream(fis);             // Do something ...             dis.close();             fis.close();

  • Unable to download any programs from Creative Cloud

    I've been trying to install a number of apps via the Cloud (mainly Illustrator, InDesign and Photoshop - trial versions) however the installs keeping failing.  They all get to between 30%-55% and then go back to 0% and start again and then get to the

  • (2) Vehicles - But want to have only ONE FOB for keyless entry and remote start

    I have the following 2 vehicles: 2003 Dodge Durango RT with automatic transmission 2006 Volvo V70R with 6-Speed manual transmission I am looking to purchase a keyless entry / remote start on BOTH vehicles but use only (1) FOB to control both as I wil

  • Webblogic 10.3.3 automatically shuts down on OFM Configuration :

    I am confuguring OFM 11.1.1.2.0 on Weblogic 10.3.3 on Windows Server 2003. However while Confuguring the Oracle Identity Manager Components, it fails while creating the Oracle HTTP Server. It says that it cannot connect to the Admin Server. At this p