[shellscript] Passing a script with parameters to AT

Hey everybody,
I would like to learn shell scripting so I created a script to mount/unmount my truecrypt volume. This is what I have so far:
#!/bin/bash
case "$1" in
start)
truecrypt -k '' /dev/array/vault /home/<user>/vault
stop)
truecrypt -d /home/<user>/vault
echo "usage: $0 (start|stop)"
esac
exit 0
Now I would like to add another feature. I want it to automatically unmount after 2 hours. I found the "at" command which should be able to do this.
I would need to do something like:
start)
truecrypt -k '' /dev/array/vault /home/<user>/vault
at -f "$1 stop" now + 2 hours
However, running just " at -f "./vault.sh start" now + 2 minutes " fails:
warning: commands will be executed using /bin/sh
Cannot open input file ./vault.sh start: No such file or directory
If I can get this working I would like the "stop" code to remove any scheduled stop operations (for when I do it manually).  Also, I would like to include a "keepalive" function that allows me to kill the scheduled stop task and reschedule it again to restart the countdown. This would allow me to keep the volume mounted if I want to use it for a longer period of time.
Is it possible to execute scripts + parameters with "at"?  Can somebody help me to make this work?
Thanks a bunch!
P.S: Truecrypt also keeps asking me this:
Protect hidden volume (if any)? (y=Yes/n=No) [No]:
I would like to specify this in the command so that I don't have to hit enter every time. I've looked at the man page but found nothing helpfull. Anyone?

Make sure that vault.sh exists in the directory that you are executing it from. It may be better to refer to the whole file location rather than just './'. eg use " at -f "~/vault.sh start" now + 2 minutes " rather than just  " at -f "./vault.sh start" now + 2 minutes ".
Providing thatyou are happy for TrueCrypt to accept the default answer for any questions it asks you can just pipe yes into it:
yes | truecrypt -k '' /dev/array/vault ~/vault
Yes will 'press enter' to any questions that TrueCrypt asks.
Last edited by gadget3000 (2011-07-14 16:46:01)

