Database connectivity toolset

Hi,
I am using the VI "DB Tools Select Data" from the database connectivity toolset. And I have a problem with the VI "DB Tools Execute Query" that is included. I would like to select a specific column from a specific table in my database and it is ok so long the name of the table is just one work, example "Names", but if the name of the table consists of two words ("Last Name") I get error, the message says that it can't find the table Last, i.e. not the whole string is read, just the first part. How can I manage to get the "Conn Execute.vi" to read the whole SQL query? Any suggestions?
Attachments:
Copy_DB Tools Select Data.vi ‏32 KB

As far as I know and what I experienced, there are no blanks allowed (and some other special characters), both in table names and column names.
Just replace the blanks with an underscore and it should work.
Using LV8.0
Don't be afraid to rate a good answer...

Similar Messages

  • When using the Database Connectivity Toolset, reads and writes with long binary fields are incompatible.

    I am trying to write LabVIEW Variants to long binary fields in a .mdb file using the Database Connectivity Toolset. I get errors when trying to convert the field back to a variant after reading it back from the database.
    I next tried flattening the variant before writing it and ultimately wound up doing the following experiments:
    1) If I use DB Tools Insert Data to write an ordinary string and read it back using a DB Tools Select Data, the string is converted from ASCII to Unicode.
    2) If I use DB Tools Create Parameterized Query to do an INSERT INTO or an UPDATE operation, specifying that the data is BINARY, then read it back using a DB Tools Select Data,
    the length of the string is prepended to the string itself as a big-endian four-byte integer.
    I can't think of any way to do a parameterized read, although the mechanism exists to return data via parameters.
    Presuming that this same problem affects Variants when they are written to the database and read back, I could see why I get an error. At least with flattened strings I have the option of discarding the length bytes from the beginning of the string.
    Am I missing something here?

    David,
    You've missed the point. When a data item is flattened to a string, the first four bytes of the string are expected to be the total length of the string in big-endian binary format. What is happening here is that preceding this four-byte length code is another copy of the same four bytes. If an ordinary string, "abcdefg" is used in place of the flattened data item, it will come back as <00><00><00><07>abcdefg. Here I've used to represent a byte in hexadecimal notation. This problem has nothing to do with flattening and unflattening data items. It has only to do with the data channel consisting of writing to and reading from the database.
    I am attaching three files that you can use to demonstrate the problem. The VI file c
    ontains an explanation of the problem and instructions for installing and operating the demonstration.
    Ron Martin
    Attachments:
    TestLongBinaryFields.vi ‏132 KB
    Sample.UDL ‏1 KB
    Sample.mdb ‏120 KB

  • How to store jpeg images in SQL server using NI database Connectivity Toolset. Can anyone please help me in this regard.

    Please tell how to store jpeg images in SQL Server using NI Database Connectivity Toolset.

    http://www.w3schools.com/sql/sql_datatypes.asp
    You setup a field as BLOB and store the binary of the picture there. Depending on the database it can be called differently as you can see in the link, in SQL server there's even a Image datatype.
    /Y
    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

  • Database connectivity toolset and microsoft access

    Bonjour,
    je suis débutante labview et j'aurais besoin d'aide...
    voici mon pb:
    j'ai créé une table sous microsoft access et j'aimerais lire les données à partir de labview en utilisant "database connectivity toolset". les vi utilisés sontpen connection, select data et close connection.
    le vi "open connection" demande le 'connection information': j'ai donc donné le chemin ou se trouve mon fichier .udl
    ce fichier udl est configuré comme cela:
    fournisseur: microsoft jet et connexion: le chemin ou se trouve le fichier access.
    mais ca ne marche pas! j'ai une erreur apres le vi select data, qui me dit 'erreur syntax'
    je ne sais pas si j'utilise les bons vi....
    merci pour une réponse rapide.

    Bonjour,
    Tout d'abord, vous devez vérifiez si la création du fichier UDL est correcte. Ci-dessous une note d'application décrivant étape par étape cette procédure:
    * Creating a Microsoft Data Link file (.UDL) for Connecting to Microsoft Access in LabVIEW
    http://digital.ni.com/public.nsf/websearch/1D5EB4DCBD13106486256B9D005E11B0?OpenDocument
    Ensuite, testez l'exemple standard "Connection example.vi" fourni avec le toolkit Database Connectivity.
    Dans LabVIEW, allez dans le Menu Aide >> Recherche d'exemples ... puis sélectionnez Toolkits & Modules >> Connection aux bases de données >> Connection example.
    Si la connection échoue, l'exemple doit renvoyer une erreur avec un code et un descriptif. Ces informations sont indispensables pour débuter un débuggage (l
    es codes d'erreurs classiques sont référencés sur le web et des notes d'applications sont fournies pour les corriger).
    Cordialement.
    Matthieu Gourssies
    National Instruments France.

  • Database connectivity toolset and nested transaction

    Is it possible to make nested transactions with the Database Connectivity Toolset ?
    By nested transactions I mean that I want to open a transaction inside a transaction.
    I use LabVIEW 6.1 and Database Connectivity Toolset 1.1
    Any ideas are welcome.

    You may be able to do this in a different manner. Your options depend on how the database has structured the data. For example you can have a table defining "measures", another table defining "measure setps" and so on.
    Each measure has an ID (MID) and each measure step has an ID (MSID) and these can be related to each other to provide the hierarchy. So in this case you could just get a measure, then query for all the measure steps that match (the MID and MSID) and sort them based on some attribute/criteria and work down in that manner.
    This would provide a clean data architecture and enable you to reuse steps in multiple measures if you needed to. I'm not sure how your database is building the hierarchy, in the end there are some parent ch
    ild relationships defined ... these would be very similar to the IDs referred to above.
    Like you said, had to explain without a picture.
    Regards,
    Kamran

  • How to get a recordset defined by primarykeys using the LabVIEW Database Connectivity Toolset?

    Hi folks.
    I'm using LabVIEW with the LabVIEW Db Toolset and Microsoft Access. The table contains 18 columns with a growing nr of rows.Now I want to get the whole recordset containing all columns defined by my primary keys. My SQL-statement is sofar:
    SELECT ALL FROM IMPULS_STATOR WHERE FAB = [string] AND LDATE = [datestring] AND ADATE = [datestring]
    But every time I end up with an error message saying "Invalid string: specified field does not exist or contains an unsupported character". I mutated the statement several times, adding or removing spaces, colons, etc.
    What am I doing wrong?
    Thanks in advance

    Thanks, Dennis.
    Unfortunately, I`m still encountering some problems with the DateValue function. My date/time field has this format: yyyy-mm-dd hh:nn:ss . If I use DateValue, nothing will be returned. Changing the format to yyyy-mm-dd in the Access DB didn`t help and I do need the time. Combining DateValue and TimeValue let to several errors. Using only TimeValue did not help me out. LabVIEW does not indicate errors anymore, therefore the syntax should be fine. But I don`t get any information back from my database.

  • Database Connectivity Toolset-Fetching Data from Database

    Hello guys,
    Currently I am doing some applications that include with database manipulation. The data that I am using now coming from Microsoft Access.
    My Idea is to fetch the data from the specified table, specified column and specified row.... yeah we could do it using SQL query that we wrote on the Block Diagram...but that will be apply for the one condition that we set.
    How about for the next time when we want to pull data from the same database but from different table/column/row using the same application..yeah we have to change the sql query
    Why don't we use 'ring' in Front Panel to choose the database we want like to...
    example
    If we choose
    Dominant = Right
    Age = 25-34
    Sex=Female
    Weight= 50-69
    Height= 175-184
    Then the answer that will come out might be 78 in numeric indicator
    So and the next time if I choose
    If we choose
    Dominant = Left
    Age = 25-34
    Sex=Male
    Weight= 50-69
    Height= 175-184
    Then the answer will be 77 in numeric indicator...
    So...my questions is simple....how to do it....have anyone here try to use ring to make selections in their database
    I'll attach my empty applcation so that you all can see the Front Panel...and what exactly my Idea is...
    TQ
    Attachments:
    fetching..vi ‏19 KB

    I couldn't look at your VI (7.0), but you can read (and change) the strings in a ring by using a property node.
    To create one, right click on the control or the terminal and select Create>>Property Node. Then, click on the property and find Strings[] in the list. This is an array of all the strings in the ring. You can wire it, along with the ring value, into Index Array and you will get the string you chose.
    You can now use this string to build your SQL query, no need for numbers and codes.
    You can further customize this by using different strings for each field. For example, you can have one ring which will select the field, and based on that, another ring will now have only the values relevant to that field.
    You can save these values in an array and that way have an unlimited query.
    Correct me if I'm wrong, but don't the DB tools allow you to extract data directly (For instance, the DB Tools Select Data VI)? Shouldn't this allow you to extract all the info you need?
    Try to take over the world!

  • Memory leak when using database connectivity toolset and ODBC driver for MySQL

    The "DB Tools Close Connection VI" does not free all the memory used when "DB Tools Open Connection VI" connects to "MySQL ODBC Driver 3.51".
    I have made a small program that only opens and close the connection that I run continously and it's slowly eating all my memory. No error is given from any of the VI's. (I'm using the "Simple Error Handler VI" to check for errors.)
    I've also tried different options in the DSN configuration without any results.
    Attachments:
    TestProgram.vi ‏16 KB
    DSNconfig1.jpg ‏36 KB
    DSNconfig2.jpg ‏49 KB

    Also,
    I've duplicated the OPs example: a simple VI that opens and closes a connection. I can say this definately causes a memory leak.
    Watching the memory:
    10:17AM - 19308K
    10:19AM - 19432K
    10:22AM - 19764K
    10:58AM - 22124K
    Regards,
    Ken
    Attachments:
    OpenCloseConnection.vi ‏13 KB

  • Databasa Connectivity Toolset Reading Performance

    Hi.
    I'm using DCT to read two tables from access db, each containing about
    3000 records with about 20 fields.
    The reading time, using standard systems, like in examples, like
    Connect to DB, Get Table, close connection is more than 5 minutes wit
    100% processor time.
    After this Huge time amount, it is necessary reprocess the array to
    convert it in appropriate LabView data type.
    Anyone has some Ideas to survive?
    Note: writing is Quicker: more than 100 records per second.
    Thanks in advance, OldSmobile

    On Fri, 25 Jan 2002 09:50:06 -0800 (PST), Jeff M. wrote:
    >http://ae.natinst.com/operations/ae/public.nsf/fca7838c4500dc10862567a100753500/862567530005f0a186256a33006b917a?OpenDocument
    Thank you!
    Unfortunately at present that link seems not been working... I'll try
    later, or if you can give me some indication on how to re-find it i'll
    not stress you for this :-)
    OldSmobile

  • Update value in database(access-connectivity toolset )

    Hello,
    I am using the database connectivity toolset and I am trying to change values of an existing database.
    I used the "Update" command but i got an ERROR!!!.
    "Exception occured in Microsoft JET Database Engine, Syntax error in UPDATE statement..  in Conn Execute.vi->...."????
    What to do???
    Regard's
    Eyal.
    Attachments:
    update value.jpg ‏23 KB

    Hi
    The shearch statement (after Where) shud be anather field than the field you are trying to change.
    I am using defoult value on cursor type with sucsess.
    I hope this will help you
    Rune

  • How can I use SQL TOOLKIT concurrently with Database Connectivity ?

    I have installed LabVIEW 6.1 with the Database Connectivity Toolkit and the SQL Compatibility Toolkit (e.g. _SQL folder). I am trying to make the transition from the SQL Toolkit VIs to the Database Connectivity toolkits, but for compatability with existing systems I would like to be able to run the two sets of VIs concurrently (but not in the same app).
    When I read into 6.1 a connection VI that I wrote with LabVIEW 6.0 and the SQL toolkit the connection reference type gets changed from a number to type connection (see attachments) . Does compatbility mean that my SQL toolkit VIs are converted to a form compatible with the new ADO ?
    Can I use the SQL Toolkit VIs or the Database connectivit
    y VIs in the same installation of 6.1 ?
    Can I have the SQL Toolkit VIs appear on the functions pallette and function as they did when only the SQL toolkit was installed ?
    Attachments:
    CNNCT.vi ‏20 KB
    CNNCT.vi ‏22 KB

    In response to your #2 below:
    Actually it is possible to have the old SQL Toolkit and new Database
    connectivity in the same installation of LabVIEW. I have only tried it on
    6i, but don't see why it wouldn't work on 6.1. The trick is not to install
    the SQL toolkit compatabitily VI's. The old SQL toolkit uses the Intersolve
    dll through ODBC while the new Database connectivity uses ADO so it is
    possible to use both methods not only in the same LabVIEW install, but it
    the same running application. It has been a while since I originally did
    this, so I am posting only to mention that it is possible and not exactly
    how to do it. If anyone is interested in more details just respond.
    Brian
    "Jeff B" wrote in message
    news:[email protected]...
    > First, direct answers to your direct questions:
    >
    > 1. Does compatbility mean that my SQL toolkit VIs are converted to a
    > form compatible with the new ADO ?
    >
    > Yes
    >
    > 2. Can I use the SQL Toolkit VIs or the Database connectivity VIs in
    > the same installation of 6.1 ?
    >
    > No
    >
    > 3. Can I have the SQL Toolkit VIs appear on the functions pallette
    > and function as they did when only the SQL toolkit was installed ?
    >
    > No
    >
    >
    > Now an elaboration:
    >
    > Having the old SQL Toolkit and the new Database Connectivity Toolset
    > installed on the same version of LabVIEW on the same computer is not
    > supported.
    >
    > Once you install the Database Connectivity Toolset, any VIs written
    > with the SQL Toolkit will run, but with the ADO layer, as you
    > suspected.
    >
    > Internally, the only way we can have both the SQL Toolkit and the
    > Database Connectivity Toolset installed on the same computer for
    > troubleshooting customer issues is to have them installed on different
    > versions of LabVIEW. I, for example, have LabVIEW 5.1.2, 6.0.3, and
    > 6.1 all installed on my computer, and I have the SQL Toolkit install
    > on LabVIEW 5.1.2, and the Database Connectivity Toolset installed on
    > LabVIEW 6.0.3. In this configuration I can still run SQL Toolkit VIs
    > independent of the Database Connectivity Toolset if I open and run
    > them in LabVIEW 5.1.2.

  • Database connectivity toolkit broken vi's

    hello all,
    I upgraded from LV 8.5 to 8.6 (windows XP platform) a couple of weeks ago and have had no issues until today when all of sudden my Database toolkit vi's are coming up broken, with: "One or more required inputs to this function are not wired or are wired incorrectly. Show the Context Help window to see what the connections to this function should be." errors however this is not happening on all my vi's using objects from the tool kit.
    Actions taken to date with no success:
    1. mass compile of all my vi's
    2. mass compile of database toolkit
    3. re install Database toolkit
    4. mass compile the vi.lib directory
    5. as per the old knowladge base article Document ID: 2RO7J544, ensured latest microsoft MDAC is installed.
    Any help is appreciated as we use this toolkit extensivly.
    thanks
    Chris
    CLAD
    Solved!
    Go to Solution.

    Hi Chris,
    Thanks for the reply and I hope your well.
    I need to try to understand something, when you say upgrade to LabVIEW 8.6 did you upgrade the toolkit?
    LabVIEW Database Connectivity Toolkit 1.0.2 is for LabVIEW 8.6. If, on the other hand your trying to use LabVIEW 8.6 with DC Toolkit 1.0.1 then I beleive they are not offically compatible. However, these KnowledgeBase links maybe of interest: (after all they are just VIs). However, saying this - if you read the readme for the new toolkit several things have changed for LabVIEW 8.6 - so becareful. 
    You will have to manually copy all the files over from one version of LabVIEW to another. Use the following instructions to accomplish this:
    Install the Database Connectivity Toolset to the lowest version of LabVIEW, say X.
    Copy the following files/directories to the appropriate directories in the later version of LabVIEW, say Y.
    Copy the database directory from \LabVIEW X\vi.lib\addons\ to \LabVIEW Y\vi.lib\addons\
    Copy the database.llb file from \LabVIEW X\project\ to \LabVIEW Y\project\
    Copy the database directory from \LabVIEW X\examples\ to \LabVIEW Y\examples\
    OR also check this out,
    Installing Toolkits for Use with Multiple Versions of LabVIEW:
    http://digital.ni.com/public.nsf/allkb/58BE852CB35237C786256A290079DF39?OpenDocument
    Other issues you may have come across,
    Database Connectivity Toolset Claims the Polymorphic SubVI's are Broken
    http://digital.ni.com/public.nsf/allkb/0FA97221637E74CA86256C7C005069A5?OpenDocument
    "Updating to the most recent MDAC will resolve this issue"
    I would also check that you Installed the tookit for LabVIEW 8.6 - toolkits are now specific for labVIEW 8.6. So maybe try re-installing and the toolkit for LV8.6.
    Hope this helps and please let me know (please clarify a little more),
    Kind Regards
    James Hillman
    Applications Engineer 2008 to 2009 National Instruments UK & Ireland
    Loughborough University UK - 2006 to 2011
    Remember Kudos those who help!

  • Database connectivity toolkit -- create table

    Is it possible to implement the SQL command of AUTO_INCREMENT for the 1st column while creating table right at the start? ie making use of the "create table.vi" in the database connectivity toolkit?
    I know this can be done if i execute the SQL Command via the "execute query.vi". Just asking if there might be a better way. Thanks.
    Hope to achieve a similar output as shown below where the 1st column is set for auto-increment:
    No | Name| Age
    1   | John  | 25
    2   | David | 28
    3  | .....      | ....
    4.....
    5 .........

    Hey HWJ,
    I checked around and I think that the "execute query" method would be the best way to go about doing this.  I couldn't find a VI that had the AUTO_INCREMENT option and checked the Database Connectivity Toolset Manual and didn't find any reference to that command.  Please let me know if you have any further questions!
    Andy F.
    National Instruments

  • UPDATE records using Database Conectivity toolset

    I´m using LabVIEW 8.5 & Database Connectivity toolset ver 1
    When I try to update a record of a MS ACCESS 2003 with the SQL UPDATE TablenName SET field1=newvalue, field2=newvalue........WHERE condition=x, I get the error -2147217900 Exception occurred in Microsoft Jet DataBase engine: Sintax error in the instruction UPDATE.vi ComExec (8.5 bug Workaround)vi.
    I ´dont think I have made a sintax error. If the field is an string I use the 'newvalue' following by a comma, in case of numeric field just the coma. For instance :
    UPDATE TableName SET Name='John', Age=22,Hair='blond' WHERE height=1.85
    I have discarded the reserved word´s problem, as I can insert records in the data base without any problem 
    Any idea to solve the problem
    Thanks
    Simbani

    Did you try it like this?
    UPDATE TableName SET TableName.Name='John', TableName.Age=22,TableName.Hair='blond' WHERE TableName.height=1.85

  • How can I retrieve the col data size and Null information from table using labview connectivity toolset

    Hi, there,
    I am wondering how to get the table information by labview database
    connectivity toolset. The table list vi comes with the toolset can get
    only col name, data type and data size. And I found the the data size
    always gives back -1, even though it is a string type. Do somebody has
    some idea about it?
    Thanks.
    JJ

    JJ,
    Go into the diagrams of the DBTools List Columns and DBTools Get Properties respectively. When you inspect this diagram, you will see the raw ActiveX properties and methods called to get the size information. The value of -1 means the requested recordset is already closed. This is the sort of thing that is controled by the driver (ODBC, OLE DB, Jet, etc) you are using. Notice that you can right click on the property and invoke nodes and get more information about these specific items directly from the ADO online help.
    Crystal

Maybe you are looking for

  • Need help on filtering out one record from a report and open in new page

    Hi I am new and embarrassed to write in the forum asking silly questions. Thing is I am learning all from scratch without help from anyone. I have created a database (have previous knowledge only from Access) and have managed to create a beautiful re

  • How to use todate function in JDBC adapter

    Hi All, How can we use the todate function to update a date field in Oracle database. I am getting a java.sql.SQLException: ORA-01858: a non-numeric character was found where a numeric was expected Exception, when I am mapping the date fields with  t

  • Data not loading /updating into cube 0lc_c03

    Dear Friends, I extracted data for three data sources i.e. 2lis_03_bx, 2lis_03_bf,2lis_03_um i got data in BW PSA with out any error but that data is not updating in cube 0lc_c03 i have done settings at r/3 at t.code mcnb,SBIW and I had make NDI flag

  • Itunes 10.7 will not install

    I'm running 64-bit Vista Ultimate and the latest Itunes update has failed to install multiple times.  My son's laptop running 64-bit 7 Home Premium and it took multiple times for the update to complete successfully.  I have chosen the Download Only o

  • XML - PL/SQL help

    Hello, I am having a query as a part of my procedure block that extracts the following xml and stores it into a variable that is of xmltype: <FeatureRoot> <Feature> <FeatureName>qaz</FeatureName> <FeatureAction>Add</FeatureName> </Feature> <Feature>