Database Connectivity Toolkit PROBLEM: ignoring adLongVarChar and adLongVarBinary ADODB types

Using LV2013.
in ADODB, 'adLongVarChar' is the datatype for "TEXT" and 'adLongVarBinary' is the datatype for "BLOB". 
NI_Database_API does not implement them, in the VI "vi.lib\addons\database\Auxilliary.llb\DB Tools Type and Dir to ADO.vi" it is always 'adVarChar' and 'adBinary'. This is wrong.
For some DBMS  this might not be a problem, but for SQL Server this is a big problem. 
If you don't specify its an adLongVarChar, SQL Server right truncate data to 8000 bytes, indeed it gives an error and drop the changes. 
This error seems to be ignored due old versions of SQL Server used to support only up to 8000 bytes in a row column, but now if you specify VARBINARY(MAX) - you will need to use adLongVarBinary to use the 2TB MAX of space, or if you use TEXT (which is an alias to VARCHAR(MAX)) you will need to use adLongVarChar to use the 2TB MAX of space in row column. 
I've made fixes in the NI_Database_API by myself for it to work. I feel like NI_Database_API is abandoned.
I usually don't use this API, only when I need ODBC connectivity, usually I use SQLlite for my applications.
I've found out the problem by reading this http://stackoverflow.com/questions/1074428/how-to-write-to-a-varcharmax-column-using-odbc
Attached the fix done, now inserts of long text and blobs working.

Thank you!
Just came to same conclusion independently but to put some more weight behind I just had this issue. This makes the toolkit incompatible with the new (well since 2005) sql server nvarbinary(max) times.
Cheers,
James