Similar Messages

  • What is the best way to run a powershell script with parameters in the Task Scheduler?

    Hello, 
    Want to run the following from a scheduled task in the Task Scheduler on a server.  What is the best approach?
    .\pscript.ps1 -csvfile "\\Srv1\Share\File.txt"
    Thanks for your help! SdeDot

    Hi,
    To run a powershell script with parameters in the Task Scheduler:
    Program: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    Add argument (optional): -Command "& c:\scripts\test.ps1 -par1 2 -par2 3"
    Hope the below two articles be helpful for you:
    Schedule PowerShell Scripts that Require Input Values
    https://blogs.technet.com/b/heyscriptingguy/archive/2011/01/12/schedule-powershell-scripts-that-require-input-values.aspx
    How to Schedule a PowerShell Script
    http://dmitrysotnikov.wordpress.com/2011/02/03/how-to-schedule-a-powershell-script/
    Regards,
    Yan Li
    Regards, Yan Li

  • How do you pass shell scripts with cocoa?

    How do you pass shell scripts with cocoa?

    You asked for more detail -- I don't know if this is what you were referring to or not, but here's a little more detail on how to use the system() function if that's what you wanted to know.
    As etresoft mentioned, the system() function can be useful for the kind of thing you are talking about. You will need to write the following statement at the top of your code if you want to use it:
    #include <stdlib.h>
    To use the system() function, simply put the command as you would write it in the Terminal between double quotes between the parenthesis. For example, something as simple as:
    system("ls");
    I don't what the practical use of the above statement would be, but it will run, and that's the general format for the system() function. So just put between the quotes whatever command you want to send.
    Hope there was something helpful here.

  • How to create OMPplus script with parameters

    Hi all. I am trying to parameterize my OMB scripts. For now I am only able to pass one type of parameter, For example in the script below I can parameterize the mapping name. So even If I pass 3 mapping names I will import MDX files and deploy for all 3 mappings.
    I want to improve this and I want to pass other parameters such as passwords and schema names also. How would I be able to do that? How can I pass different type of parameters such as schema name, password and mapping name and reference to them separately from the script?
    set MAPLIST $argv
    OMBCONOMBCONNECT DWPROD/DWPROD@cakir:1521:orcl USE REPOSITORY 'OWBDB_SYS'OMBCC 'MY_PROJECT'
    OMBCONNECT CONTROL_CENTER
    OMBCOMMIT
    foreach mapName $MAPLIST {
    OMBIMPORT MDL_FILE 'C:/tfsroot2/Interfaces and Extracts/branches/Interfaces and Extracts1.1/000 - OWB Prototype/deploy/ora.stg/mappings/$mapName.mdx' USE UPDATE_MODE MATCH_BY NAMES OUTPUT LOG TO 'C:/tfsroot2/Interfaces and Extracts/branches/Interfaces and Extracts1.1/000 - OWB Prototype/deploy/ora.stg/mappings/$mapName.log'
    OMBCOMMIT
    OMBALTER LOCATION 'XTRCT_DWEXTRACT_LOC' SET PROPERTIES (PASSWORD) VALUES ('PASSWORD')
    OMBALTER ORACLE_MODULE 'XTRCT_DWEXTRACT' ADD REFERENCE LOCATION 'XTRCT_DWEXTRACT_LOC' SET AS DEFAULT
    OMBALTER ORACLE_MODULE 'XTRCT_DWEXTRACT' SET PROPERTIES (DB_LOCATION) VALUES ('XTRCT_DWEXTRACT_LOC')
    OMBCOMMIT
    OMBALTER LOCATION 'XTRCT_DWPROD_LOC' SET PROPERTIES (PASSWORD) VALUES ('PASSWORD')
    OMBALTER ORACLE_MODULE 'XTRCT_DWPROD' ADD REFERENCE LOCATION 'XTRCT_DWPROD_LOC' SET AS DEFAULT
    OMBALTER ORACLE_MODULE 'XTRCT_DWPROD' SET PROPERTIES (DB_LOCATION) VALUES ('XTRCT_DWPROD_LOC')
    OMBCOMMIT
    OMBREGISTER LOCATION 'XTRCT_DWEXTRACT_LOC'
    OMBCOMMIT
    OMBREGISTER LOCATION 'XTRCT_DWPROD_LOC'
    OMBCOMMIT
    OMBREGISTER LOCATION 'DWEXTRACT_INPUT'
    OMBCOMMIT
    OMBREGISTER LOCATION 'DWEXTRACT_OUTPUT'
    OMBCOMMIT
    OMBCC 'XTRCT_DWEXTRACT'
    foreach mapName $MAPLIST {
    OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN '$mapName' ADD ACTION 'MAPPING_DEPLOY' SET PROPERTIES (OPERATION) VALUES ('CREATE') SET REFERENCE MAPPING '$mapName'
    OMBDEPLOY DEPLOYMENT_ACTION_PLAN '$mapName'
    OMBDROP DEPLOYMENT_ACTION_PLAN '$mapName'
    OMBCOMMIT
    puts "Mapping $mapName deployed"
    OMBDISCONNECT

    Maybe you can try putting this variable list of parameters in a text file and read the text file. You pass the path/name of the text file as a variable:
    proc read_file { p_file } {
    # Validate file exists
    if { [ file exists $p_file ] } {
    puts "File: $p_file exists"
    } else {
    puts "ERROR, not exists: $p_file"
    return 1
    # open file to read
    set v_openfile [ open "$p_file" ]
    set data_file [ read -nonewline $v_openfile ]
    close $v_openfile
    # read each line in file
    set v_list_line [ split $data_file \n ]
    foreach v_line $v_list_line {
    Regards
    ANA GH

  • Passing databse functions with parameters as custom parameters from comand

    Hi,
    I have a database function get_id(ichar varchar2) which will return a number which I am trying to pass to a mapping as custom inout parameter using the following command:
    @SQLplus_exec_template.sql RTUSER RTLOC PLSQL mapname "," "INPUT_ID=sample_pkg.get_id('I')"
    and I get the following error
    ------ start----------
    Session altered.
    Role set.
    override_custom_input_params(l_audit_execution_id, 'IN_FROM_DATE=1999/01/0108:00,IN_TO_DATE=2003/12/3108:00,BL_LOAD_ID=bl_job_control.get_bl_load_id('I')');
    ERROR at line 215:
    ORA-06550: line 215, column 155:
    PLS-00103: Encountered the symbol "I" when expecting one of the following:
    . ( ) , * @ % & | = - + < / > at in is mod not range rem =>
    .. <an exponent (**)> <> or != or ~= >= <= <> and or like
    between ||
    The symbol ". was inserted before "I" to continue.
    ------ end ----------
    However, the command line with NO parameter to the function like the following command works perfect:
    @SQLplus_exec_template.sql RTUSER RTLOC PLSQL mapname "," "INPUT_ID=sample_pkg.get_id"
    Will OWB commandline not accept function call with parameters? Please treat this as urgent and advice ASAP.
    Thanks.

    Thanks, Mark. It works.However facing another issue. I try to pass to_char(sysdate\,''yyyy/mm/ddhh:mi:ss'') as one of the custom parameters to the mapping as
    @SQLplus_exec_template.sql RTUSER RTLOC PLSQL mapname "," "INPUT_STDT=2002/10/2010:10:03,INPUT_enddt=to_char(sysdate\,''yyyy/mm/ddhh:mi:ss'')"
    and it erros out as
    ------ start ------
    ORA-01841: (full) year must be between -4713 and +9999, and not be 0 ORA-06512: at line 1
    ------ end ------
    Questions:
    1. Why does a simple to_char(sysdate\,'yyyy/mm/ddhh:mi:ss') as an input parameter fail?
    2.what is the date format that OWB expects when we pass date as an input parameter.Can the format be modified?
    OWB seems to accept the format yyyy/dd/mm only. If I pass as different format, it errors with ORA 1861 Text: literal does not match format string.
    3. Where can I change the format in OWB if it can be changed.
    NOTE: OWB complains only about INPUT_ENDDT and not INPUT_STDT because, if I hardcode INPUT_ENDDT like 2003/11/178:00 it works.
    example:
    @SQLplus_exec_template.sql RTUSER RTLOC PLSQL mapname "," INPUT_STDT=2002/10/2008:00,INPUT_ENDDT=2003/11/1706:45:59"
    works fine.
    Am I missing something here?
    Thanks again.

  • How to pass a file with parameters to a shell script from java

    I have a sh script running on linux. This script prompts when started prompts for 4 questions, for which the answers are 1, 1, 1, Y. So now I need to invoke this from a java program and pass the parameters in a file from jave to the script. Can anyone tell me how to code this in java. The script works fine from command line.
    Thanks in advance.

    Here is the standard answer to all questions involving Runtime.exec(), enjoy:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • How to compile and execute a Jython script with parameters (?)

    I am writing a scripting extension mechanism for a big server project we've built over the last year and a half.
    What I want to acheive is:
    - system authors upload scripts (via a web front end)
    - the system checks and compiles the script
    - stashes the compiled script away against a named event.
    When the event occurs the compiled script is called by the server with a list of parameters (current user id, various numbers describing the system state).
    Now I can upload and compile the script just fine using :
    PyCode somePyCode = __builtin__.compile ( script, "<>", "exec");
    ...and deal with any errors ...and stash the script away against a named event...etc.
    And it is easy enough to call this code with
    aPythonInterpreterInstance.exec ( somePyCode );
    but that doesn't pass my parameters through.
    It seems to me there's three obvious ways to do this:
    (1) specify that each script has a named target:
    def onEvent(eventid , userid):
    ... and use one of the PyCode.call() methods
    - but these aren't sensibly documented in the javadocs so it could take a while to figure out what's really going on.
    (2) specify that each script contains a class def and implements a __call__ method - but I can't see how to get the PyClass object out of the PyCode object returned by __builtin__.compile
    (3) put the variables into the local namespace and then execute the script (without a named method or class) - but this means that I would have to clean down the local namespace each time (- and anyway what is it local to?).
    (Did I mention execution speed is important to this app and I need to service multiple threads?)
    Thanks in advance,
    Tony
    ps. hope this isn't o/t to you.

    Some days you just know the synapses aren't talking.
    Of course when you exec() py code with def'd functions and class definitions in you're not executing the function(s) but defining them. Meaning that my question was all back to front in the first place.
    All four copies.

  • EEM CLI Script with parameters

    Hi all,
    I have a requirement to write an eem cli script that can be triggered using a pattern match and take parameters.
    Basically the user has to do many repetitive tasks reconfiguring interfaces regularly. So instead of having to go into each interface individually and run the config that they can write a one word command and give it params which would be for example a comma separated list of interface names and then within my script i could parse the interface names and iterate over them performing the config operation on them.
    so i'm just playing around with the cli policy.
    ::cisco::eem::event_register_cli occurs 1 pattern "nacdrop*" sync yes enter
    # Import Namespaces
    namespace import ::cisco::eem::*
    namespace import ::cisco::lib::*
    array set arr_einfo [event_reqinfo]
    set full_command $arr_einfo(msg)
    puts $full_command
    You can see here i want the command nacdrop to trigger this policy but when i try and run the command with arguments i get an error on the command line as its not a valid command and the policy doesnt trigger.
    Ideal scenario run command
    Router#nacdrop fastEthernet0/0,fastEthernet0/1,fastEthernet0/2
    the script would then perform a set of config tasks on each of the 3 interfaces.
    I thought the "enter" parameter to event_register_cli would do it as that is supposed to trigger the policy before the command is executed therefore before it determines it to be an invalid command. I do not have the latest version of eem however and suspect that the "enter" argument isn't being used as it isn't showing up as an option when i type ? to see what options are available although i don't get an error when registering the policy.
    So my question is what version off eem was this "enter" argument introduced and will it allow me to run the policy and get around the invalid command problem.
    Once i can run this policy and access the parameters to the cli command it opens up a lot for me in terms of automating repetitive tasks.
    Hope someone can help.
    Cheers,
    Joe.

    Cheer Joe. That's great. I've attached the first draft of a script i've written, maybe someone else can find it useful too.
    Basically it's for if you would like to perform the same operation on many interfaces you can use an alias and give it parameters
    E.G
    Router#vlanmove FastEthernet0/1-8,10,13-16
    Notice the params use '-' and ',' When you use dash it will perform the operation on all the interfaces in a range and then comma is just for an individual interface and as you can see above you can mix ranges with individual ones.
    The above example will give the output:
    Configuring Interface: FastEthernet0/1
    Configuring Interface: FastEthernet0/2
    Configuring Interface: FastEthernet0/3
    Configuring Interface: FastEthernet0/4
    Configuring Interface: FastEthernet0/5
    Configuring Interface: FastEthernet0/6
    Configuring Interface: FastEthernet0/7
    Configuring Interface: FastEthernet0/8
    Configuring Interface: FastEthernet0/10
    Configuring Interface: FastEthernet0/13
    Configuring Interface: FastEthernet0/14
    Configuring Interface: FastEthernet0/15
    Configuring Interface: FastEthernet0/16
    in the attached script just replace "puts "Configuring Interface: $interfaceName"
    with your configuration
    e.g.
    conf t
    interface $interfaceName
    switchport access vlan 2
    and it will perform that operation on all intefaces in a range. I might update the script later to take config commands as env variables too. That would make the script more generic. But at the moment this script is useful for us as we have to regularly reconfigure interfaces.
    Cheers,
    Joe.

  • You cannot have command as the datasource with parameters that get passed?

    I wrote a Crystal Report using a SQL command shown below. The SQL in effect creates a table called Command with the specified fields. This CR works exactly as we requested. Now I am told that they are using some kind of Interface, written in VB6, not sure exactly of all this, but that it cannot accept this Command as the datasource. The developer says that the interface is expecting SQL Server tables. Does this sound right? The interface is a repository of all reports with parameters.
    SELECT
    IV00101.ITMGEDSC,
    IV00101.ITEMDESC,
    RM00101.CUSTNAME,
    RM00101.CPRCSTNM,
    RM00101.CUSTNMBR,
    IV40600.UserCatLongDescr,
    CATS.UserCatLongDescr,
    SOP10200.ITEMNMBR,
    SOP10200.SOPNUMBE,
    SOP10200.QUANTITY,
    SOP10200.OXTNDPRC,
    SOP10200.SOPTYPE,
    SOP10100.DOCDATE,
    'Current' as source
    FROM ((((PBS.dbo.SOP10200
    SOP10200 INNER JOIN PBS.dbo.IV00101 IV00101 ON
    SOP10200.ITEMNMBR=IV00101.ITEMNMBR)
    INNER JOIN
    PBS.dbo.SOP10100 SOP10100 ON
    (SOP10200.SOPTYPE=SOP10100.SOPTYPE) AND
    (SOP10200.SOPNUMBE=SOP10100.SOPNUMBE))
    INNER JOIN
    PBS.dbo.IV40600 IV40600 ON
    IV00101.ITMGEDSC=IV40600.USCATVAL)
    INNER JOIN
    PBS.dbo.IV40600 CATS ON
    IV00101.USCATVLS_2=CATS.USCATVAL)
    INNER JOIN
    PBS.dbo.RM00101 RM00101 ON
    SOP10100.CUSTNMBR=RM00101.CUSTNMBR
    UNION ALL
    SELECT
    IV00101.ITMGEDSC,
    IV00101.ITEMDESC,
    RM00101.CUSTNAME,
    RM00101.CPRCSTNM,
    RM00101.CUSTNMBR,
    IV40600.UserCatLongDescr,
    CATS.UserCatLongDescr,
    SOP30300.ITEMNMBR,
    SOP30300.SOPNUMBE,
    SOP30300.QUANTITY,
    SOP30300.OXTNDPRC,
    SOP30300.SOPTYPE,
    SOP30200.DOCDATE,
    'History' as source
    FROM ((((PBS.dbo.SOP30300
    SOP30300 LEFT OUTER JOIN PBS.dbo.IV00101 IV00101 ON
    SOP30300.ITEMNMBR=IV00101.ITEMNMBR)
    INNER JOIN
    PBS.dbo.SOP30200 SOP30200 ON
    (SOP30300.SOPTYPE=SOP30200.SOPTYPE) AND
    (SOP30300.SOPNUMBE=SOP30200.SOPNUMBE))
    LEFT OUTER JOIN
    PBS.dbo.IV40600 IV40600 ON
    IV00101.ITMGEDSC=IV40600.USCATVAL)
    LEFT OUTER JOIN
    PBS.dbo.IV40600 CATS ON
    IV00101.USCATVLS_2=CATS.USCATVAL)
    INNER JOIN
    PBS.dbo.RM00101 RM00101 ON
    SOP30200.CUSTNMBR=RM00101.CUSTNMBR

    Hi,
    I've used the SQL Command quite a bit in Crystal. It simply replaces the SQL that Crystal would create for your Designer query with the SQL you specify in the Command. Therefore I would not expect using Command to make any difference. So I suspect the problem lies elsewhere - e.g. is the report being called correctly and are the correct parameters and database login credentials being passed?

  • How to call a AM method with parameters from Managed Bean?

    Hi Everyone,
    I have a situation where I need to call AM method (setDefaultSubInv) from Managed bean, under Value change Listner method. Here is what I am doing, I have added AM method on to the page bindings, then in bean calling this
    Class[] paramTypes = { };
    Object[] params = { } ;
    invokeEL("#{bindings.setDefaultSubInv.execute}", paramTypes, params);
    This works and able to call this method if there are no parameters. Say I have to pass a parameter to AM method setDefaultSubInv(String a), i tried calling this from the bean but throws an error
    String aVal = "test";
    Class[] paramTypes = {String.class };
    Object[] params = {aVal } ;
    invokeEL("#{bindings.setDefaultSubInv.execute}", paramTypes, params);
    I am not sure this is the right way to call the method with parameters. Can anyone tell how to call a AM method with parameters from Manage bean
    Thanks,
    San.

    Simply do the following
    1- Make your Method in Client Interface.
    2- Add it to Page Def.
    3- Customize your Script Like the below one to Achieve your goal.
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("GetUserRoles");
    operationBinding.getParamsMap().put("username", "oracle");
    operationBinding.getParamsMap().put("role", "F1211");
    operationBinding.getParamsMap().put("Connection", "JDBC");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    return null;
    i hope it help you
    thanks

  • How to call a url i-view with parameters

    Hello,
    I want to make a portal navigation in a absolute way. This call should open a url-iview. In this iview the main url string is placed. Further more, a url-parameter ("test") is placed with a standard value. Now, i want to call this iview (see the call below) and hand over the value of this url-parameter. But how could this be done? In the following way, it doesn`t work. The iView will be called but the parameter is not settet.
    Call:
    WDPortalNavigation.navigateAbsolute(
                    "ROLES://portal_content/de.dbag.dbag-f/de.dbag.optitechpro.connection_monitor-f/com.dbag.iViews-f/com.dbag.urltest-i",
                    WDPortalNavigationMode.SHOW_INPLACE,
                    (String) null,
                    (String) null,
                    WDPortalNavigationHistoryMode.NO_DUPLICATIONS,
                    (String) null,
                    (String) null,
                    "test=NUIBI");
    best regards
    Mathias

    hi Mathias
    Try this
    1) First right click on the iView you wish to open and click Open -> Object
    2) In the iView editor you will see:
    url parameter : The parameter identifier as recognized by the information source
    value: The value of the parameter
    type: The data type
    personalize:Define if portal end users can view the param and its assigned value and if they can personalize the iView at runtime
    display name: The display name for the parameter identifier
    3) Once you have defined the iView’s URL to the targeted Web page, you may need to configure parameters that are passed to the information source as part of the URL .
    4) The parameter name is something that shouldn’t be changed because it is recognized by the information source .
    5) The parameter value can be changed.
    6) The type specifies data type of the parameter. String: Apply this option for all data types whose property is for example, an integer or string. Mapped User and Mapped Password : Apply this option when the URL parameter requires authentication with the information source at runtime.
    7) The Personalization -specifies whether or not portal end users can view the parameter and its assigned value if they personalize the iView at runtime.
    Hidden: The end user does not see the parameter and its value. This is the default setting.
    Read/Write: The end user sees the parameter and is able to modify its value.
    Read Only: The end user sees the parameter and the fixed value assigned to it. The end user cannot modify the parameter value.
    8) The display name - specifies an intuitive display name for the parameter identifier. If you set the parameter to be viewable by end users at runtime, this name is displayed instead of the parameter identifier, which is often abbreviated and unintuitive. This attribute is available only if Read/Write or Read Only is selected in the Personalize attribute
    9) The Request method:
    Get – appends parameters to the URL when the data request is sent to the information source. The server receives the data in one long query string, which typically limits the length of parameters that can be passed.
    Post - sends parameters for the URL in the header of the data request stream (parameters are not appended to the URL). This allows for long parameters to be passed to a script and parsed one element at a time. POST is only supported when the Fetch Method property defined in the iView is set to Server-side
    Regards
    Pratyush

  • RMAN scripts & variables/parameters

    Hi
    We are using RMAN with TSM. There are a number of 9i and 8i databases. I tried to set the environment up to with as few scripts as possible to cover the variety of databases. I provide various variables/parameters to handle the differences between the various databases.
    In the 9i environment I "CONFIGURE" as much as possible to avoid setting changes in the actual backup script. That gives me a fairly clean generic backup script which also avoids manual channel allocations ie :
    run
    backup incremental level=0
    not backed up since time='SYSDATE-(8/24)'
    check logical
    filesperset=4
    format='/LVL0_%d_%T_%U'
    (database include current controlfile)
    plus archivelog format '/ARC_%d_%T_%U' delete all input;
    However due to the lack of "CONFIGURE" in 8i I cannot configure automatic channels. Therefor my script has to change to :
    run
    allocate channel ch01 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo_${ORACLE_SID}.opt)';
    allocate channel ch02 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo_${ORACLE_SID}.opt)';
    allocate channel ch03 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo_${ORACLE_SID}.opt)';
    allocate channel ch04 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo_${ORACLE_SID}.opt)';
    backup incremental level=0
    check logical
    filesperset=4
    format='/LVL0_%d_%T_%U'
    (database include current controlfile)
    (archivelog all format '/ARC_%d_%T_%U' delete input);
    release channel ch01;
    release channel ch02;
    release channel ch03;
    release channel ch04;
    I have multiple database instances on the same server & would like to have a single generic script with a variable/parameter to change the "tdpo.opt" file for each instance. The alternate is to have a complete set of scripts for each DB instance with everything hard coded.
    The question is : Can I pass variables/parameters to a RMAN script? If yes, how do I go about it?
    Maybe there are other ideas out there to do this. The key to me in this whole execise is to reduce maintenance & increase flexibility.
    Your responses will be appreciated
    CM

    I was hoping to get away from building part of the backup script ie the channel allocation in the RMAN statement.Don't know how you expect to do this when it's required for 8i databases ?
    Well since you are looking to accommodate 8i & 9i database and you need to manually allocate channels for the 8i databases, then you could configure your script to include an IF..THEN block that will run one set of RUN commands if the database name that is passed in is in a certain list and run the other RUN block if it isn't. You could maintain two "here document" blocks, one for 8i and one for 9i. Therefore, all of the commands can reside in one generic script.
    For example, you could configure your single, generic script as:
    # add your logic checking here to see if a 9i database sid
    # was passed in as a parameter.  If so run the following code
    rman target / log=${sid}bkp_log append << !1
    run
    backup incremental level=0
    not backed up since time='SYSDATE-(8/24)'
    check logical
    filesperset=4
    format='/LVL0_%d_%T_%U'
    (database include current controlfile)
    plus archivelog format '/ARC_%d_%T_%U' delete all input;
    !1
    # if not run the following (ie. 8i databases)
    rman target / log=${sid}bkp_log append << !2
    run
    allocate channel ch01 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo_${ORACLE_SID}.opt)';
    allocate channel ch02 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo_${ORACLE_SID}.opt)';
    allocate channel ch03 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo_${ORACLE_SID}.opt)';
    allocate channel ch04 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo_${ORACLE_SID}.opt)';
    backup incremental level=0
    check logical
    filesperset=4
    format='/LVL0_%d_%T_%U'
    (database include current controlfile)
    (archivelog all format '/ARC_%d_%T_%U' delete input);
    release channel ch01;
    release channel ch02;
    release channel ch03;
    release channel ch04;
    !2then you could call this generic script with the appropriate command line parameters.
    Hope I'm following your explanation/requirement.

  • CONCSUB WITH PARAMETERS IS FAILING

    Hi,
    I am using CONCSUB command in one of my shell program, where in it will get the parameters from report. Below mentioned is my command.
    CONCSUB $p_userid_passwd AR "Receivables Manager, RP" $p_user_name WAIT=Y \
    CONCURRENT XXRP XXFND_SEND_MAIL $v_conc_request_id "$p_to_role" "$p_from_role" "$p_subject" "$p_body" "$p_dist_list" '""' LANGUAGE=AMERICAN
    The parameters are running text like some times in p_subject i will get big description like 'emailing transaction report'
    this parameter is splitted into three and supplied into rest parameters.
    As per developer guide if we have running long running text we need to enclose first in double quotes and then again in single quotes. When I am doing in that way it is showing all errors results. Sometimes all values get merged into one thing.
    Please help me how to differentiate when they are passing like above mentioned.
    Regards,
    nagendra

    Error is that for pl/sql script five parameters but through variables when I am sending to concurrent program they are splitting into 8 parameters.
    like i am passing these parameters to pl/sql script
    452024, DC.DKHOO, DC.DKHOO, rp audit transaction report, please find, RP_EMAIL_DIST_LIST2
    then in shell program it is being shown as
    452024, DC.DKHOO, DC.DKHOO, rp, audit, transaction, report, please, find, RP_EMAIL_DIST_LIST2
    The problem with concsub is that it will consider space as ','. So it is placing comma after every space. In the developer guide itself only they mentioned we can double quotations and single qutotions.
    '"this is an example"'. This works fine when you are passing manually. But when sending programatically like this '"$P_SUBJECT"'.  Then I am getting value as $P_SUBJECT in place of valuePlease let me know how to use running text value parameters in CONCSUB.
    Regards,
    Nagendra

  • How to pass a list of parameters to a query?

    Hi,
    I use OracleXE 10 Database with JDeveloper 11g.
    In my project I use a Toplink mapping to get access to the database (Toplink Object Map file). This mapping xml file is called crmMap.xml.
    In the crmMap.xml file I define a mapping to a "User table" which has the four columns id (number), title (varchar2), firstName (varchar2) and lastName (varchar2). A title can have the four values Bachelor, Master, Doctor and Professor.
    I do define a query in crmMap.xml which has to find all the users that have a special title. I do give the query one parameter called "title" which has the type "java.util.ArrayList". The parameter "title" is a list that has for example the two values "Bachelor" and "Doctor", if I want to find all the users that are Bachelor or Doctor. The query looks like this ...
    Select * from User where title in(?title)I do use an EJB Session Bean to call the query. The code looks like this ...
    public List<User> findUserByStatus() {
        Session session = getSessionFactory().acquireSession();
        Vector params = new Vector(1);
        List stati = new ArrayList();
        stati.add("Doctor");
        stati.add("Bachelor");
        params.add(stati);
        List<User> result = (List<User>)session.executeQuery("findUserByStatus", User.class, params);
        session.release();
        return result;
    }Doing this I get an error, in the line
    List<User> result = (List<User>)session.executeQuery("findUserByStatus", User.class, params);while the app is trying to execute the query.
    Part of my log
    WARNING: ADFc: Invalid column type
    java.sql.SQLException: Invalid column type
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:116)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:177)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:233)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:407)
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical(OraclePreparedStatement.java:7931)
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:7511)
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:8168)
         at oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement.java:8149)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.setObject(OraclePreparedStatementWrapper.java:229)
         at oracle.toplink.internal.databaseaccess.DatabasePlatform.setPrimitiveParameterValue(DatabasePlatform.java:1694)
         at oracle.toplink.internal.databaseaccess.DatabasePlatform.setParameterValueInDatabaseCall(DatabasePlatform.java:1684)
         at oracle.toplink.platform.database.oracle.Oracle9Platform.setParameterValueInDatabaseCall(Oracle9Platform.java:339)
         at oracle.toplink.internal.databaseaccess.DatabasePlatform.setParameterValuesInDatabaseCall(DatabasePlatform.java:1669)
         at oracle.toplink.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:649)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:517)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:467)
         at oracle.toplink.threetier.ServerSession.executeCall(ServerSession.java:447)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:179)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:250)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:583)
         at oracle.toplink.queryframework.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:467)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:874)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:674)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:835)
         at oracle.toplink.queryframework.ReadAllQuery.execute(ReadAllQuery.java:445)
         at oracle.toplink.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2260)
         at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1074)
         at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1058)
         at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1032)
         at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:945)
         at de.virtual7.crmTL.model.crmFacadeBean.findUserByStatus(crmFacadeBean.java:720)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:126)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:114)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
         at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:15)
         at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
         at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:30)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
         at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:126)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:114)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
         at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
         at $Proxy90.findUserByStatus(Unknown Source)
         at de.virtual7.crmTL.model.crmFacade_etlagg_crmFacadeLocalImpl.findUserByStatus(crmFacade_etlagg_crmFacadeLocalImpl.java:838)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at oracle.adf.model.binding.DCInvokeMethod.invokeMethod(DCInvokeMethod.java:563)
         at oracle.adf.model.binding.DCDataControl.invokeMethod(DCDataControl.java:2119)
         at oracle.adf.model.bc4j.DCJboDataControl.invokeMethod(DCJboDataControl.java:2929)
         at oracle.adf.model.bean.DCBeanDataControl.invokeMethod(DCBeanDataControl.java:396)
         at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:258)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1441)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2126)
         at oracle.adf.model.bean.DCBeanDataControl.invokeOperation(DCBeanDataControl.java:414)
         at oracle.adf.model.adapter.AdapterDCService.invokeOperation(AdapterDCService.java:311)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:697)
         at oracle.adf.model.binding.DCInvokeAction.refreshInternal(DCInvokeAction.java:46)
         at oracle.adf.model.binding.DCInvokeAction.refresh(DCInvokeAction.java:32)
         at oracle.adf.model.binding.DCBindingContainer.internalRefreshControl(DCBindingContainer.java:2970)
         at oracle.adf.model.binding.DCBindingContainer.refresh(DCBindingContainer.java:2639)
         at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.prepareModel(PageLifecycleImpl.java:110)
         at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.prepareModel(FacesPageLifecycle.java:77)
         at oracle.adf.controller.v2.lifecycle.Lifecycle$2.execute(Lifecycle.java:135)
         at oracle.adfinternal.controller.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:190)
         at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.mav$executePhase(ADFPhaseListener.java:19)
         at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$PhaseInvokerImpl.startPageLifecycle(ADFPhaseListener.java:229)
         at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$1.after(ADFPhaseListener.java:265)
         at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:69)
         at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.afterPhase(ADFLifecyclePhaseListener.java:51)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:354)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:175)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:181)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:279)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:239)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:196)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:139)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.security.jps.wls.JpsWlsFilter$1.run(JpsWlsFilter.java:85)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:257)
         at oracle.security.jps.wls.JpsWlsSubjectResolver.runJaasMode(JpsWlsSubjectResolver.java:250)
         at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:100)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:65)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    07.09.2009 11:50:16 oracle.adf.controller.faces.lifecycle.FacesPageLifecycle addMessage
    WARNUNG: ADFc: EJB Exception: : Lokaler Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink - 11g (11.1.1.0.1) (Build 081030)): oracle.toplink.exceptions.DatabaseException
    Interne Exception: java.sql.SQLException: Ungültiger Spaltentyp
    Fehlercode:17004
    Aufruf:Select * from User where title in(?title)
         bind => [[Doctor,Bachelor]]Does anyone know a way how to pass a list of parameters
    Thanks Bodhy

    Hi,
    One alternative way is to create String with , sepearted as pass the string to in clause.For example ,create a string ('Bachelor','Doctor') and pass this string to in clause.
    Session session = getSessionFactory().acquireSession();
    String params=( 'Bachelor','Doctor);
    List<User> result = (List<User>)session.executeQuery("findUserByStatus", User.class, params);
    session.release();
    This is an alternative way and workaround which can work for Strings .
    Or you can use EXpression to build the query to pass the collection as example given below.
    Expression addressExpression;
    ReadObjectQuery query = new ReadObjectQuery(Employee.class);
    ExpressionBuilder emp = query.getExpressionBuilder();
    addressExpression =
    emp.get("address").get("city").equal(
    emp.getParameter("employee").get("address").get("city"));
    query.setName("findByCity");
    query.setSelectionCriteria(addressExpression);
    query.addArgument("employee");
    Vector v = new Vector();
    v.addElement(employee);
    Employee e = (Employee) session.executeQuery(query, v);
    Hope this helps.
    Regards,
    Vinay Kumar

  • Database, Dataset, Table Adaptors Error "Unable to load, Update requires a valid DeleteCommand when passed DataRow collection with deleted row"

    Microsoft Visual Basic 2010 Express.
    I am new to Visual Basic programing and i am trying to understand the relationships between Datasets, database, table Adaptors. I have to following code that is is giving me the following error" Unable to load, Update requires a valid DeleteCommand
    when passed DataRow collection with deleted rows". 
    I can track the error and its located in "OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)" code. What am i missing?
    It seems that i can delete the data on the DataGridView Table and it only displays the correct data. but my database is not updating, even though the data grid displays differently.I can determine this because, when i save the offset database, i have all
    the previous uploads and all the rows that i wanted to delete are still there.
    My final goal is to be able to import offset data from a CSV file, save this data on the pc, send a copy of this data to a NuermicUpDown so the customer can modify certain numbers. From here they download all the date to a controller.  IF the customer
    needs to modify the imported data, they can go to a tab with a data grid view and modify the table. They will also have to option to save the modified data into a csv file.  
    Im not sure if i am making this overcomplicated or if there is a easier way to program this.
    CODE:
    Private Function LoadOffSetData()
            Dim LoadOffsetDialog As New OpenFileDialog 'create a new open file dialog and setup its parameters
            LoadOffsetDialog.DefaultExt = "csv"
            LoadOffsetDialog.Filter = "csv|*.csv"
            LoadOffsetDialog.Title = "Load Offset Data"
            LoadOffsetDialog.FileName = "RollCoaterOffset.csv"
            If LoadOffsetDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then  'show the dialog and if the result is ok then
                Try
                    Dim myStream As New System.IO.StreamReader(LoadOffsetDialog.OpenFile) 'try to open the file with a stream reader
                    If (myStream IsNot Nothing) Then 'if the file is valid
                        For Each oldRow As MaterionOffsetDataSet.OffsetTableRow In MaterionOffsetDataSet.OffsetTable.Rows
                            oldRow.Delete()                       
    'delete all of the existing rows
                        Next
                        'OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)
                        Dim rowvalue As String
                        Dim cellvalue(25) As String
                        'Reading CSV file content
                        While myStream.Peek() <> -1
                            Dim NRow As MaterionOffsetDataSet.OffsetTableRow
                            rowvalue = myStream.ReadLine()
                            cellvalue = rowvalue.Split(","c) 'check what is ur separator
                            NRow = MaterionOffsetDataSet.OffsetTable.Rows.Add(cellvalue)
                            Me.OffsetTableTableAdapter.Update(NRow)
                        End While
                        Me.OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)
                        MainOffset.Value = OffsetTableTableAdapter.MainOffsetValue          'saves all the table offsets
    to the offset numericUpDown registers in the main window
                        StationOffset01.Value = OffsetTableTableAdapter.Station01Value
                        StationOffset02.Value = OffsetTableTableAdapter.Station02Value
                       myStream.Close() 'close the stream
                        Return True
                    Else 'if we were not able to open the file then
                        MsgBox("Unable to load, check file name and location") 'let the operator know that the file wasn't able to open
                        Return False
                    End If
                Catch ex As Exception
                    MsgBox("Unable to load, " + ex.Message)
                    Return False
                End Try
            Else
                Return False
            End If
        End Function

    Hello SaulMTZ,
    >>I can track the error and its located in "OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)" code. What am i missing?
    This error usually shows that you do not initialize the
    DeleteCommand object, you could check this
    article to see if you get a workaround.
    >> Im not sure if i am making this overcomplicated or if there is a easier way to program this.
    If you are working CSV file, you could use OleDB to read it which would treat the CSV file as a Table:
    http://www.codeproject.com/Articles/27802/Using-OleDb-to-Import-Text-Files-tab-CSV-custom
    which seems to be easier (in my opinion).
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • How to get pictures from iphone 4s to iphoto?

    I am unable to get the pictures from my new iPhone 4s transfered to iPhoto on my iMac (version 10.5.8). It does sync via iCloud to my iPad, but it will not transfer pictures to iPhoto when connecting the phone to my iMac. The phone doesn't appear on

  • Need of a jit compiler

    hi, what i know is jit compiler is used to boostup the process of converting byte code into native machine code .then in the absence of jit who will do this process. and please also calrify will byte code be interpreted or complied into native code ?

  • Very Large Numbers Question

    I am a student with a question about how Java handles very large numbers. Regarding this from our teacher: "...the program produces values that are larger than Java can represent and the obvious way to test their size does not work. That means that a

  • JCO in a EJB used as Web Service

    Hi All, I'm trying to use JCO in a Web Service. What happens is that as soon as I try to call -any- JCO method I get an error: Exception in method getObjects.I can't even seem to catch this error within Java for a personalized message. I can't find a

  • Answer not correct

    i made the following program. but when i compile it then run it, it displays the real answer to be 27.0 when really after calculating it on a calculator the answer is something like 27.74428975 and so on. whats the problem because i want the decimal