Is SQL Connection Function or API Availble in SQL Toolkit 2.2 (Urgent) ?

Hello,
I have build an application using LabWindows 2010 and SQL Toolkit 2.2. Is there any function or dll or api availble so that i do not want to make connection in control panel ODBC ?.
Regards
Umer
Solved!
Go to Solution.

Hello,
The manual for this toolkit might be a good reference for you: LabWindows/CVI SQL Toolkit Help
There is a function called DBConnect, which allows you to connect to a database programmatically. The Help says:
"Purpose: Opens a to a database system to allow execution of SQL statements. Calling DBConnect is equivalent to calling DBNewConnection and then DBOpenConnection"
There's also a page in the help titled Connecting to a Database, which tells you more information about how to use DBConnect:
"Use DBConnect to connect to a data source. The only parameter is a connection string, which must contain the data source or provider name and any other attributes the database requires. DBConnect returns a handle to the database connection that other functions in the toolkit use. Call DBDisconnect to close the database connection, passing in the database connection handle from DBConnect. The following code is a simplified version of the code found in connect.prj.
int hdbc = 0; /* Handle to database connection. */
int rescode; /*Result code. */
/* Connect to CVI_Samples data source. */
hdbc = DBConnect ("DSN=CVI Samples");
if (hdbc <= 0) goto Error;
/* Disconnect from database. */
resCode = DBDisconnect (hdbc);
if (resCode != DB_SUCCESS) goto Error;"
Hope this helps.
Taylor B.
National Instruments