Similar Messages

  • Database connectivity toolkit problem with WINDOWS VISTA and Microsoft jet 4.0 provider

    Hi again,
    I'm experiencing a problem with Database connectivity toolkit and Microsoft Jet 4.0 provider (MS ACCESS mdb database).
    I was able to get my application to work properly on my PC: WINDOWS XP PROFESSIONAL, VERSION 2002, SERVICE PACK 3 and Msjet40.dll ver. 4.0.9511.0 (Windows XP SP3 and Security Bullettin MS08-028).
    The same connectivity toolkit seems to have problems (although I didn't get any error dialog) on a laptop with WINDOWS VISTA ULTIMATE, SERVICE PACK 2 and Msjet40.dll ver. 4.0.9755.0.
    Does anyone have an idea whether it is a sort of compatibility issue or a different thing?
    Would it be possible to include my DLLs into the installer in such a way LabVIEW application calls those DLLs instead of the ones it finds on the host PC?
    Thanks a lot. Any suggestion or advice very welcome and appreciated.

    I ran into this with Windows7 64 but, could not get the jet 4.0 to work.  Endnd up dumping access and used sql server express, its free, and all my code worked fine, just used a different UDL to connect.  I wasted lots of time trying to find a way of getting the jet4.0 to work with 64bit windows.
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • Problem with database connectivity toolkit

    I have problem with Labview database connectivity toolkit. I build and deploy the real_web.vi (attached to the post) to the web server. It seems that the DB Tools Open Connect can not connect to the data base, and it issues the following error:
    NI_Database_API.lvlib:DB Tools Open Connec (String).vi->real_web.vi->real_web.vi.ProxyCallerADO Error: 0x80004005 Exception occured in Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified in NI_Database_API.lvlib:DB Tools Open Connec (String).vi->real_web.vi->real_web.vi.ProxyCaller
    But in highlight execution, I do not get this error! My program connects to the database and read the data. What is wrong ?
    Moreover, when I connect to the vi using the web-browser, the cpu usage of ApplicationWebServer process goes up to 100% (The same problem as stated in this post). 
    Attachments:
    real_web.vi ‏28 KB

    Say what you will about the problems that the DCT can cause (and goodness knows I have) my suspicion is that this is not a toolkit ptoblem. When ever something only works with execution highlighting on, two words should immediately jump to mind: "race" "condition".
    Execution highlighting will muck aound with the order in which things get done in your code. Can you post what your code looks like?
    Mike...
    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

  • Why do I get a class conflict between the Prepare SQL.vi and the Get Column Name.vi with the SQL Toolkit compatibility vis from the Database Connectivity Toolkit?

    I have done extensive programming with the SQL Toolkit with LabVIEW versions through 6.1. My customer now wants to upgrade to Windows 7, so I am trying to upgrade to LabVIEW 2009 (my latest purchased version) using the Database Connectivity Toolkit, and the SQL Toolkit Compatibility vis. Everything seemed to be going okay with the higher level SQL operations, but I ran into trouble with the Get Column Name.vi. 
    The pictures below show the problem. The original SQL Toolkit connected the Prepare SQL.vi with the Get Column Name.vi with a cluster of two references, one for connection, and one for sql. The new compatibility vis have a class conflict in the wire because the Prepare SQL.vi contains a cluster with connection, and command references, but the Get Column Name.vi expects a cluster with connection and recordset references. 
    How do I resolve this conflict?
    Thank You.
    Dan

    I've never worked with the old version of the toolkit, so I don't know how it did things, but looking inside the SQL prep VI, it only generates a command, and the the column name VI wants a recordset. I'm not super familiar with all the internals of ADO, but my understanding is that is standard - you only have the columns after you execute the command and get the recordset back. What you can apparently do here is insert the Execute Prepared SQL VI in the middle and that will return what you need.
    I'm not sure why it worked before. Maybe the execute was hidden inside the prep VI or maybe you can get the column names out of the command object before execution. In general, I would recommend considering switching to the newer VIs.
    Try to take over the world!

  • Labview Database Connection Toolkit and decimal point

    Hi,
    on my system I use "," (comma) as decimal point.
    In Labview Options I unflagged "Use localized decimal point", and numeric controls and indicators use "." (dot) as decimal point.
    The problem is that Labview Database Connection Toolkit keeps returning floating point numbers as strings with comma as decimal point.
    Has anyone experienced this issue?
    Is this related to Labview or MySQL ODBC Connector (that I'm using to connect to a mySQL DB)?
    Thanks in advance for any help,
    Marco

    You have two or three places to look. First there is the DCT. Second, there's a couple layers there that could cause problems (the mySQL drivers and ADO) and then there's even the posibility that the issue could be in the DBMS itself.
    I would start by burrowing down through all the DCT layers and find the spot where the results are actually being read back fromt he database. If the resutls are read as variants and converted to LV datatypes, the problem is on the LV side. If the values are being read as strings and converted, the problem coiuld be on the other side.
    Mike...
    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

  • Problem installing Database connectivity toolkit

    My company manufactures in multiple plants around the world.  I have a problem in China and need to debug, and since the code is distributed in exe form, that is a problem.  My approach was to install a 30 day trial license of LV2010 SP1, planning on removing it when the debug is done.  To this point, all is fine.  The problem is that the app requires the Database Connectivity Toolkit.  I downloaded a copy and tried to install.  It says it can't install because LV2010 is not installed.  Is this because of the eval license?
    Solved!
    Go to Solution.

    Very likely, but the far better solution is to not burden yourself with the DCT. It is a major complication to a process that is essentially very simple. As an alternative check this thread.
    Mike...
    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

  • Oracle 64-bit and database connectivity toolkit

    Hello- I am attempting to connect to an Oracle database by interfacing the databse connectivity toolkit with the Oracle 10.2.0.3 64-bit that my customer uses. I am running LV13 32-bit on their machine. I am unable to connect to the database. Are there any known issues with this type of setup? 

    There's some discussion about an unsupported method to use the Database Connectivity Toolkit with 64-bit Windows here: http://forums.ni.com/t5/LabVIEW-Idea-Exchange/64-bit-Database-Toolkit/idi-p/2170088
    That may help with the problem you're seeing.  Something else to consider is the manual (page 1-2):
    The Microsoft ODBC driver for Oracle and the Microsoft OLE DB
    Provider for Oracle do not support BLOB (binary) data types. You
    cannot use Oracle with the Database Connectivity Toolkit for binary
    data with these drivers. Instead, use the OLE DB Provider and ODBC
    driver that Oracle provides. Refer to the Oracle Web site at
    www.oracle.com for more information about the OLE DB Provider
    and the ODBC driver that Oracle provides
    Jeff B.
    Applications Engineer
    National Instruments

  • I am using the database connectivity toolkit to retrieve data using a SQL query. The database has 1 million records, I am retrieving 4000 records from the database and the results are taking too long to get, is there any way of speeding it up?

    I am using the "fetch all" vi to do this, but it is retrieving one record at a time, (if you examine the block diagram) How can i retrieve all records in a faster more efficient manner?

    If this isn't faster than your previous method, then I think you found the wrong example. If you have the Database Connectivity Toolkit installed, then go to the LabVIEW Help menu and select "Find Examples". It defaults to searching for tasks, so open the "Communicating with External Applications" and "Databases" and open the Read All Data. The List Column names just gives the correct header to the resulting table and is a fast operation. That's not what you are supposed to be looking at ... it's the DBTools Select All Data subVI that is the important one. If you open it and look at its diagram, you'll see that it uses a completely different set of ADO methods and properties to retrieve all the data.

  • LabView 5.1 and Database Connectivity Toolkit Compatibility?

    I am looking to serve some data from a LabView 5.1 application up to an Oracle 8i database. I have looked at the current Database Connectivity Toolkit (which uses ADO technology), but am not sure if this will be compatible with LabView 5.1... is it? If not, what are my alternatives? Are older versions of this toolkit available?
    Thanks!

    Also, could someone touch on how forward compatible LabView applications are? In this scenario, I have the same 5.1 application which now requires some database connectivity. Since the SQL Toolkit is no longer supported, I would be left with upgrading LabView to 7.0 and using the Database Connectivity Toolkit. How well (in general) do earlier LabView applications convert to newer versions?
    Thanks again!

  • LabView database connectivity toolkit 1.0.1 compatibility with MS-ACCESS 2010 / Labview report generation toolkit for Office 1.1.3 compatibility with Office 2010

    In the very near future we will be forced to upgrade to Office 2010 Company wide and I am a little concerned with some of our older test platforms that have applications built in LabView 8.2.1.  These applications save data to MS-ACCESS 2000 databases using the LabView database connectivity toolkit 1.0.1.  Office 2003 is also loaded on these test platforms with all test reports generated using the LabView report generation toolkit for Office 1.1.3.
    I have not gotten my hands on a copy of Office 2010 yet to see if there will be any compatibility issues.  Does anyone have any experience in this area?

    The MS-Access part is fairly well isolated through the ADO interface LabVIEW uses. The only possible problems there IMHO are difficulties with possible Acess compatibilities itself such as an example, SQL statement you may have invoked directly through the ADO interface. Maybe you did use a depreciated command back then that has since been removed. As long as the only thing you do are simple INSERT and SELECT statements only, I would expect it to just keep working.
    The Report Generation interface is a different beast. Microsoft manages to change the Automation interface with every version of office in a way that strongly binding applications like LabVIEW break on. There is no good way around that except not changing those methods, but that is a cause that has been lost already. You will certainly have to verify the version dependant Report Generation API VIs to still work with Office 2010 and most likely you will have to make some changes to those VIs to make them work again with the modified ActiveX interface of Office 2010. Note, that I have no experience with porting report generation to Office 2010 but I have had some headaches from porting that between Office 97, 2000, 2003, and 2007.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Why does the Database Connectivity Toolkit not return my text fields?

    I'm running LV 8.2.1 and have the Database Connectivity Toolkit.
    My database is served by MS SQL Server 2005.  The table looks like this:
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">dbo_Test
    dbo_Test
    ID
    Text
    1
    abc
    2
    def
    3
    slkdfj
    4
    owierlkjsdf
    5
    soiwuers
    A snapshot of my vi block diagram is attached.
    A snapshot of my vi front panel is attached.
    Where is the text?
    Attachments:
    vi.jpg ‏75 KB
    vi-fp.jpg ‏53 KB

    kc64,
    I don't think I completely understand the problem.  Can you go into more details of exactly what is the issue you are experiencing?
    Mark
    LabVIEW R&D

  • MSI error while installing database connectivity toolkit

    Hi!
    We are facing problems while trying to install the database connectivity toolkit (comes as subpart of the enterprise connectivity toolkit).
    The behaviour is odd. Some months back it used to install OK. Now, it fails during installation. Pls see attached .zip file that shows image of the error messages.
    Pointers:
    1) The MSI error message has increasing numbering. First attempt to install gives mesages MSI4, next might be MSI8 and so on.
    2) It used to install perfectly until few months back
    3) We have tried to inatll it on freshly formatted computers having LV 6.1 and LV 7.1 runtimes.
    4) OS is Win2000 with SP4
    5) Few days ago it installed fine on a PC on which it had not installed for many months!
    6) We have tried for all the CDs/backups where we had this software. It still fails.
    7) All our other toolkits - Internet, SPC, Sound&Vibration, SMT continue to install flawlessly.
    We are unable to see any pattern or reason for this installation failure and would appreciate any help.
    Thanks,
    Gurdas
    Gurdas Singh
    PhD. Candidate | Civil Engineering | NCSU.edu
    Attachments:
    error messages.zip ‏76 KB

    Hello Kileen,
    1. If you’re installing from the CD, sometimes the installer has a hard time grabbing the files from the CD. Try copying the installation CD contents over to a temporary folder on the computer and run the installer again.
    > We tried this. Problem continues.
    2. Try changing permission settings in your registry:
    KB 38TFAUZH: Why Do I Get Error 1722 When Installing the Driver CD with Windows XP?
    > My system is Win2000 and I am unable to reach the settings mentioned in above link (which is for WinXP)
    3. Turn off all virus scanners. Rerun the installation.
    >We tried this. Problem continues.
    Hope to see a way out.
    - Gurdas
    Gurdas Singh
    PhD. Candidate | Civil Engineering | NCSU.edu

  • LabVIEW Database Connectivity Toolkit Parameterized Query Property Wildcard

    Hi,
    within my LabVIEW application I successfully implemented a SQL statement
    like
    SELECT *
    FROM table_name
    WHERE property 1 = 123
    AND property2 = "abc"
    with help of the Database Connectivity Toolkit. I first created a parameterized
    query, then set each parameter and afterwards executed this query.
    But now I want to use wildcards within this statement. Does anybody know
    how to use wildcards with both integer properties and string properties?
    Is this possible while using the normal parameterized query vi?
    Thanks in advance for your help.
    Regards
    Michael

    Hi Michael
    You can use "LIKE":
    SELECT * FROM table_name WHERE property 1 LIKE '12%'
    % represents multiple characters (e.g. entries with property 1 123 but also 1240 would be selected)
    _ represents one character
    Hope this helps.
    Thomas
    Message Edited by becktho on 09-05-2005 11:57 AM
    Using LV8.0
    Don't be afraid to rate a good answer...

  • Error 3005 using Database Connectivity Toolkit

    I'm using the LabVIEW Database Connectivity Toolkit, version 1.0.132 with LabVIEW 8.5. When it tries to create an ADODB.Recordset object in the Conn Execute.vi, the "Automation Open" function node throws error 3005, "The specified object can't be created".
    I've read somewhere that this may be related to an unregistered DLL or ActiveX component. Is there a way to find out what DLL this function uses? Any suggestions on other things to look for?
    Thanks,
    Mike

    Good Evening Mike,
    This Knowledge Base article seems to show a solution to a similar issue. Let me know the results and if you see any errors in the process.
    http://digital.ni.com/public.nsf/allkb/DE740209C3CC097D862571D2006DA0BD?OpenDocument
    Have a good day,
    Connor

  • 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!

