Write a uniqueIden​tifier in SQL DB

Hi, I have a SQL database with several tables. The tables are related each other by an ID. The type of the ID is UNIQUEIDENTIFIER. I should read the ID of the first table and write the same ID into the second Table. Ando so on for each table.
I am using LV Database Toolkit and I have already done the reading of the ID: 5240A2A6-9453-E011-80CD-406186EDCDB2. In LV the ID is a variant, but when I try to write into the 2nd table It writes a different value: 02802108-0000-0100-0006-008400010001.
What type of data is the UNIQUEIDENTIFIER in LV? Is it a Variant?
Thanks for the support.
Solved!
Go to Solution.

Hi,
I've attached here a comment found on ni.com:
I've been looking into ways for you to write to the unique identifier field without getting errors and I have a few possibilities. 
1) We talked about reading all records in the Unique Identifier filed and searching for the one you want to write to make sure it is not present. You mentioned that this would be too slow. One possibility to increase this speed would be to retrieve the data from the database and use Labview to search for the new record. 
Alternatively you could keep a file on your PC that contains all of the unique identifiers written to the database. This would allow you to simply open a file and check for the unique identifier, which should be faster than using the database. 
2) If you simply want to increment the previous unique identifier you could read unique identifier of the last record in the database, then parse the returned value and increment it yourself in Labview. If this convention is always used it would prevent non-unique identifiers. 
3) You mentioned an SQL command to auto generate a unique identifier. If you use the DB Tools Execute Query VI you can execute any SQL statement. You may be able to build the appropriate SQL query to auto generate the column for you. 
Alex

