Create SQL server data source programmatially

Hi,
I'd like to create a SQL server data source programmatically in LabVIEW. The SQL server version I used is 2005. Can anyone give some ideas? A code example will be most favorable.
Thanks,
Jane
Solved!
Go to Solution.

Dan put it well. All you need is a connection string and those are easy to build. There are even a couple website that do nothing but publish template connection strings for every DBMS on the planet.
The only point I would quibble over is about using the database connectivity toolkit. The DCT is an unnecessary complication that is ultimately counter productive because it limits your support options. When I get into the office in a few hours I will post a link to an alternative that actually simplifies the process and is free.
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

Similar Messages

  • Fields Cannot Display when create SQL Server Data Source

    Hi, All
    I want to create a data source from a sqlserver source system, but the fields of the sqlserver views could not display in the suggestion screen, and the fields of the data source could not be added either.
    How can I do it? Thanks.
    Best Regards,
    Jiande Ding

    Hello Jiande,
    Are you loading to BW using the DB connect option? If yes then the problem may be due to an authorization issue,
    please follow the steps given in the SAP note 512739 to setup and configure the connection correctly.
    Best Regards,
    Des

  • BI Trial version & SQL Server Data Source

    Hi All,
            I want to know Is it possible to create the SQL Server Data SOurce on the BI trial Version 7.0. Kindly let me know if I Want install or configure more. thanks for your support in advance.
    Thanks & regards,
    Shiva

    Hi Shiva:
       Please refer to SAP Note 512739 - "BW external DB Connect for MS SQLServer"
    In case you need general information of DB Connect for other Databases take a look at the paper below.
    "Transferring Data with DB Connect"
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2f0fea94-0501-0010-829c-d6b5c2ae5e40?quicklink=index&overridelayout=true
    Regards,
    Francisco Milán.
    Edited by: Francisco Milan on Jun 4, 2010 8:30 PM

  • Unable to refresh SQL Server data source through Data Management Gateway

    I just installed the version 1.1.5226.8 of Data Management Gateway and tried to refresh a simple query on a table connected to SQL Server, with no transformations in Power Query.
    This is the error I obtain:
    Errors in the high-level relational engine. The following exception occurred while the managed IDataReader interface was being used: transfer service job status is invalid.
    I am wondering whether my Power BI is still not updated to handle such a connection type, or there could be something else not working?
    I correctly created the data source in admin panel following instructions in Release Notes, and
    test Power Query connection is ok.
    Marco Russo http://www.sqlbi.com http://www.powerpivotworkshop.com http://sqlblog.com/blogs/marco_russo

    I made other tests and I found important information (maybe there is a bug, but read the following).
    The functions DateTime.LocalNow and DateTime.FixedLocalNow
    work correctly, generating these statements to SQL Server:
        convert(datetime2, '2014-05-03 06:37:52.1135108') as [LocalNow],
        convert(datetime2, '2014-05-03 06:37:52.0525061') as [FixedLocalNow],
    The functions DateTimeZone.FixedLocalNow, DateTimeZone.FixedUtcNow,
    DateTimeZone.LocalNow, and DateTimeZone.UtcNow
    stop the scheduled refresh with the error I mentioned
    in my previous messages, generating these statements to SQL Server:
        '2014-05-03 06:37:52.0525061+02:00' as [TZFixedLocalNow],
        '2014-05-03 04:37:52.0525061+00:00' as [TZFixedUtcNow],
        '2014-05-03 06:37:52.1135108+02:00' as [TZLocalNow],
        '2014-05-03 04:37:52.1135108+00:00' as [TZUtcNow]
    I solved the issue by placing the DateTimeZone calls after a Table.Buffer call, so query folding does not translate in SQL these functions. However, it seems like something to fix.
    Marco Russo http://www.sqlbi.com http://www.powerpivotworkshop.com http://sqlblog.com/blogs/marco_russo

  • No HS to remote SQL Server Data Source using NT Authentication?

    I am attemping to use Generic Connectivity to pull SQL Server 2000 data into 10g.
    We have the DSN configured, the oracle files modified properly (we have done similar setups before), and are able to successfully tnsping the SQL Server.
    However, after creating our database, when trying to execute a query against the remote source I receive the following error message:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC][Microsoft][ODBC SQL Server Driver][SQL
    Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. (SQL State: 28000;
    SQL Code: 18456)
    ORA-02063: preceding 2 lines from IDW_LINK
    As the message indicates that the error is coming from the SQL Server, I assume a connection is being established.
    I remember reading postings here from a couple years back about HS not being able to connect to remote SQL Servers when NT Authentication is required. Is this still the case?
    I did in fact provide to the link my "domain\username", "password" combination that has access to the sql server, but this is of course using NT Authentication.
    Any ideas on why HS would be sending "NT AUTHORITY\ANONYMOUS" to the sql server? Is this still the already existing problem of no NT Auth for remote data sources?

    Have you found a solution for this? Thanks.

  • 11g with a SQL Server Data Source

    I'm using 11.1.1.5 of OBIEE and trying to connect to a SQL Server 2008 data source. I've created the ODBC System DSN using the SQL Server driver. I've created a repository and am able to Import Metadata from the SQL Server database. I had to check "Require Fully Qualified Table Names" in the properties of the connection pool so now I can Update Rows from the tables and also View Data. So at this point it seems like everything is working fine. I created a very basic BM&M and then the Presentation layer.
    Now I go into Answers and try to create a new Analysis. I select the Subject Area and see all the columns. I just select one column and click Results and receive the following error:
    View Display Error
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 16001] ODBC error state: 01000 code: 5 message: [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).. [nQSError: 16001] ODBC error state: 08001 code: 17 message: [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.. (HY000)
    SQL Issued: SELECT 0 s_0, "PDSS UPS"."LOB"."description" s_1 FROM "PDSS UPS"
    Here is the SQL sent to the database:
    select distinct 0 as c1,
    D1.c1 as c2
    from
    (select distinct T4757."description" as c1
    from
    (select lob."description",
    lob."ID"
    from "SIKOMSReporting"."sikoms".LOB) T4757
    ) D1
    order by c2
    I've also tried creating a direct database request, but no matter what kind of SQL I put in it does not work via the connection pool.
    So everything seems to work from Admin, but not from Analysis.
    Does anyone have a clue about this? Is there something special I need to do when dealing with SQL Server?
    Thanks for any help you can provide.
    Brad

    Hi,
    I understand this is a microsoft issue. Request you to look at http://support.microsoft.com/kb/888228. As per Microsoft this error might come when any of the following conditions are true..
    SQL Server 2005 or SQL Server 2000 is installed on a cluster.
    You are connecting to a SQL Server named instance by using TCP/IP sockets.
    IPSec policy is enabled on the client domain.
    IPSec policy is not enabled on the server domain.
    To work around this problem, you have to hardcode the TCP port or the Named Pipe of the SQL Server named instance. To do this, use a connection string that is similar to one of the following:
    [oledb]
    ; Hardcoded TCP OLE DB initstring
    Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=clientID;Data Source=tcp:TcpIpAddress,port
    [oledb]
    ; Hardcoded Named Pipes OLE DB initstring
    Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=clientID;Data Source=np:\\ServerName\pipe\MSSQL$InstanceName\sql\query
    Hope this helps.
    Thank you,
    Dhar

  • Why do I get timeout when deploying SQL Server data source in Weblogic Admin Console?

    Hi all
    I'm attempting connectivity between WLS 10.3.6.0 and SQL Server 2008R. I've downloaded sqljdbc4.jar and added to the end of the Weblogic Classpath in commEnv.cmd. Then I set up a data source in Admin Console and pressed the Test Data Source button - success. But when I tick the box to deploy to AdminServer it hangs for ages and I get timeout exception.
    Any ideas?
    Many thanks
    James

    Make sure the web server settings between the QA and the Production servers are also compatible.
    I suspect your suspecion about permissions is the closest to the answer.  But this is a little out of my depth of expertise.
    Realize that ColdFusion default behavior is to NOT generate and actual swf FILE.  Rather what it does is generate the swf content in memory and directly deliver it to the client.  But if the web server is configured to look for an actual file system file you may have a clash going on

  • Microsoft Sql Server data source ???

    I'm trying to use the Microsoft Sql Server 2000 jdbc driver (without any success) in developing a small jsp app: specifically, I'm trying to set connection in web.xml as follows
    <context-param>
    <param-name>
    javax.servlet.jsp.jstl.sql.dataSource
    </param-name>
    <param-value>
    ??? What the heck is the value for Microsoft SQL Server 2000 ???
    </param-value>
    </context-param>
    (basically, this code is swiped from Ch. 12 of Bergsten's book, Java Server Pages - his example uses jdbc-odbc bridge driver).

    you need to Specify that the physical table object is a stored procedure. When you select this option, you type the stored procedure in the text box. Requests for this table will call the stored procedure.
    For stored procedures that are database specific, select the Use database specific SQL check box. At run time, if a stored procedure has been defined, the stored procedure will be executed.
    In the table properties, you need to create columns manually.

  • Application Server Data Source settings help needed (10.1.2.0.2)

    Hi,
    Can someone tell me what maximum values can I set in the following properties under Connection Attributes when I define a DataSource on
    Application Server. I have almost 25+ web application deployed on my 10.1.2.0.2 server that all uses one data source I have defined. Now the issue is the number of requests
    are very high and every now and then I get timeout error when trying to get the database connection. At one particular instance at peak time I may get over 200+ requests that
    do some databse connections etc. Following are my current settings. But need to increase some more but wondering what are the maximum values I can have. I have only one server 10.1.2.0.2
    Connection Retry Interval (seconds) = 5
    Max Connection Attempts = 3
    Cached Connection Inactivity Timeout (seconds) = 30
    Maximum Open Connections = 60
    Minimum Open Connections = 10
    Wait For Free Connection Timeout (seconds) = 15
    What other properties can I have to make use of datasource effectively.
    Thanks

    Here is the copy of my datasources.xml.
    <?xml version = '1.0' standalone = 'yes'?>
    <!DOCTYPE data-sources PUBLIC "Orion data-sources" "http://xmlns.oracle.com/ias/dtds/data-sources-9_04.dtd">
    <data-sources>
      <!--
                An example/default DataSource that uses
                Oracle JDBC-driver to create the connections.
                This tag creates all the needed kinds
                of data-sources, transactional, pooled and EJB-aware sources.
                The source generally used in application code is the "EJB"
                one - it provides transactional safety and connection
                pooling. Oracle thin driver could be used as well,
                like below.
                url="jdbc:oracle:thin:@host:port:sid"
           -->
      <data-source class="com.evermind.sql.DriverManagerDataSource" name="OracleDS"
                   location="jdbc/OracleCoreDS" xa-location="jdbc/xa/OracleXADS"
                   ejb-location="jdbc/OracleDS"
                   connection-driver="oracle.jdbc.driver.OracleDriver"
                   username="scott" password="tiger"
                   url="jdbc:oracle:thin:@//localhost:1521/oracle.regress.rdbms.dev.us.oracle.com"
                   inactivity-timeout="30"/>
      <!-- For SQL Server -->
      <data-source location="jdbc/TestDS"
                   class="com.microsoft.jdbcx.sqlserver.SQLServerDataSource"
                   password="pwd" xa-location="jdbc/TestDS"
                   ejb-location="jdbc/TestDS"
                   connection-driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
                   username="usr"
                   url="jdbc:microsoft:sqlserver://someloc99:1433/DevelopmentAp"
                   inactivity-timeout="30" name="jdbc/TestDS"
                   connection-retry-interval="5" max-connections="50"
                   max-connect-attempts="3">
        <description>jdbc/TestDS</description>
        <property name="DatabaseName" value="DevelopmentAp"/>
        <property name="serverName" value="someloc99"/>
      </data-source>
    </data-sources>I also tried changing max-connections="0" it did helped but still after sometime I get timeout while connecting to the database. Don't know if it's with SQL Server that is not letting that many concurrent connections/sessions or something on the Application Server side.
    Thanks
    Message was edited by:
    WhiteSox
    Message was edited by:
    WhiteSox

  • Create a ReportingServices data source and upload to a data connection library

    I have installed reporting services 2012 in SharePoint 2013 integrated mode. I need to create a report data source and upload it to a data connection library using
    C#.
    As I know it uses the ReportingServices2010 class but I cannot explore a reporting server url.
    There is a ReportingServices2010.asmx file in the 15 hive though.
    Also it works fine when I manually set the data source.

    Hi,
    The following materials would be helpful:
    Inserting Data Connections into a SharePoint Library
    https://social.technet.microsoft.com/Forums/en-US/df79dce5-fd92-4506-af4e-11127cb0d655/inserting-data-connections-into-a-sharepoint-library?forum=sharepointdevelopment
    Programmatically exporting reports from SQL 2012 Reporting Services
    http://stackoverflow.com/questions/12199995/programmatically-exporting-reports-from-sql-2012-reporting-services
    Report Server Web Service Endpoints
    http://msdn.microsoft.com/en-us/library/ms155398(v=sql.110).aspx
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Error creating a new Data Source for Oracle connection

    I'm trying to create a new data source connection to our
    Oracle 10gR2 server using ColdFusion Administrator 6.1 Standard on
    a Windows 2003 server.
    I created a System DSN ODBC connection for Oracle. I can use
    the ODBC connection when connecting an Access db to Oracle but when
    I try to use it w/ ColdFusion Admin it generates the following
    error message:
    Connection verification failed for data source: sitest2
    []java.sql.SQLException: [Macromedia][SequeLink JDBC
    Driver][ODBC Socket]internal error:
    Driver's SQLAllocHandle on SQL_HANDLE_ENV failed
    The root cause was that: java.sql.SQLException:
    [Macromedia][SequeLink JDBC Driver][ODBC Socket]internal error:
    Driver's SQLAllocHandle on SQL_HANDLE_ENV failed
    Any help or recommendations would be greatly appreciated.
    Tina

    The schema/user is system and the password is alpha-numeric, upper/lower case, no special char ...
    As a workaround I was able to add the password to the entry in the datasources.xml file and restarted BI Pub.
    The JDBC is working ... I can test the connection successfully ... just wont save the entry
    Edited by: tread on Oct 17, 2011 11:55 AM

  • Error when creating a new Data Source

    All, This is on BI Publisher 11g.
    When I create a new data source and supply password and then click "Apply" button on top right corner, i get following error
    Error 500--Internal Server Error
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    10.5.1 500 Internal Server Error
    The server encountered an unexpected condition which prevented it from fulfilling the request.
    what am i doing wrong?
    Thank you for reading this post.
    Thanks,
    R

    The schema/user is system and the password is alpha-numeric, upper/lower case, no special char ...
    As a workaround I was able to add the password to the entry in the datasources.xml file and restarted BI Pub.
    The JDBC is working ... I can test the connection successfully ... just wont save the entry
    Edited by: tread on Oct 17, 2011 11:55 AM

  • SSIS: To run a SSIS package outside of SQL Server Data Tools you must install SCR - DP1 Connections of Integration Services or higher

    We have SSIS installed on a machine that is not part of a cluster but it is accessible by the cluster.
    Our job we have running on the cluster is failing with the following error:
    Error: 2014-01-31 09:14:37.52     Code: 0xC000F427     Source: SCR - DP1 Connections  
    Description: To run a SSIS package outside of SQL Server Data Tools you must install SCR - DP1 Connections of Integration Services or higher.  End Error
    Any advice or information on how to resolve this would be great.
    Many Thanks.

    Hi NessaBella,
    Integration Services service is not a cluster-aware service, and does not support failover from one cluster node to another. Therefore, in a clustered environment, Integration Services should be installed and started as a stand-alone service on each node
    in the cluster.
    Based on the error message, it seems that SSIS is not installed on the cluster node on which the job was running. Although SSIS is installed on a machine that is not part of the cluster and can be accessed by each cluster node, the SSIS service installed
    on a remote server cannot be used a cluster node. So, please install the shared feature SQL Server Integration Services on each cluster node. Besides, if certain packages need to run in 32-bit mode in certain jobs and the SQL Server installed is 64-bit version,
    you also need to install BIDS/SSDT on the cluster node to get the 32-bit runtime of SSIS.
    References:
    Integration Services (SSIS) in a Cluster
    Loading and Running a Remote Package Programmatically
    Regards,
    Mike Yin
    TechNet Community Support

  • System Center 2012 R2 install: SQL server Data file and log file

    This might be a dumb question, but I can't find the answer anywhere.  
    I'm installing a new instance of  System Center 2012 R2 on a new server, I'm stuck on the SQL Server data file section.  Everytime I put in a path, it says that tne path does not exist.  I'm I supposed to be creating some sort of SQL Server
    data file and log file before this installation, I didn't get this prompt when installing System Center 2012 SP1 or hen I upgraded from System Center 2012 SP1 to System Center 2012 R2
    My SQL is on a different server
    Thank you in advanced

    Have you reviewed the setup.log?
    On a side note, why would you put the database file on the same drive as the OS? That defeats the whole purpose of having a remote SQL Server. Why use a remote SQL Server in the first place.
    Jason | http://blog.configmgrftw.com

  • Association rule in SQL Server Data Mining

    I have been working on a problem on association rules in SQL Server Data Tools (Visual Studio 2008) for quite a while but have not yet been able to figure out the solution.
    The problem is: I have a table named Sales_history in my SQL database. This table has following columns: CustomerID, ItemID, Month (from May2012 to April 2013), QtyShipped. I am looking to find association between Items and i want to provide recommendation
    to the Customer (In this case CustomerID) based on their purchases.
    Note: there are around 630 customers and about 34000 products in my table. 
    My approach:
    I marked History_Table as both Key and nested. And in the Key, i checked CustomerID as input and Key whereas in nested, i checked ItemId as Key, input and Predict. 
    When i run the model, i get a solution but i am not sure if i am configuring it right. Also i am not sure how i can write prediction join query to generate Item recommendations . I am really struggling with
    this problem, eagerly waiting for the reply. Thank you.

    Hi Tatyana,
    Thank you so much for your reply. I have now been able to create the data mining model using association rule and by writing a DMX query, i am able to generate the item recommendations to be given to customers for items they have purchased. However, i have
    noticed one thing that in the DMX query, it gives the same item recommendation for any item i put inside the query. 
    Also, if i put any item in the DMX query from the generated list of recommended items, the output of that query also shows the item that is inputted inside the query.
    Here is the query, that i am writing to generate item recommendations
    SELECT predictassociation (CrossSellingModelV3.[Ztb Customer Item v3],INCLUDE_STATISTICS,5)
    FROM CrossSellingModelV3
    NATURAL PREDICTION JOIN 
    (SELECT
    (SELECT '17IS56126' as m )
    AS Ms)
    AS t
    What can be the possible reason behind this? Is this something related to the kind of data i have? In my data, there are 632 distinct customers and 34000 distinct products. 
    If i execute this query in management studio.
    select customer_CD, COUNT(Item_CD) from ztb_Sales_History
    group by customer_CD
    order by 2 desc
    the output shows that  there are some customers who have bought just 1 item and also there are customers who have bought 2400 items. i mean the range is very high. 

Maybe you are looking for

  • Firefox is adding a .part extension to my downloads and they won't open. Why?? Fix???

    When I download a file, Firefox does 2 things: changes the file name to gobbledy-gook of letters and numbers, AND, adds a .part extension -- therefore the files won't open. This is a NEW problem. If I manually remove the .part extension in the downlo

  • A space is sometimes added before hyphenation when creating a pdf

    In using Acrobat 9.5 I have found that sometimes when a pdf is created from Quark 8, the new pdf has a space right before the soft hyphen at the end of a line of text that was not there in the original file. This space does not get inserted before al

  • How does Lockbox matching work?

    Hi All, We use FEBA to upload our locboxes. I am trying to understand how SAP matches a payment with an open item. I understand that it find the customer with the MICR information, but how does it find the invoice to clear? I looked at the search str

  • Problem while doing the Cheque print through f-58

    Dear Team, I am encountering an issue while doing the Transaction through F-58 System is generating the cheeque print with coma instead of decimals i.e instead of 1,00,000.00 its comming as 1.000.000,00. Please advice how to correct this. Thanks for

  • Ios 6.0.2 shortcuts disabled on iPhone 5

    Ever since upgrading to iOS 6.0.2 my shortcuts on my iPhone 5 are not working. I have tried to delete them and reset them with no luck.