Maybe you are looking for

  • Itunes 9.0.1 not responding

    I recently upgraded to itunes 9.0.1 on my mac. I've never had any problems with itunes before. But now, when I open it immediately tries to load genius, gets as far as "gathering information from your library" and then it freezes and the little "not

  • How can I delete the TemporaryTopic using JMS C API or VC++

    Hello everybody, how can I delete the TemporaryTopic after created TemporaryTopic using JMS C API "JmsSessionCreateTemporaryTopic"? I checked the document about JMS C API, but I couldn't find any API for delete TemporaryTopic, it's really not existin

  • How to manage a cancelled participant from a course

    We currently have LSO602 and have two reasons setup for cancelling a particpant (with fee/without fee).  After we cancel a participant via LSO_PV04 that record is gone.  There are times when we need to change it to w/fee or vice versa but am unsure o

  • How to determine the value of a Standard Value in a routing operation

    Dear Experts, Kindly guide me on how to detemine the value of my Standard Value in the  operation of my routing, or in the phase of my Master Recipe. I mean what determines the value that I enter for the Standard Values: Machine  and Labor in the pha

  • Copy and replace sequences

    Hi! I have a running sequence containing a main loop. Depending on input from user, a given subsequence (in separate file) is called and when it has executed we go back to the main file. From the main loop I have made it possible to run a batch file