Similar Messages

  • Is it possible to disable Export connections functionality (Connections view) in SQL developer?

    Hi,
    because of some security reasons, there is a need to disable export connections functionality in SQL developer.
    Is it possible to do this somehow?
    Many thanks,
    Dejan

    Not that I know of.
    Even if we did, they are still stored in a file that most of your users would be able to access.
    You can however disable the ability to save passwords.
    And exporting connections now do not include passwords by default, although you can include them if you supply an additional password.

  • Help, Cannot connect to ODBC database using SQL Toolkit!

    Hello All,
    I am toying around with the SQL Toolkit evaluation (2.2 + the patch) and I am having difficulty.
    I ran the example program "connect" and it seems to work fine.
    However, I try to write my own program and I keep getting the same message:
    "Function DBConnect: (return value == -10 [0xFFFFFFF6]).
    Native error code - 2147467259 0x80004005
    The message differs from time to time, but the return value is constant.
    I am using both Microsoft SQL Server 2012 and MySQL.
    For MySQL I have installed the latest ODBC connector, 5.3.4. Inside the Control Panel/Data Sources(ODBC), I have a DSN named test_mysql in both User DSN and System DSN.
    I ran a test on the connection and the test passes. I am not sure if I should use the ansi or unicode driver, I have tried both with the same success.
    I am not sure I had configured the SQL Server connection properly, and will attempt that again.
    My CVI Code is simple enough:
    hdbc = DBConnect ("DSN=test_mysql"); 
    Every time I get a -10 from DBConnect. Either I have something configured wrong or I am missing something.
    Does anyone have any suggestions?
    Veni Vidi Duci
    Solved!
    Go to Solution.

    Update 2:
    After getting off the phone with Tech Support the problem has been identified!
    LabWindows SQL toolkit requires 32 bit DNS. My PC is a 64 bit, so my DNS manager defaulted to 64 bit.
    I needed to use the 32 bit DNS manager when working with the toolkit.
    Once I created my DNS connections using the 32-bit version of the ODBC Datga Source manager, everything worked fine.
    See this tech note:
    http://digital.ni.com/public.nsf/allkb/E7984C0DA0F0E65086257694005B4CB7
    Veni Vidi Duci

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

  • No interface driver connected - Function not performed

    Can some one please help me. I am a new user of Oracle, and I am trying to logon using SQl plus 8.0. (system/manager @ODBC:POLITE. But I get an error message saying "No interface driver connected - Function not performed" Where on the machine is the interface driver usually stored. I also have SQL plus 8.0 on the same machine, and it works when I log on using scott/tiger.
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Uche Ubani ([email protected]):
    Can some one please help me. I am a new user of Oracle, and I am trying to logon using SQl plus 8.0. (system/manager @ODBC:POLITE. But I get an error message saying "No interface driver connected - Function not performed" Where on the machine is the interface driver usually stored. I also have SQL plus 3.3 on the same machine, and it works when I log on using scott/tiger.<HR></BLOCKQUOTE>
    null

  • SQL toolkit Win7 connection problem

    I'm using CVI 2013 and the SQL toolkit (2.2) tto connect to a mySQL database.  I can connect fine using my development computer, but not with the target one.  Both computers are running 64-bit Windows 7 Professional (SP1).  I was initially using the 64-bit ODBC drivers (mysql-connector-odbc-5.3.2-win64.msi) on both machines.  After I had trouble I found a Knowledge Base article that indicated I should probably be using the 32-bit one instead.  So I removed the drivers from the target and installed the 32-bit ones using odbcad32.exe found in Windows/SysWOW64.  No change.
    I'm using the browser2.prj sample project included with the SQL toolkit (by default at: C:\Users\Public\Documents\National Instruments\CVI\samples\sql\apps) to test the functionality of the SQL toolkit.  I build a distribution kit including the Shared Run-Time Engine on the development machine and install that on the target.  I have traced the problem to the call for DBSources() - it returns a -100 (which, handily, is not amoung the list of database error codes).
    On both machines the ODBC drivers appear to be working.  I can get to the database using Control Panel->Administrative Tools->Data Sources (ODBC).  Selecting the database under either User DSN or System DSN and then clicking Configure will open the MySQL Connector/ODBC Data Source Connection window.  Clicking Test in that window will connect to the database.  
    So the problem seems to lie in the way that CVI connects to the database.  I'm clueless at this time, so any suggestions would be greatly appreciated.
    Solved!
    Go to Solution.

    Sorry if this is a stupid question:
    Have you followed the instructions in Help->Library Reference->SQL Toolkit Library->SQL Language Reference->Distributing an SQL Toolkit Executable or DLL ?
    Or is this an error you are getting despite following those instructions?

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

  • I just need a little help to connect with eCommerce API. Could anyone please give a JAVA sample code

    Hi All,
    I am looking for a sample code to just to connect with Business Catalyst eCommerce API. My aim is to simply retirieve the list of the products and update them.
    It would be really helpful, if anyone please provide me a sample code in JAVA, just to connect with the API.
    Thanks
    Ani

    public static void main(String[] args) throws RemoteException, MalformedURLException {
                        String endpoint = "https://CC.sys.com/CatalystWebS1ervice/CatalystEcommerceWebservice.asmx?WSDL"; // endpoint url can be found under Site Settings -> API -> click on eCommerce and copy the URL on the browser here.
                        CatalystEcommerceWebserviceSoapProxy sq = new CatalystEcommerceWebserviceSoapProxy(endpoint);
                        Products[] prod = new Products[2];
                        prod = sq.product_ListRetrieve(Username , Password, SiteID, CatalogueID);
                        System.out.println(prod[1].getDescription());

  • Missing cbclient.h - Remote Desktop Connection Broker client API

    Hi,
    I am searching for cbclient.h, which is referenced in the "Remote Desktop Connection Broker client API" documentation:
    msdn.microsoft.com/en-us/library/hh769100/
    However, I could not find cbclient.h in any Windows SDK (I searched in the Windows 7, Windows 8, Windows 8.1 SDKs).
    I found a question on these forums from 2012 asking for the same thing, but there is no public answer:
    http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/9b51f493-2b32-4feb-a62b-bc74aa163460/remote-desktop-connection-broker-client-api-headers?forum=windowssdk
    Where is cbclient.h, and why is it missing if it is referenced by the public documentation?
    Thank you!

    Did you ever get a response?

  • The connect function in the socket class has problems

    when i call this function connect(SocketAddress endpoint, int timeout)
    the timeout variable doesnt wait for the specific time that i tell it
    example
    connect(endpoint, 10000);
    this call should wait for this amount of time but it doesnt wait that amount
    any body has a answer ???

    yes that is exactly what I am saying
    I specify 10 sec, as 10000 milli sec's in the connect function but I get an exception almost imediately when i run my java program...
    run this code
    import java.net.*;
    public class Test
    public static void main(String [] args)
    { Socket s = null;
    int port = 2000;
    try
    s = new Socket();
    InetSocketAddress i = new InetSocketAddress("localhost",port);
    //this next line should wait 10 sec's then throw and exception
    //but it throws and exception upon running the this code
    s.connect(i,10000);
    catch(Exception e){ System.out.println(e.toString()); }
    }//main
    }//Test
    I have also tried setting the setSoTimeout(10000) in the Socket class but
    still with no success...
    I dont know why this doesnt wait 10 sec's then through an exception on it
    and when i try it with a java server it connects instantly...
    any help anyone???

  • Connecting to Space API Over SSL

    Does anyone know which jdeveloper keystore is used for trusted certs when connecting to the Spaces API? I've added my trusted CAs to every keystore that I can find but I still can't connect.
    I'm getting the all too familiar "Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target" each time.

    It's simple, I'm trying to connect to spaces API over https(https://host/webcenter/SpacesWebService) instead of http(http://host/webcenter/SpacesWebService), and when I do, I'm getting the "javax.net.ssl.SSLHandshakeException" error. So where to I need to put the trustedcacert?

  • Connecting functions in the expression editor

    Hi everybody,
    what's wrong with this expression:
    If ( stringindexof( Local.string , Local.search_string ) == 0 , true , false)
    I get an "Invalid variable in expression If" error.
    Isn't it possible to connect functions together?
    or the more spectific question: How is it possible to get true or false if a string contains another one?
    Regards,
    Matthias

    Hi
    In the Conditional Action Block, you can map input1 to
    stringindexof( Local.string , Local.search_string ).
    If it will retun 0, means false. If it will retun 1, means true.

  • Connect to Linkedin API with Power Query

    Hello
    Is there a way to create Power Query queries that connect to Linkedin API permanently (like Power Query does with Facebook)? I know it is possible to access Linkedin API the way Shish Shridar did it, but it is pretty limited and thus frustrating (see his
    article entitled "Analyzing LinkedIn Data using PowerBI" on his blog).
    I am sorry to ask without more technical details, but I am pretty new to Power query. I guess it has something to do with OAuth2 authentification not being implemented in Power query...
    I would be delighted If someone would be kind enough to provide me some insight on this issue !

    Thanks for your answer.
    What if I create an app to get the required access token etc? I know an excel add-on could be considered as a Twitter app, and thus be able to connect to the website's API (I'm thinking about Analytics for Twitter 2013 for instance) - is there any way to
    do the same with Linkedin?
    I guess this is far beyond my capacities for now, but any insight would be very much appreciated !
    [EDIT]
    I did a little more research... I created a Linkedin app and then followed the steps described on the official documentation to enable it to make authenticated API calls to LinkedIn using OAuth 2.0 (I cannot use hyperlink for now, but here is the full link
    to the official doc : https://developer.linkedin.com/docs/oauth2)
    Maybe some VBA would be able to request an authorization code following this type of URL : https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=MYCLEINTID&state=STATE&redirect_uri=MYREDIRECTURL
    - Then the user will be presented with LinkedIn's authentication dialog box. Is VBA able to fill in this login form?
    -If it is, then it should get the code displayed in the redirection URL, which looks like :
    MYREDIRECTURL?code=THECODETOGETWITHVBA&state=STATE
    -If VBA could, then it just has to go to this new URL : https://www.linkedin.com/uas/oauth2/accessToken?grant_type=authorization_code&code=THECODETOGETWITHVBA&redirect_uri=MYREDIRECTURL&client_id=MYCLIENTID&state=STATE&client_secret=MYCLIENTSECRET
    -At this point, the last URL returns the access token, which could then be stored somewhere in Excel and thus used in Power Query (pretty easy to do using a headers like this:
    Headers=[#"Authorization"="Bearer Access Token"]])
    Hope someone will see this and tell me if it is feasible and likely to succeed.

  • Mysql database connection with Labwindows/CVI 2009 sql toolkit

    Dear experienced users,
    I am using the following software/hardware:
    Windows 7/ Mysql database 5.6.15 64-bit with MySql ODBC 5.2 Ansi driver installed
    Labwindows/CVI 2009 with sql toolkit
    The user DSN of ODBC Data source administrator have been confiugred to one of mysql database. The test MYSQL Connector/ODBC is succesful.
    The Labwindows/CVI build setting is configure to debug64 after trying debug (32)
    The source code is from the example readtab.c with changes to the dsn I am testing
        hdbc = DBConnect ("DSN=dvd_collection");   
    The error message I have is confusing me.
    (it is in the attachd png)
    I thought it was due to the 64 bit mysql database. That's why I tried the 64 bit build from Labwiondws/CVI. I alsow tried Labview DB tools open connect.vi. It shows me the same error.
    Any suggestion is appreciated.
    Thanks,
    Jimmy
    Attachments:
    Capture.PNG ‏24 KB

    Jimmy
    I always use connection strings of the form "DSN=datasourcename;UID=database_user_id; PWD=database_user_password".
    Where:
    datasourcename = The name of the connection defined in the ODBC connection.
    database_user_id = One of the user identities created by the database administrator. Obviously the administrator will lock down the permissions appropriate to the task in hand.
    database_user_password = The password that identifies database_user_id, again set by the database administrator.
    Note that while it is obviously desireable to lock the permissions down as far as possible on the MySQL server, the more you do so, the slower the database will run, because of the way mySQL searches the permissions tables.

  • What is the equivalent Database Connectivity VI of the SQL Toolkit 'Set SQL Parameter to Null' VI ?

    I am using the database connectivity (ADO based) tool and I want to be able to insert a null values.
    I have included a simple VI that demonstrates how this works with SQL toolkit .
    Null values are very useful and occur frequently in dealing with data. I wish that LabVIEW handled them much better - (e.g. there is not datatype in LabVIEW corresponding to a Null value).

    The VI was not attached but I'm going to answer with what I have here.
    - Currently, the Database Toolset converts NULLs to the default value for LabVIEW data types (ie, False for Boolean, empty strings, zero for numbers, empty arrays, etc). In the user manual there is an example that shows database records containing NULL values being first converted to a string, empty strings (the NULLs) are then converted to NaNs instead of the usual zero value. This method requires you to know what data types each field contains and that they know what to look for and how to convert the data.
    You can go to this following link to suggest that a null datatype be implemented:
    https://sine.ni.com/apps/we/nicc.call_me?p_country=&p_lang_id=US&p_form_id=58
    -Also you cannot leave par
    ameters values empty because there is a big difference between executing an SQL statement and doing a Parameterized Query, especially when looking at the low-level ADO layer.When doing Parameterized Queries, you MUST specify all parameter values - leaving them empty results in ADO trapping errors rather than using a default value.
    Regards,
    Cyril Bouton
    Applications Engineer
    National Instruments
    Cyril Bouton
    Active LabVIEW Developper

Maybe you are looking for

  • Create multiple folders with one click on documents tab in BP in SAP CRM

    Hi Experts, I have a requirement to create multiple folders by clicking on a button in Documents tab in BP transaction in CRM. In standard process by clicking on create folder button we create folders. we want to create multiple folders with one sing

  • How do I transfer contacts from iCloud to my phone?

    The Apple guy at the store moved all my contacts to iCloud and restarted my phone. Now all my contacts are gone from the phone but are still in iCloud. How do I get them back on the phone?

  • My hp external display is not found

    Have been using HP w19b as an external monitor for almost a year.  I have a 2009 (late) 27" imac and am running 10.8.2.  My external monitor went to sleep and never woke up on Nov 11, 2012.  I don't think there were any new updates on this date.  Had

  • CREATION OF MANUAL CHECK

    im getting error like "DOCUMENT AML2010 200001IS NOT A PAYMENT DOCUMENT" I have done in TCODE: FCH5 Even i have done purchase invoice posting(F-43), AND Out going payment with clearing(F-53) Can you plzz help me Thanks in advance Edited by: venkat_mo

  • Some artists missing from the "following" list

    I noticed that there are some artists that I follow who do not appear in the "following" list of my profile. This is a problem when I forget the name of some of my followed artists and I don't find them no longer on the list, loosing this way the pos