How to call SQL statements in InDesign CS6?

Hi,
     My plug-in needs to interact with the database, and update the database content, how should I do, can I call SQL statements in InDesign CS6?
     Thanku very much.

The same way you'd call them from any C++ program. You don't mention which platform, and that probably makes a difference.
I'm accessing an SQL database in InDesign CS6 on Windows. I'm using the ODBC interface to SQL database that Windows provides, via the nanodbc wrapper. So I'm linking to odbc32.lib and odbccp32.lib, and including the nanodbc.cpp and nanodbc.h files. (See http://lexicalunit.github.io/nanodbc/ )
Paul.

Similar Messages

  • How to find sql statement with Unix process pid

    Hi
    how to find sql statement with Unix process pid
    is there any view to find that.
    please if so let me know
    Thanks in advance

    this is how I am doing this:
    oracle 7352340 7459066 0 07:47:10 - 0:00 oracleJDERED (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
    oracle 7459066 5386396 2 07:47:10 pts/1 0:01 sqlplus
    select sid,serial# from v$session where process='7459066';
    SID SERIAL#
    2178 6067
    select sql_text
    from
    v$sqlarea a,
    v$session b
    where a.hash_value = b.sql_hash_value
    and b.sid = 2178
    ;

  • How to call SQL Script in DBMS_SCHEDULER

    How to call SQL Scripts in DBMS_SCHEDULER?
    Things I got working
    1) Successfully created and tested a PL/SQL that was created under SQL Workshop->SQL Scripts (I named it 'TEST'). I was able to run this no problem.
    2) Successfully created a DBMS_SCHEDULER that runs every minutes. (See below)
    begin
      dbms_scheduler.create_job(
        job_name => 'myjob',
        job_type => 'plsql_block',
        job_action => 'null;',
        start_date => '19-JUL-11 03.10.00 PM', /* Remember to use the DB time, not your local time if not specifying a timezone */
        repeat_interval => 'freq=minutely',
        enabled => true);
    end;The problem i am having is to make the PL/SQL script (named 'TEST') runs every minute. Its probably very easy to do that but i dont seems like finding any examples online.
    I tried replacing the job_action attribute to " job_action => 'begin TEST; END;', " However, that did not work.
    I am stuck here for couple hours already, any clues would be great :)
    Thanks in advance
    John
    Application Express 4.1.0.00.32
    Edited by: John Lau on Aug 14, 2012 12:47 PM
    Edited by: John Lau on Aug 14, 2012 12:48 PM

    The PL/SQL is pretty long, I would like to call it from a different location rather then putting the whole coding as part of the argument. Sounds like I should be looking into procedure package in database?
    I will do some more research on procedure package, how to create one and how to call from it.
    Thanks
    John

  • How to Capture  sql statement

    we have 1 server oracle and many clients.
    when client sends sql statement to server.How to Capture sql statement to analysis berfore it sent to server and execution.
    Edited by: 955185 on Aug 27, 2012 4:22 AM

    955185 wrote:
    yes. how to do this?Check these link all of them talking about Already executed sql in database by Users , but i don't know if what you ask is possible since they already connect to database
    If you attending to analysis sql read the below links and start your analysis,
    Last executed sql
    http://www.databasejournal.com/features/oracle/article.php/3373701/Watching-SQL-Execute-on-Oracle---Part-I.htm
    http://stackoverflow.com/questions/55899/how-to-see-the-actual-oracle-sql-statement-that-is-being-executed

  • Create a link in a table calls sql statement

    Hello,
    I'm very new to htmldb but need to complete a project within a tight timeline. I created a sql report in a region. On each row, I have an on/off link, which used to trigger a sql statement. It turns a flag on and off in a table. Key needs to be passed with the link to be used in sql. How do I passed the key in the link and how can I call the sql statement? Where can I put the sql statement? Can someone give me some tips?
    Your help is greatly appreciated!
    Jun

    if you take a look at the "Understanding URL Syntax" section in chapter 6 of our User Guide, you'll see that you can set item values in html db via the URL by passing name/value pairs through the url. to see it in action, use our "Report with links to form on a table (2 Pages)" wizard to generate a form and a report on some table of yours. when you run that report page and click an edit link on it, you'll see how it passes its values to the form page using our URL syntax. in your case you'd want to create an item like MY_PROD_KEY_ITEM and set its value via your link. you'd then run your pl/sql block referring to the value of that item. when doing so, you'd probably want to use the bind variable syntax that's also explained in chapter 6, "Referencing Session State".
    --raj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Call sql statement from JComboBox component

    Hi there,
    I Have created a frame to populate two JComboBoxs, I'm populating the first one from a database using SQL, this datable is showing the category to below every report.
    anybody know how can I select from my first JComboBox a record a call a second SQL statement acutomatic, the idea is populate me second JCombox with data like my first one, remember the first one is a header

    With a JComboBox you have to be careful that you don't run a query when just the cursor is moved up or down the list. If you want the listener to fire just when enter is pressed or the mouse is clicked, then do this:
    //This stops events being fired when the cursor is used on the list
    comboBox.putClientProperty("JComboBox.isTableCellEditor", Boolean.TRUE);You should also attach an event listener like this one:
    comboBox.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent evt) {
                            executeSomeQuery(comboBox.getSelectedItem().toString());               }
              });Or something similar to above, have a play around with it and it should work how you want it to.
    Message was edited by:
    JStudent911

  • How to execute sql statement under bat file?

    I want to execute following statement
    C:\>sqlplus /nolog
    SQL> conn scott/tiger
    SQL> select * from tab;
    I know I can realize it as following test.bat and testdb.sql file
    test.bat is follows:
    sqlplus /nolog @testdb.sql
    testdb.sql is follows:
    conn scott/tiger
    select * from tab;
    Now I don't want to use sql file,I only want to use bat file,like follows:
    test.bat is follows:
    sqlplus /nolog
    conn scott/tiger
    select * from tab;
    when I run test.bat,I find only sqlplus /nolog statement execute,the other statements don't execute.
    1)I want to know whether there is a method to execute sql statement only by bat file without a sql file? How to realize it?
    2)If I call sql file,how to hide passord of user? Because I don't want to other persons know scott password,if I use conn scott/tiger in testdb.sql,other person can see testdb.sql and know the password. Is there a good method to avoid?
    Thanks!

    I'm running *NIX, but works the same on Windows
    bcm@bcm-laptop:~$ cat here.sh
    sqlplus dbadmin/admindb << EOF
    select count(*) from user_objects;
    exit
    EOF
    bcm@bcm-laptop:~$ sh here.sh
    SQL*Plus: Release 11.2.0.1.0 Production on Mon May 17 18:14:09 2010
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL>
      COUNT(*)
          9
    SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    bcm@bcm-laptop:~$ Edited by: sb92075 on May 17, 2010 6:15 PM

  • Calling SQL statements from Shell scripts

    Hi,
    I want to call external package procedures, declare some variables & do some oracle validations in the shell script.
    How SQL environment is set in shell script & is this one time process or I have to write few statements before every SQL statement.
    Please explain with an example.
    Thanks..

    is this one time process Yes. Example :
    $ cat script.sh
    export ORACLE_HOME=/home/oracle/base/OraHome10
    export ORACLE_SID=db102
    export PATH=$ORACLE_HOME/bin:$PATH
    sqlplus -s / as sysdba << EOF
    select to_char(sysdate,'dd/mm/yyyy hh24:mi:ss') date_time
    from dual;
    exit
    EOF
    sqlplus -s / as sysdba << EOF
    col global_name for a60
    select * from global_name;
    exit
    EOF
    $ ./script.sh
    DATE_TIME
    27/02/2008 11:11:27
    GLOBAL_NAME
    DB102
    $

  • How to call SQL script from PL/SQL block

    Hi All,
    I have a pl/sql block from which i need to call a *.sql script file.
    Please tell me that how can i do this?
    Thanks and Regards.

    > Though just for knowledge sake, would you please tell if there is a way
    to call a sql script from a pl/sql block.
    This question stems usually from a confusion about client-server and which is which in Oracle.
    SQL*Plus is a client. PL/SQL is a server side language. SQL is a server side language.
    When entering either one of these two languages in SQL*Plus (or TOAD, SQL-Developer, etc), the content is shipped to an Oracle server process, is parsed there, and is executed there.
    The Oracle server process servicing the client can accept a single SQL statement or PL/SQL block at a time.
    It cannot accept a block of SQL statements delimited with a semicolon. That is a client concept where the client will read each delimited statement and send that, one after the other (in synchronous call mode) to the Oracle server for execution.
    The Oracle server does not have a "script parser". It understands SQL. It understands PL/SQL. And that is what it expects from the client.
    Whether the client supports the SET command, the HOST command, SPOOL command, ability to run scripts, and so... have no bearing on what the server itself is capable of doing. The server does not care what feature set the client has. It is tasked with servicing the client via SQL and PL/SQL.
    It is not tasked to support or emulate client features like running SQL scripts.
    Nor confuse PL/SQL with the very limited command set of SQL*Plus. The two has nothing in common. And just as PL/SQL cannot understand C# or Delphi commands, it cannot understand SQL*Plus commands.

  • How to call UPDATE statements in the timesten

    Hi i want to know how can i call UPDATE statements from the c program
    as of now i am using SQLPREPARE and SQLEXECUTE for the same.
    but i get the following error.
    Is there any special way of calling UPDATE and INSERT routines.
    As my select statements are doing fine, but i m getting error with UPDATE and INSERT. I am getting the following error
    Can Anyone guide me ?
    ========================================================
    [TimesTen][TimesTen 6.0.4 ODBC Driver][TimesTen]TT5102: Cannot load backend library 'libttorD.a' for Cache Connect. OS error message 'Symbol resolution failed
    for /disk3/users/timesten/TimesTen/TT_EUDEV10G/lib/libttorD.a because:
    Symbol ora_ldap_unbind (number 224) is not exported from dependent
    module /disk1/users/oracle/product/9.2.0/lib/libclntsh.a[shr.o].
    Symbol ora_ldap_memfree (number 225) is not exported from dependent
    module /disk1/users/oracle/product/9.2.0/lib/libclntsh.a[shr.o].
    Symbol
    *** ODBC Error/Warning = S1000, Additional Error/Warning = 5102
    *** (Note: error message was truncated.
    Disconnecting from the data source...
    ==========================================================

    Hi,
    It looks like you are using either :
    1. A READONLY CACHE GROUP with PassThrough > 0.
    or
    2. An SWT CACHE GROUP
    Is that correct? This looks like a mismatch between the TT Oracle library and the version of the Oracle client that you have installed (or maybe a bad setting of LD_LIBRARY_PATH).
    What is the exact version of TimesTen you are using (output of ttVersion command)?
    What is the exact version of Oracle?
    Thanks, Chris

  • How to find SQL Statement fired using SYS.AUD$ - Database Auditing

    Dear Friends
    I am having Oracle 9i Database and have configured it with database auditing option by setting the following parameter in init.ora file
    AUDIT_TRAIL = "DB"
    I want to audit SELECT, INSERT , UPDATE and DELETE operations on PRACTICE.EMP table for which I did :
    1) Logged in as SYS
    2) SQL> AUDIT SELECT, INSERT, UPDATE, DELETE
    ON PRACTICE.EMP
    BY ACCESS
    WHENEVER SUCCESSFUL;
    Audit Succedded
    Now how should I find out the SQL statement that does the insert, update or delete operation on the EMP table using SYS.AUD$ table
    Thanks

    Hi,
    It's contents can be viewed directly or via the following views:
    * DBA_AUDIT_EXISTS
    * DBA_AUDIT_OBJECT
    * DBA_AUDIT_SESSION
    * DBA_AUDIT_STATEMENT
    * DBA_AUDIT_TRAIL
    * DBA_OBJ_AUDIT_OPTS
    * DBA_PRIV_AUDIT_OPTS
    * DBA_STMT_AUDIT_OPTS
    The audit trail contains a lot of data, but the following are most likely to be of interest:
    * Username : Oracle Username.
    * Terminal : Machine that the user performed the action from.
    * Timestamp : When the action occured.
    * Object Owner : The owner of the object that was interacted with.
    * Object Name : The name of the object that was interacted with.
    * Action Name : The action that occured against the object. (INSERT, UPDATE, DELETE, SELECT, EXECUTE)
    So, take a look at action_name column from DBA_AUDIT_TRAIL view.
    Cheers
    Legatti

  • How to find SQL statement = Database Auditing

    Dear All
    I have configured Database Auditing on Oracle 9i Enterprise Edition Server
    parameter init.ora file:
    AUDIT_TRAIL = "DB"
    I want to audit INSERT,UPDATE, DELETE STATEMENT on PRACTICE.EMP table
    for which i did :
    1) Logged in as SYS
    SQL> AUDIT INSERT,UPDATE,DELETE
    ON PRACTICE.EMP
    BY ACCESS
    WHENEVER SUCCESSFUL
    Audit Succedded
    2) Now I have to check the SQL statement that did insert update or delete operation using SYS.AUD$
    3) There is SQLTEXT field , datatype is CLOB.
    How should I check the SQL Statements that were fired on PRACTICE.EMP table
    Kindly help

    SQL> show user
    USER is "SYS"
    SQL> alter system set audit_trail = db,extended scope=spfile;
    alter system set audit_trail = db,extended scope=spfile
    ERROR at line 1:
    ORA-32001: write to SPFILE requested but no SPFILE specified at startup
    I have init.ora but no spifle so should I create SPFILE based on INIT.ORA and then give the command ?
    As of now I am using V$SQL view to find all the commands executed on my database.
    I found one good book "Oracle Security" OREILY PUBLICATION in which Auditing Database is discussed in good details.
    Thank you so much for all your efforts

  • How to Retrieve SQL Statements in RDF Reports

    I need to retrieve the SQL statements from my reports without having to call each of them up in Reports Builder. The reports are in binary (RDF format). Does anyone know of a way to do this?

    Hello,
    Convert your RDF into a text format :
    - REX
    - XML/HTML/JSP if your are using Reports 9.0.x or greater)
    and search in these text files .
    Regards

  • How to push sql statements eariler in kodojdo

    Hi,
    I am using Websphere Studio Application Developer ver 5.0.1 and Kodo
    2.5.2.
    Is there any way of pushing the sql statements eariler,
    i have a table which has some columns with UNIQUE attribute, in my process
    i try to catch if any errors during the insert (persist in jdo)
    but, it doesn't throw any exception during persist call, it allows the
    process to go to next step then finaly through the exception (during the
    commit)
    is there any option to push the sql statements earlier and get the
    exception rather than doing at the end.
    one option i can think to put into new transaction, but it won't suite for
    all my cases.
    Thanks
    karup.

    You can cast the PersistenceManager to
    com.solarmetric.kodo.runtime.PersistenceManagerImpl and call flush ().
    See our JavaDoc for more info.
    kailasam.k wrote:
    Hi,
    I am using Websphere Studio Application Developer ver 5.0.1 and Kodo
    2.5.2.
    Is there any way of pushing the sql statements eariler,
    i have a table which has some columns with UNIQUE attribute, in my process
    i try to catch if any errors during the insert (persist in jdo)
    but, it doesn't throw any exception during persist call, it allows the
    process to go to next step then finaly through the exception (during the
    commit)
    is there any option to push the sql statements earlier and get the
    exception rather than doing at the end.
    one option i can think to put into new transaction, but it won't suite for
    all my cases.
    Thanks
    karup.
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • How to call sql procedure with parameter from java

    Hello,
    i am trying to call one sql procedure with two parameters from java.
    the first parameter is In parameter, the second is OUT.
    the return value of this java method should be this second parameter value.
    the following is my java code:
    protected String getNextRunNumber() {
         String runnumber=null;
         String sql = "{call APIX.FNC_SST_EXPORT.GET_NEXT_RUNNUMBER (?,?)}";
    CallableStatement state = null;
    try{
         Connection con= getDatabaseConnection();
         state = con.prepareCall(sql);
         state.setString(1, m_appKeyExport);
         state.registerOutParameter(2,Types.NUMERIC,0);
         state.execute();
    ResultSet resultR = (ResultSet)state.getObject(2);
         while (resultR.next()) {
              runnumber=resultR.getBigDecimal(1).toString();
    catch (SQLException e){System.out.println("You can not get the export next run number properly");}
    return runnumber;
    i got error message like:
    java.lang.ClassCastException: java.math.BigDecimal
    As far as i knew, if the parameter is number or decimal, we should give also the paramer scale to the method: state.registerOutParameter(), but i still get this error message.
    Please help me to solve this problem.
    Thanks a lot.

    state.execute();
    i try to use debug to find the problem, in this line, i saw
    OracleCallableStatement(OraclePreparedStatement).execute() line: 642 [local variables unavailable]
    is this the problem?

Maybe you are looking for

  • Ideal Settings For HD Playback Of Timeline?

    Any suggestions for high def playback of the timeline?  Seems a bit choppy.  The timeline exports the files just fine however. ??  I have Win 7 64 bit i7 980X@ 3.33 6 core 12 GB RAM 1600DDR Radeon 5850 GPU. Is there a BIOS setting that could be tweak

  • Recording time on the Save to ASCII%2FLVM step

    To Ni application engineers: I have Signal Express 3.0, and I would like to find out if there are ways to put real time stamp (or relative time based on DAQ rate).   We would like the time stamp to be in the 1st column in Excel along with the mean st

  • How can I copy installation/setup files of an App downloaded from Mac App Store?

    I just purchased and downloaded Xcode on my Macbook Pro and now want to install the same on my MacBook Air and iMac but I don't want download them again and again. Isin't their anyway by which I can copy the installation/setup files of that App and p

  • Server Performance Schedule

    Hi all.. Can anyone tell me how may I view the the Server Performane Schedule. means either its working fine(at desire level or slow) or not. If anyone konw..!!! please let me know. Thanks & Regards....!!! Rajeev Shrivastava

  • To find out the object which called a method

    Hi all, Is there any way to findout the object which called a class method. The object name is required inside the method. Thanks in advance, Sreekanth