Similar Messages

  • Write a connectionstring for a SQL Server Express 2014 version

    How do you write a connectionstring for a SQL Server Express 2014 version?
    http://msdn.microsoft.com/en-us/evalcenter/dn434042.aspx

    Hi,
    Which application you are using to connect to SQL Server ?
    Below links have different examples
    http://msdn.microsoft.com/en-us/library/ms228094%28v=vs.85%29.aspx
    http://msdn.microsoft.com/en-us/library/jj653752%28v=vs.110%29.aspx
    https://www.connectionstrings.com/sql-server-2012/
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • Write to syslog from pl/sql

    Hello Gurus !
    I would like to write to syslog from pl/sql without 3rd party tools.
    Do you have an idea how to achieve this ?
    Thank you for your answer !
    Ros

    External procedure interface can be used. I have not implemented the openlog() and closelog() calls (got a weird problem with that). The syslog() call works fine on its own though.
    o/s: Kubuntu 11.10
    Oracle XE 10.2.0.1
    // call:
    //    void syslog(int priority, const char *format, ...);
    // library:
    //    libc
    SQL> create or replace library libc as
      2          '/lib/i386-linux-gnu/libc.so.6'
      3  /
    Library created.
    SQL>
    SQL> create or replace procedure WriteSysLog( priority binary_integer, message varchar2 ) is
      2          external
      3          library libc
      4          name "syslog"
      5          language C
      6          calling standard C
      7          parameters(
      8                  priority int,
      9                  message string
    10          );
    11  /
    Procedure created.
    SQL>
    SQL> declare
      2          LOG_INFO        constant binary_integer := 6;
      3  begin
      4          WriteSysLog( LOG_INFO, 'All your syslogs messages are belong to us.' );
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SQL> And in +/var/log/syslog+ :
    Feb  2 00:00:00 hostname extprocPLSExtProc: All your syslogs messages are belong to us.
    ..Note you need a properly configured external procedure (EXTPROC) service in the local Listener, and a valid TNS alias for it in the local tnsnames.ora file. (local, as in local on the Oracle server where the PL/SQL code is executed)

  • SSIS write custom logging information to sql 2012 table

    I have a Package that I want to put logging information in to a SQL table.
    I can do this with a script task but each time the package runs it will open a SQL connection write the log information and then close this connection it will do this 10 times every time the package executes and i could 50 of the packages running at the
    same time so i am looking for a better way to do this.
    My thought was to create a in memory table object at the start of the package and then insert the log records in to it and at the end do a bulk insert at the end of the package.
    My problem is I don't know if this can be done and if it can how would I create the in memory table insert the records and then bulk load it to the SQL server table.

    While I do not see any justification for what you want, "My thought was to create a in memory table object at the start of the package and then insert the log records in to it and at the end do a bulk insert at the end of the package" is doable
    by creating an ADO table, adding records to it and then writing to a destination:
    https://support.microsoft.com/en-us/kb/195082?wa=wsignin1.0 has all the needed code it seems. Just wrap into the Script Task.
    Arthur
    MyBlog
    Twitter

  • Ho to Write Query for dynamic in sql server for IN operation.

    hi ,
    we was write store procedure dynamically for IN operation,when i select 4 values it was update only 3 item last selected values are not update .if select more then 5 it will showing the below error
    ALTER PROCEDURE [dbo].[UpdateEMPdetails]
    @NID varchar(50),
    @EID nvarchar(max),
    @RT bit,
    @Ackd bit,
    @VerifiedBy varchar(80),
    @TableName varchar(100)
    as
    declare @SqlQueary nvarchar(max)
    set @SqlQueary = 'update '+ @TableName +' set RT='+CAST(@Rt AS CHAR(1))+',Ackd='+CAST(@Ackd AS CHAR(1)) +',Verified_By='''+@VerifiedBy+''' where NID='''+@NID+''' and ' +
    ' EID in('''+ @EID+''''+')'
    print @SqlQueary
    exec UpdateEMPdetails 'EMP14-302',"000008922','00000010242','000008923','00000010242','0000008922','00000010242','0000008922','00000010242",1,1,'xyz','EMPTB'
    when i run this one we will getting the below error
    Msg 103, Level 15, State 4, Line 1
    The identifier that starts with '0000008922','00000010242','00000008922','00000010242','0000008922','000000010242','00' is too long. Maximum length is 128.

    Hi PS_L,
    This is the forum for SharePoint .For your question please use the related Forum, following link is SQL
    Server Forum:
    http://social.technet.microsoft.com/Forums/sqlserver/en-us/home?category=sqlserver 
    This question, I think if you change "000008922','00000010242','000008923','00000010242','0000008922','00000010242','0000008922','00000010242"
    to  N'''000008922'',''00000010242'',''000008923'',''00000010242'',''0000008922'',''00000010242'',''0000008922'',''00000010242''' will solve it. 
    Qiao Wei
    TechNet Community Support

  • Error 1406 : could not write value to key \software sql server installation

    I've problems installins SQL Server with management studio
    I tried different steps starting from 
    Changing permissions of the local user while running both registry editor and installer with adminstrator
    i've checked most similar posts here in the forums and followed their steps but no progress , 
    this is the error message
    i couldn't resolve it till now , i'm in this problem for 4 days till now tried different suggestions but no progress , i'm in a hurry , so please help me
    Regards,
    Omar

    Overall summary:
      Final result:                  Failed: see details below
      Exit code (Decimal):           -2068052610
      Start time:                    2014-08-05 23:21:36
      End time:                      2014-08-05 23:29:12
      Requested action:              Install
    Setup completed with required actions for features.
    Troubleshooting information for those features:
      Next step for Adv_SSMS:        Use the following information to resolve the error, and then try the setup process again.
      Next step for SSMS:            Use the following information to resolve the error, and then try the setup process again.
    Machine Properties:
      Machine name:                  OMAR
      Machine processor count:       8
      OS version:                    Windows 8
      OS service pack:               
      OS region:                     United States
      OS language:                   English (United States)
      OS architecture:               x64
      Process architecture:          64 Bit
      OS clustered:                  No
    Product features discovered:
      Product              Instance             Instance ID                    Feature                
                     Language             Edition              Version         Clustered  Configured
      SQL Server 2014                                                          Client Tools Connectivity  
                 1033                                      12.0.2000.8     No         Yes    
      SQL Server 2014                                                          Client Tools Backwards Compatibility
        1033                                      12.0.2000.8     No         Yes       
      SQL Server 2014                                                          Client Tools SDK      
                      1033                                      12.0.2000.8     No        
    Yes       
    Package properties:
      Description:                   Microsoft SQL Server 2014 
      ProductName:                   SQL Server 2014
      Type:                          RTM
      Version:                       12
      SPLevel:                       0
      Installation location:         E:\Sources\SQL Server with management studio\SQLManagementStudio_x64_ENU\x64\setup\
      Installation edition:          Express
    Product Update Status:
      None discovered.
    User Input Settings:
      ACTION:                        Install
      ADDCURRENTUSERASSQLADMIN:      true
      AGTSVCACCOUNT:                 <empty>
      AGTSVCPASSWORD:                <empty>
      AGTSVCSTARTUPTYPE:             Manual
      ASBACKUPDIR:                   Backup
      ASCOLLATION:                   Latin1_General_CI_AS
      ASCONFIGDIR:                   Config
      ASDATADIR:                     Data
      ASLOGDIR:                      Log
      ASPROVIDERMSOLAP:              1
      ASSERVERMODE:                  MULTIDIMENSIONAL
      ASSVCACCOUNT:                  <empty>
      ASSVCPASSWORD:                 <empty>
      ASSVCSTARTUPTYPE:              Automatic
      ASSYSADMINACCOUNTS:            <empty>
      ASTEMPDIR:                     Temp
      BROWSERSVCSTARTUPTYPE:         Disabled
      CLTCTLRNAME:                   <empty>
      CLTRESULTDIR:                  <empty>
      CLTSTARTUPTYPE:                0
      CLTSVCACCOUNT:                 <empty>
      CLTSVCPASSWORD:                <empty>
      CLTWORKINGDIR:                 <empty>
      COMMFABRICENCRYPTION:          0
      COMMFABRICNETWORKLEVEL:        0
      COMMFABRICPORT:                0
      CONFIGURATIONFILE:             
      CTLRSTARTUPTYPE:               0
      CTLRSVCACCOUNT:                <empty>
      CTLRSVCPASSWORD:               <empty>
      CTLRUSERS:                     <empty>
      ENABLERANU:                    false
      ENU:                           true
      ERRORREPORTING:                false
      FEATURES:                      SSMS, ADV_SSMS
      FILESTREAMLEVEL:               0
      FILESTREAMSHARENAME:           <empty>
      FTSVCACCOUNT:                  <empty>
      FTSVCPASSWORD:                 <empty>
      HELP:                          false
      IACCEPTSQLSERVERLICENSETERMS:  true
      INDICATEPROGRESS:              false
      INSTALLSHAREDDIR:              C:\Program Files\Microsoft SQL Server\
      INSTALLSHAREDWOWDIR:           C:\Program Files (x86)\Microsoft SQL Server\
      INSTALLSQLDATADIR:             <empty>
      INSTANCEDIR:                   C:\Program Files\Microsoft SQL Server\
      INSTANCEID:                    <empty>
      INSTANCENAME:                  <empty>
      ISSVCACCOUNT:                  NT AUTHORITY\Network Service
      ISSVCPASSWORD:                 <empty>
      ISSVCSTARTUPTYPE:              Automatic
      MATRIXCMBRICKCOMMPORT:         0
      MATRIXCMSERVERNAME:            <empty>
      MATRIXNAME:                    <empty>
      NPENABLED:                     0
      PID:                           *****
      QUIET:                         false
      QUIETSIMPLE:                   false
      ROLE:                          AllFeatures_WithDefaults
      RSINSTALLMODE:                 DefaultNativeMode
      RSSHPINSTALLMODE:              DefaultSharePointMode
      RSSVCACCOUNT:                  <empty>
      RSSVCPASSWORD:                 <empty>
      RSSVCSTARTUPTYPE:              Automatic
      SAPWD:                         <empty>
      SECURITYMODE:                  <empty>
      SQLBACKUPDIR:                  <empty>
      SQLCOLLATION:                  SQL_Latin1_General_CP1_CI_AS
      SQLSVCACCOUNT:                 <empty>
      SQLSVCPASSWORD:                <empty>
      SQLSVCSTARTUPTYPE:             Automatic
      SQLSYSADMINACCOUNTS:           <empty>
      SQLTEMPDBDIR:                  <empty>
      SQLTEMPDBLOGDIR:               <empty>
      SQLUSERDBDIR:                  <empty>
      SQLUSERDBLOGDIR:               <empty>
      SQMREPORTING:                  false
      TCPENABLED:                    0
      UIMODE:                        AutoAdvance
      UpdateEnabled:                 true
      UpdateSource:                  MU
      USEMICROSOFTUPDATE:            false
      X86:                           false
      Configuration file:            C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20140805_232135\ConfigurationFile.ini
    Detailed results:
      Feature:                       Management Tools - Complete
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred for a dependency of the feature causing the setup process for the feature to fail.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Component name:                SQL Server Management Services
      Component error code:          1406
      Component log file:            C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20140805_232135\sql_ssms_Cpu64_1.log
      Error description:             Could not write value  to key \SOFTWARE.   Verify that you have sufficient access to that key, or contact your support personnel.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=sql_ssms.msi%40WriteRegistryValues%401406
      Feature:                       Management Tools - Basic
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred during the setup process of the feature.
      Next Step:                     Use the following information to resolve the error, and then try the setup process again.
      Component name:                SQL Server Management Services
      Component error code:          1406
      Component log file:            C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20140805_232135\sql_ssms_Cpu64_1.log
      Error description:             Could not write value  to key \SOFTWARE.   Verify that you have sufficient access to that key, or contact your support personnel.
      Error help link:               http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=sql_ssms.msi%40WriteRegistryValues%401406
    Rules with failures:
    Global rules:
    Scenario specific rules:
    Rules report file:               C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20140805_232135\SystemConfigurationCheck_Report.htm

  • Write in table type pl sql

    Hi,
    i want to read/write from/to a table type in pl sql procedure.
    I have this:
    in the declaration of package I have:
    ......more code more code...
    type type1 is record ( field1 varchar2(4000), field2 varchar2(4000), filed3 number);
    rec type1;
    type table_example is table of rec%type index by binary_integer;
    ...more code more code...
    In the body of my package i have a procedure in which i want to write/read into/from table_ex (table_ex is a variable of type table_example;)
    How could i do?
    Could you all post some code of example (in particular i want to update fields of table_ex)?
    Please help.
    Thanks

    Hi,
    I think you need some package for manage simple task againts your table. It's called package API. I created a package API for example for you (this package it's only a little example):
    Example table:
    -- Create table
    create table TEST
      AD_TEST NUMBER(10) not null,
      NM_TEST VARCHAR2(30) not null
    -- Create/Recreate primary, unique and foreign key constraints
    alter table TEST
      add constraint PK_TEST_1 primary key (AD_TEST)
      using index;Sequence...
    -- Create sequence
    create sequence SEQ_TEST
    minvalue 1
    maxvalue 99999999999999999999
    start with 1
    increment by 1
    cache 20;Package API for table test
    CREATE OR REPLACE PACKAGE pack_api_test IS
       TYPE t_ref_cur IS REF CURSOR;
       PROCEDURE proc_ins_test(p_ad_test OUT test.ad_test%TYPE,
                               p_nm_test IN test.nm_test%TYPE,
                               p_return  OUT NUMBER,
                               p_message OUT VARCHAR2);
       PROCEDURE proc_upd_test(p_ad_test IN test.ad_test%TYPE,
                               p_nm_test IN test.nm_test%TYPE,
                               p_return  OUT NUMBER,
                               p_message OUT VARCHAR2);
       PROCEDURE proc_sch_test(p_rec_test OUT test%ROWTYPE,
                               p_ad_test  IN test.ad_test%TYPE,
                               p_return   OUT NUMBER,
                               p_message  OUT VARCHAR2);
       PROCEDURE proc_lis_test(p_ad_test IN test.ad_test%TYPE,
                               p_nm_test IN test.nm_test%TYPE,
                               p_query   OUT t_ref_cur,
                               p_return  OUT NUMBER,
                               p_message OUT VARCHAR2);
    END pack_api_test;
    CREATE OR REPLACE PACKAGE BODY pack_api_test IS
       -- Package constants
       P_RETURN_SUCCESFUL  CONSTANT NUMBER(4) := 0;
       P_RETURN_ERROR      CONSTANT NUMBER(4) := 1;
       P_MESSAGE_SUCCESFUL CONSTANT VARCHAR2(100) := 'Succesful';
       PROCEDURE proc_ins_test(p_ad_test OUT test.ad_test%TYPE,
                               p_nm_test IN test.nm_test%TYPE,
                               p_return  OUT NUMBER,
                               p_message OUT VARCHAR2) IS
       BEGIN
          p_return  := P_RETURN_SUCCESFUL;
          p_message := P_MESSAGE_SUCCESFUL;
          INSERT INTO test a
             (a.ad_test,
              a.nm_test)
          VALUES
             (seq_test.NEXTVAL,
              p_nm_test)
          RETURNING ad_test INTO p_ad_test;
       EXCEPTION
          WHEN DUP_VAL_ON_INDEX THEN
             p_return  := P_RETURN_ERROR;
             p_message := 'Record already exists';
          WHEN OTHERS THEN
             p_return  := P_RETURN_ERROR;
             p_message := SQLERRM;
       END proc_ins_test;
       PROCEDURE proc_upd_test(p_ad_test IN test.ad_test%TYPE,
                               p_nm_test IN test.nm_test%TYPE,
                               p_return  OUT NUMBER,
                               p_message OUT VARCHAR2) IS
          generic_error EXCEPTION;
          data_not_updated_error EXCEPTION;
          v_rec_test test%ROWTYPE;
       BEGIN
          p_return  := P_RETURN_SUCCESFUL;
          p_message := P_MESSAGE_SUCCESFUL;
          proc_sch_test(p_rec_test => v_rec_test,
                        p_ad_test  => p_ad_test,
                        p_return   => p_return,
                        p_message  => p_message);
          IF p_return <> 0 THEN
             RAISE generic_error;
          END IF;
          UPDATE test a SET a.nm_test = p_nm_test WHERE ad_test = p_ad_test;
          IF (SQL%ROWCOUNT = 0) THEN
             RAISE data_not_updated_error;
          END IF;
       EXCEPTION
          WHEN generic_error THEN
             NULL;
          WHEN data_not_updated_error THEN
             p_return  := P_RETURN_ERROR;
             p_message := 'Data not updated';
          WHEN OTHERS THEN
             p_return  := P_RETURN_ERROR;
             p_message := SQLERRM;
       END proc_upd_test;
       PROCEDURE proc_sch_test(p_rec_test OUT test%ROWTYPE,
                               p_ad_test  IN test.ad_test%TYPE,
                               p_return   OUT NUMBER,
                               p_message  OUT VARCHAR2) IS
       BEGIN
          p_return  := P_RETURN_SUCCESFUL;
          p_message := P_MESSAGE_SUCCESFUL;
          SELECT * INTO p_rec_test FROM test a WHERE a.ad_test = p_ad_test;
       EXCEPTION
          WHEN NO_DATA_FOUND THEN
             p_return  := P_RETURN_ERROR;
             p_message := 'Record doesn''t exist';
          WHEN OTHERS THEN
             p_return  := P_RETURN_ERROR;
             p_message := SQLERRM;
       END proc_sch_test;
       PROCEDURE proc_lis_test(p_ad_test IN test.ad_test%TYPE,
                               p_nm_test IN test.nm_test%TYPE,
                               p_query   OUT t_ref_cur,
                               p_return  OUT NUMBER,
                               p_message OUT VARCHAR2) IS
          v_ds_sql VARCHAR2(4000);
       BEGIN
          p_return  := P_RETURN_SUCCESFUL;
          p_message := P_MESSAGE_SUCCESFUL;
          v_ds_sql := v_ds_sql || 'SELECT * ';
          v_ds_sql := v_ds_sql || 'FROM test ';
          v_ds_sql := v_ds_sql || 'WHERE 1 = 1 ';
          IF (p_ad_test IS NOT NULL) THEN
             v_ds_sql := v_ds_sql || 'AND ad_test = ' || p_ad_test || ' ';
          END IF;
          IF (p_nm_test IS NOT NULL) THEN
             v_ds_sql := v_ds_sql || 'AND nm_test like ''' || p_nm_test || ''' ';
          END IF;
          OPEN p_query FOR v_ds_sql;
       EXCEPTION
          WHEN OTHERS THEN
             p_return  := P_RETURN_ERROR;
             p_message := SQLERRM;
       END proc_lis_test;
    END pack_api_test;
    /Regards,

  • How to write the output of an SQL query to a text file?

    I am using Oracle 11g and SQL plus.
    I have a large table called rating.
    Whenever I do
    SQL> select * from rating;
    The output goes much beyond what the SQL Plus screen can show. I want to therefore store the output of this query into a text file.
    How can this be done? Please help. Thanks.

    SQL> SPOOL results.txt
    SQL> select * from rating;
    SQL> SPOOL OFF

  • How to write a store procedure under SQL Server 2008

    Hi Folks,
    Kindly help me step by step how to create a simple store procedure with help of sql server 2008 r2 for Crystal report.
    I know how to work by using Universe but not SQL Server. Kindly help me how to hard code by using sql.
    Thanks in adv.
    Reddy

    For the actual syntax for programming the stored proc, you'll need to work with someone (or a website) who knows T-SQL.
    The cursor that gets returned from the stored proc must be an "in out" parameter for the stored proc.  For SQL Server I usually define a record type that includes the fields that will be returned and then return a set of records of that type.  Again, check with someone who is familiar with T-SQL for more information about how to do this.
    -Dell

  • How can i write jstl with jsp in sql:update ,when it give sqlException"

    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql_rt"%>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
    <sql:query var="login" dataSource="jdbc:mysql://localhost/user,com.mysql.jdbc.Driver,user,parul">
    SELECT * FROM login;
    </sql:query>
    <html>
    <head>
    <title>login information</title>
    </head>
    <body>
    <h1>login information</h1>
    <table border="1">
    <tr>
    <th>id</th>
    <th>login</th>
    <th colspan="2">password</th>
    </tr>
    <c:forEach var="round" items="${login.rows}" >
    <tr>
    <td>${round.id}</td>
    <td>${round.login}</td>
    <td colspan="2">${round.password}</td>
    </tr>
    </c:forEach><tr>
    <form name="round-input" action="round_process.jsp" method="POST">
    <td><input name="id" type="text" size="20" /></td>
    <td><input name="login" type="text" size="20" /></td>
    <td><input name="password" type="text" size="20" /></td>
    <td><input type="submit" value="Update" /></td>
    </form>
    </tr>
    </table>
    </body>
    </html>
    it pass the parameter in round_process.jsp
    <!--
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql_rt" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
    -->
    <sql:query var="login" dataSource="jdbc:mysql://localhost/user,com.mysql.jdbc.Driver,user,parul">
    SELECT * FROM login WHERE id=?
    <sql:param value="${param.id}"/>
    </sql:query>
    <sql:update>
    INSERT INTO login(id,login,password)VALUES(?,?,?)
    <sql:param value="${param.id}"/>
    <sql:param value="${param.login}"/>
    <sql:param value="${param.password}"/>
    </sql:update>
    <c:redirect url="round-input.jsp"/>
    when i execute the second .jsp page it will show an exception and error that is
    javax.servlet.ServletException: Unable to get connection, DataSource invalid: "null"
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
         org.apache.jsp.round_005fprocess_jsp._jspService(round_005fprocess_jsp.java:87)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "null"
         org.apache.taglibs.standard.tag.common.sql.UpdateTagSupport.getConnection(UpdateTagSupport.java:234)
         org.apache.taglibs.standard.tag.common.sql.UpdateTagSupport.doStartTag(UpdateTagSupport.java:115)
         org.apache.jsp.round_005fprocess_jsp._jspx_meth_sql_update_0(round_005fprocess_jsp.java:168)
         org.apache.jsp.round_005fprocess_jsp._jspService(round_005fprocess_jsp.java:71)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.

    Your problem is that you need to have a
    <sql:setDataSource
           var="myDataSource"
           dataSource="jdbc:mysql://localhost/user,com.mysql.jdbc.Driver,user,parul"
    />and your sql:query would now be
    <sql:query var="login" dataSource="${myDataSource}">
    SELECT * FROM login;
    </sql:query>You can use whatever name you want for the var in the setDataSource as long as it matches the dataSource in the query.

  • I would like write Oracle OCA for PL/SQL developer.

    Dear Experts,
    I would like to take Oracle OCA test for PL/SQL Developer path. what is the exam code and syllabus.
    Please guide me...
    Thank you & Regards
    Raju P

    R@ju wrote:
    Dear Experts,
    I would like to take Oracle OCA test for PL/SQL Developer path. what is the exam code and syllabus.
    Please guide me...
    Thank you & Regards
    Raju PVisit http://www.oracle.com/education/certification and a little browsing should find the information. I suggest 1z0-051 + 1z0-144 but there are alternatives.

  • How can i write Recursive Program in PL/SQL

    Hi, i am new to Pl/sql Programming can any one suggest me with an example.
    I need to implenet this logic in one of my Procedure functionality

    I have to find whether my Userkey belongs to some groups and in that Gr
    oups there can be many more subgroup which means my user is indirectly
    associated with all Groups and Sub Groups so i need to check with the levels
    till the time there is no SubGroups associated with my the Main Group G1 are
    there.Seems you just need the hierarchy query:
    SQL> SELECT groups.grp, level
      2  from
      3  (
      4  select 'Group' grp, null parent from dual
      5  union all
      6  select 'Subgroup 1', 'Group' from dual
      7  union all
      8  select 'Subgroup 2', 'Group' from dual
      9  union all
    10  select 'SubSub 1', 'Subgroup 2' from dual
    11  union all
    12  select 'SubSub 2', 'Subgroup 1' from dual
    13  ) groups
    14  start with grp = (select grp from
    15  (
    16   select 'Key1' key, 'Subgroup 1' grp from dual
    17   union all
    18   select 'Key2' key, 'Subgroup 2' grp from dual
    19  ) userkeys
    20  where key = 'Key1'
    21  )
    22  connect by prior groups.grp = groups.parent
    23  /
    GRP             LEVEL
    Subgroup 1          1
    SubSub 2            2Rgds.

  • How do i write a if statement in SQL?

    say,
    I have a table has 3 fields: item, invoice, cost
    In report, if invoice='123', show cost1, if ivoice='456', show cost2
    thanks.

      select decode(invoice,'123','cost2',
                            '456','cost1',
                                   others)
        from ...or
      select case when invoice = '123' then 'cost1'
                  when invoice = '456' then 'cost2'
                  else 'others'
             end
        from ...

  • Can I write webservice client in pl/sql?

    Hello,
    I wonder whether there is a way to call an external webservice within a function or procedure and use the response for different queries, can someone send me an example of what is the best way to do it?
    Regards,
    Eyal Bitansky

    Sure you can. We've used Oracle's built-in Java capabilities to callout to a Web service on an another server, using http. Depending on what you want, this could be very simple or vastly complex.
    (Also) depending on the Oracle database version you're using, you might have to load several Java libraries in the database. This is well documented inside OTN on the Web services section (I believe).
    Good luck.

  • Reading data from Sybase SQL Anywhere 7 database to write into a SQL Server database

    Hi,
    I need to import data from a Sybase SQL Anywhere vers. 7 database. This RDBMS was used more 10-12 years ago. I want to write Sybase data into a SQL Server 2008 R2-2012 database. For testing purposes I'm using SQL Server 2005.
    After that I've installed Sybase SQL Anywhere vers. 7 I can use the Adaptive Anywhere 7.0 ODBC. I'd like to use SSIS to import Sybase data, but I cannot create an OLE DB connection in a right manner while I can create and ODBC connection manager and so I
    can use an Execute SQL task (and not a data flow task, unfortunately!).
    Well, after using this Execute SQL task to read fe a table with thousands of data rows how can I write the entire data collection on a SQL Server table?
    Thanks

    Below link may be helpful,
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/184c937a-2b2c-4e59-b4d7-e8d3d1b476b3/net-provider-for-oledb-sybase-adaptive-server-anywhere-ole-db-provider-90-cant-be-located-when?forum=sqlintegrationservices
    http://supun-biz.blogspot.in/2010/11/extracting-data-from-sybase-sql.html
    Regards, RSingh

Maybe you are looking for

  • Changing iTunes Library to Another Pre-existing Library

    *First some background-* My wife and I each have our own Apple laptops, and we repurposed her old HP PC as an iTunes server to house copies of all our media and sync with the Apple TV. Our laptops each have only our own music collections while the PC

  • How to develop GUI/Form builder tool...?

    Hi, I am newbie to SWINGS. i've been a middle tier and backend developer in java. In one of my project i need to develop one GUI builder tool. Basically it contains menubar, palette to contain few components such as rectangle, table etc, and a space

  • Flash Pie Chart display bugs

    Hello guys! Sorry to disturb you but I'm experiencing strange problems in my application! A while ago all my flash charts worked like a charm. Today I discovered, that 3 charts are not displayed anymore. Have tried various things to check the reason.

  • Cisco Prime Infrastructure and VMWare Question

        We currently do not have any VMWare configurations. Do we need to have an existing VM server to deploy the virtual appliance. I have been told it comes with an instance that I can deploy. We have a server that is new and beefy with plenty of RAM

  • Progs + Apps randomly close/crash - why?

    Hello! I have a reccurring problem with my eMac. Programs such as Photoshop CS2 and more recently Itunes & IPhoto close without warning. The vanishing app is then replaced with a 'this program has unexpectadly closed, submit error report?' window. I