Pro*C: host array insert using VARCHAR

I followed the sample program sqlvcp.pc (explained in the ORACLE docu for Pro*C) to select severel rows from the database into an host array of varchar. This needs only one FETCH in program and works very well.
I tried to use the same method to insert a host array of varchar into the database.
BUT unfortunately only one row is inserted and then I get the error -01458.
I checked data in my host array (allocated with malloc) using a debugger and I can't find an error.
Is it possible to use this method to insert several rows out of a host array of varchar into the database using only one insert statement?
If yes, for what do I have to take care of?
Or do I have to use a loop with one insert for every row. This would be much slower!
Thanks for Help.

Hi prajithparan,
Thanks for the response. I already looked at the link and a few other links in this forum that are related to array inserts/updates. However, I could not find answers to my specific questions. I am specifically concerned with the setup of parameters to the API calls (OCIBindByName and OCIBindArrayOfStruct) that fully reflects the two-dimensional nature of the array of structs that I am trying to insert.
Moreover, I need to set the data type of the columns to be inserted as SQLT_STR. I think this data type requires the programmer to supply the length of the null terminated C strings as well. If we are inserting just one column, we can provide the length of each of the strings to be inserted into a VARCHAR2 column as part of a OCIBind call, for each of those columns.
Since in an array insert, we are supplying multiple rows at the same time, how do we supply the lengths of strings to be inserted ? Should it be some form of two-dimensional array ?
I could not get clear answers to these questions from either the Oracle documentation or the links on this forum. May be the answers are there and I am just missing them ?

Similar Messages

  • JDBC/OCI8 Array inserts

    Does JDBC/OCI8 support array inserts? I'm familiar with the C/C++ array inserts, but I haven't found anything on array inserting using JDBC/OCI8.
    Array processing gives an application a real performance boost and I was hoping to use it in Java.

    Hi ,
    I am facing the same problem with
    Oracle 8.1.5 on Windows NT.
    Driver : 8.1.6 JDBC OCI Driver
    JDK 1.2.2
    Any workaround / patch to solve this problem please ?
    Thanks,
    Shubhada

  • Error PCC-S-02319 managing host arrays in pro*C

    Hi all,
    Pro*C is retrieving the error: "PCC-S-02319, expression type does not match usage" when tries to compile this lines:
    for (i= 0; i < MAX_SAIS_POR_RECINTO && DniSAIs[i] != DNI_NULO; i++)
    EXEC SQL AT :NombreBD
    INSERT INTO SAIS_POR_RECINTO
    ( TIPO_CONF, DNI_EDIFICIO, DNI, DNI_EDIFICIO_SAI, DNI_EQUIPO_SAI )
    VALUES
    ( :TipoConf, :DniEdificio, :Dni, :DniSAIs[2*i], :DniSAIs[2*i+1] );
    Semantic error at line 4583, column 56, file __EnBDmodRciI.pc:
    ( :TipoConf, :DniEdificio, :Dni, :DniSAIs[2*i], :DniSAIs[2*i+1] );
    .......................................................1
    I'm compiling a library written in pro*C. I know that the code is well written because it have been compiled before in another machine. The fact is that they pass me the code to generate another compilation environtment in a new server. I think the problem may be in any precompiling directive because the file pcscfg.cfg is empty. In the makefile are used the following directives:
    MYPCCFLAGS= PARSE=FULL CODE=ANSI_C UNSAFE_NULL=YES MODE=ORACLE DBMS=V7
    I have been reading tutorials about host arrays, but doesn't says anything about ay restriction in using operators with arrays (i.e arr[i+3)) when insert or update data.
    Anyone could help me?
    Thank you.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    What about post your question here
    Oracle Discussion Forums » Oracle Database » C++ Call Interface (OCCI)
    Mark this thread as answered

  • Array Inserts with Java?

    Hey,
    Just doing some forward thinking for a project and ran into a
    question that I can't seem to find a straight forward answer to.
    I'll be importing data from a flat file structure and want to
    make it as fast as possible to process as it may be a large set
    of records.
    Can Java (JDev 2.0) do array inserts. I'd like to achieve
    something like PRO*C in that I want to be able to pass an array
    of records to insert, batching them so that it's not a single
    network (or database) hit per record inserted.
    Any help appriciated!
    Doug
    null

    Doug,
    I think any kind of mass inserting is not going to be optimal
    over JDBC.
    I am pretty sure the batch update just saves you some network
    roundtrips. I believe each insert/update would still be a
    separate transaction once on the server side, if nothing else for
    the purposes of rollbacks, etc.
    -L
    Doug Gault (guest) wrote:
    : Guys,
    : Thanks for the quick response.
    : I had run into the Batch Update facility but on my initial
    : reading it seemed to be more about compacting network traffic
    : rather than enhancing mass insert performance.. Did I get the
    : wrong end of the stick here?
    : What (roughly) happens to the 'Batched' set of transactions
    once
    : the Database gets it. Is the set processed as a single
    : transaction (all or nothing)?
    : I'll re-read this section, and take a look at the Tech net
    : examples
    : Thanks
    : Doug
    : JDeveloper Team (guest) wrote:
    : : Doug,
    : : I ran into problems with trying to pass arrays. Namely, with
    : : stored procedures, JDBC treats an array argument as an
    attempt
    : to
    : : declare an IN/OUT type parameter, and only allows that array
    to
    : : contain one object.
    : : The JDBC doc has a section on performance enhancements that
    you
    : : may want to investigate, specifically the Batch Update
    facility
    : : described in Chapter 4 in the 'Additional Oracle Extensions'
    : : section. You can use this to 'batch up sets of inserts or
    : : updates' rather than send them one at a time.
    : : Alternately, I recommend you check out the JDBC sample code
    : : provided on OTN. They have some better 'real world' examples
    : : than the JDBC docs.
    : : -L
    null

  • Array Insert/Update/Select in JDBC

    I've been using array processing in ODBC, OCI, and Pro*C for years and desperately need to do so in JDBC. I've thus far been unsuccessful and am beginning to doubt that it's supported which to me is unfathomable. I've likewise found many like inquiries on the net - none of which were addressed. There have been many respondants who don't undertstand what array processing is and mistake it for batch SQL statements. They are not the same. Batched SQL statements are seperate statements which are executed in a single call to the database engine. What I'm taking about is using a prepared statement and binding primitive arrays to the statement. A single statement is executed and the contents of the arrays passed to the database. I've conducted tests years ago and array insert/update is many times faster than batch statements. Does anyone know whether or not JDBC supports array processing? If anyone's interested, I can provide snippets via email which illustrate how this is done in ODBC and other API's.
    Thanks.

    You referred me to
    http://java.sun.com/products/jdbc/download.html. The
    only reference I found to arrays were SQL Arrays - not
    what I'm talking about. See prior C/ODBC snippet. Do
    you know how to do this in JDBC?You are talking about passing an array as a single parameter to and from the underlying database correct? (And that has nothing to do with batch processing.)
    If so in section 16.4 "Array Object"..... looking at that section gives the following reference....
    The Array object returned to an application by the ResultSet.getArray and
    CallableStatement.getArray methods is a logical pointer to the SQL ARRAY
    value in the database; it does not contain the contents of the SQL ARRAY value.
    The above has nothing to do with batch processing (although presumably one could use it in a batch process but then one can use String as well.)
    Of course perhaps there is something in there that says that only applies to batch processing. If so could you please point out the section and quote the text.

  • ABAP/4 Open SQL array insert results in duplicate databaserecordsfor pk13

    Hi Experts, when I am working with pk13n tranaction iam getting an error message stating that update was terminated by user. when i am checking with st22 it gives the following message. please give the solution , iam sending the code as well.
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
    in
    procedure "SAVE_DATA" "(FORM)", nor was it propagated by a RAISING clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    If you use an ABAP/4 Open SQL array insert to insert a record in
    the database and that record already exists with the same key,
    this results in a termination.
    (With an ABAP/4 Open SQL single record insert in the same error
    situation, processing does not terminate, but SY-SUBRC is set to 4.) please find the below code please give the solution for this error message.
    1 *eject
    2 *----
    3 *   Verbuchen der Daten                                           *
    4 *----
    5 FORM SAVE_DATA.
    6
    7   DATA: lf_menge LIKE ekpo-menge VALUE 0,                   "717464
    8         lf_netwr LIKE ekpo-netwr VALUE 0.
    9
    10 * Einteilungen löschen --> Array Delete aus Tabelle DEKET
    11   DESCRIBE TABLE DEKET LINES SY-TFILL.
    12   IF SY-TFILL GT 0.
    13     DELETE EKET FROM TABLE DEKET.
    14     IF SY-SUBRC NE 0.
    15       MESSAGE A865.
    16     ENDIF.
    17     EKET_DELETE = EKET_DELETE + SY-DBCNT.
    18     REFRESH: DEKET.
    19     CLEAR  : DEKET.
    20   ENDIF.
    21
    22 * Einteilungen hinzufügen --> Array Insert aus Tabelle IEKET
    23   DESCRIBE TABLE IEKET LINES SY-TFILL.
    24   IF SY-TFILL GT 0.
    >>     INSERT EKET FROM TABLE IEKET.
    26     IF SY-SUBRC NE 0.
    27       MESSAGE A864.
    28     ENDIF.
    29     EKET_INSERT = EKET_INSERT + SY-DBCNT.
    30     REFRESH: IEKET.
    31     CLEAR  : IEKET.
    32   ENDIF.
    33
    34 * Check whether the qty in EKPO-MENGE is correct: note 717464
    35   SELECT SUM( menge ) FROM eket INTO lf_menge
    36                       WHERE ebeln = ekpo-ebeln
    37                       AND   ebelp = ekpo-ebelp.
    38   IF sy-subrc = 0 AND ekpo-menge <> lf_menge.
    39     IF ekpo-ktmng <> 0.
    40       refe1 = ekpo-zwert * lf_menge / ekpo-ktmng.
    41     ELSE.
    42       refe1 = ekpo-zwert * lf_menge / 1000.
    43     ENDIF.
    44     IF refe1 > maxwert.

    Hi,
    Well I don't know why you have duplicates, this is a functionnal issue. But you get the dump due the the message number 864 that triggers the abend... Changing the message type to 'E', 'S' or 'I' will prevent the dump but I guess this message has a good reason to be
    Kr,
    Manu.

  • The size limit of the OCI LOB Array Insert is 64K for one field?

    I have a table with 4 field, and one is BLOB field. I want to insert 16 rows in one OCIStmtExecute. I know I can specify the iter parameter with 16 to execute sql 16 times.
    I found example in "Application Developer's Guide - Large Objects" in page "Data Interface for Persistent LOBs 13-17", there is a example function called "array_insert". It shows the usage of OCIBindArrayOfStruct, but can only insert LOB with same size, the LOB field of each row filled with the same size data.
    But I have to insert LOB with different size, for example 8K for row 1, and 16K for row 2, 128K for row 3. Than I find the alenp parameter of OCIBindByName/OCIBindByPos. It is "pointer to array of actual lengths of array elements."(OCI document). So I think I find the solution for my problem. But the type of alenp parameter is ub2*, is it means I can only insert 64K data for each row in my array insert? It is too small, I hope I can array insert BLOB with 16M each row.
    Or there is any other solution for my problem? I look forward to it for a long time! thanks every one!

    It is called Data Interface to work with LOB datatypes by APIs designed for use with legacy datatypes. I can specify SQLT_BIN to bind memory binary data to BLOB column, and INSERT or UPDATE directly. It can be without LOB locator and save round-trip to the server. This is very fit my needs, because I have to insert very much BLOBs to server as soon as possible.
    I have make a test program, and multi-row with different size blob( less than 65536 bytes) can be insert at one time, without locators. Multi-row wiht same size blob( more than 64K) also can be insert at one time--the alenp parameter is not used. I only can not insert multi-row with different size blob( more than 64k) because the type of alenp is ub2*.
    thank you for your reply!

  • The ABAP/4 Open SQL array insert results in duplicate Record in database

    Hi All,
    I am trying to transfer 4 plants from R/3 to APO. The IM contains only these 4 plants. However a queue gets generated in APO saying 'The ABAP/4 Open SQL array insert results in duplicate record in database'. I checked for table /SAPAPO/LOC, /SAPAPO/LOCMAP & /SAPAPO/LOCT for duplicate entry but the entry is not found.
    Can anybody guide me how to resolve this issue?
    Thanks in advance
    Sandeep Patil

    Hi Sandeep,
              Now try to delete ur location before activating the IM again.
    Use the program /SAPAPO/DELETE_LOCATIONS to delete locations.
    Note :
    1. Set the deletion flag (in /SAPAPO/LOC : Location -> Deletion Flag)
    2. Remove all the dependencies (like transportation lane, Model ........ )
    Check now and let me know.
    Regards,
    Siva.
    null

  • RE: (forte-users) SQL Array Insert

    Unfortunately that carries a tremendous overhead. Each request is a seperate
    message and forte generates alot of behind the scenes prepares for the sql.
    ---------------------- Forwarded by Amos G. Radford on 10/27/2000 02:34 PM
    "Amin, Kamran" <kamran.aminlendware.com> on 10/27/2000 02:33:07 PM
    To: Amos G. RadfordBankofAmerica
    cc:
    Class: Internal Use Only
    Subject: RE: (forte-users) SQL Array Insert
    User a for loop and call update for each row in the array.
    For Loop
    Update
    set
    1=test[1]
    end for
    ka
    -----Original Message-----
    From: Amos.G.Radfordbankofamerica.com
    [mailto:Amos.G.Radfordbankofamerica.com]
    Sent: Friday, October 27, 2000 12:07 PM
    To: forte-userslists.xpedior.com
    Subject: (forte-users) SQL Array Insert
    I have run into a strange problem that I never really run into
    before. If I want to save an array of items into a table in TOOL
    SQL, how can I do it if the column names in the table are different
    than the column names in the class. In the past we always had
    the luxury of the column names being the same.
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

    Madhu,
    Do the following:
    1. create prepare statement
    e.g
    stmHnd : DBStatementHandle;
    inputData : DBDataset = new;
    stmType : integer;
    stmHnd = DBSesObj.prepare('insert into
    table_name myCOl1, myCol2, myCol3
    values(:myCol1Value, :myCol2Value, :myCol3Value)',
    inputData,stmType);
    2. Populate the input DBDataset.
    e.g
    // assign the maximum value
    inputData = myArrObj.items;
    // assign the values
    for i in 1 to myArrObj.items do
    inputdata.currentRow = i;
    inputdata.setvalue(':myCol1Value',
    myArrObj.attr1);
    inputdata.setvalue(':myCol2Value',
    myArrObj[i].attr2);
    inputdata.setvalue(':myCol3Value',
    myArrObj[i].attr3);
    end for;
    3. execute the statement:
    e.g .
    DBSesObj.execute(stmHnd, inputData);
    4. release the handle
    DBSesObj.RemoveStatement(stmHnd);
    Hope this helps,
    Babu
    --- "Epari, Madhusudhan" <meparioxhp.com> wrote:
    Babu,
    I'm not clear on how dynamic sql statement would
    access the database only
    one time for inserting an array of records in to the
    table. Could you tell
    how's it done?
    thanks in advance,
    Madhu
    -----Original Message-----
    From: Babu Raj [mailto:ibcsmartboyyahoo.com]
    Sent: Friday, October 27, 2000 8:02 PM
    To: Amos.G.Radfordbankofamerica.com;
    forte-userslists.xpedior.com
    Subject: RE: (forte-users) SQL Array Insert
    Amos,
    Why don't you use, Dyanmic SQL statement,
    where
    you need to prepare only one SQL Statement, and
    populate input place holder, which is much simpler
    and
    you need to access the database only one time(which
    is
    efficient operation). This is useful, especially,
    when
    you want to update. But for your inforamtion, Forte
    internally inserts, one by one row, even if u call
    Static SQl statement, with array of record. Os its
    advisable to use Dyanmic SQL statement.
    Hope this helps,
    Babu
    --- Amos.G.Radfordbankofamerica.com wrote:
    Unfortunately that carries a tremendous overhead.
    Each request is a seperate
    message and forte generates alot of behind the
    scenes prepares for the sql.
    ---------------------- Forwarded by Amos G.Radford
    on 10/27/2000 02:34 PM
    "Amin, Kamran" <kamran.aminlendware.com> on
    10/27/2000 02:33:07 PM
    To: Amos G. RadfordBankofAmerica
    cc:
    Class: Internal Use Only
    Subject: RE: (forte-users) SQL Array Insert
    User a for loop and call update for each row inthe
    array.
    For Loop
    Update
    set
    1=test[1]
    end for
    ka
    -----Original Message-----
    From: Amos.G.Radfordbankofamerica.com
    [mailto:Amos.G.Radfordbankofamerica.com]
    Sent: Friday, October 27, 2000 12:07 PM
    To: forte-userslists.xpedior.com
    Subject: (forte-users) SQL Array Insert
    I have run into a strange problem that I never
    really run into
    before. If I want to save an array of items intoa
    table in TOOL
    SQL, how can I do it if the column names in the
    table are different
    than the column names in the class. In the pastwe
    always had
    the luxury of the column names being the same.
    For the archives, go to:
    http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To
    unsubscribe, send in a new
    email the word: 'Unsubscribe' to:
    forte-users-requestlists.xpedior.com
    For the archives, go to:
    http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To
    unsubscribe, send in a new
    email the word: 'Unsubscribe' to:
    forte-users-requestlists.xpedior.com
    For the archives, go to:
    http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To
    unsubscribe, send in a new
    email the word: 'Unsubscribe' to:forte-users-requestlists.xpedior.com

  • He ABAP/4 Open SQL array insert results in duplicate database records

    Dear Gurus,
    II am getting a dump when I run MD02/ MD03. (t- code to run MRP)
    Below is the message system is showing:
    Please help
    Thanks in Advance
    Best Regards
    Adhish
    Short text
    The ABAP/4 Open SQL array insert results in duplicate database records.
    What happened?
    Error in the ABAP Application Program
    The current ABAP program "SAPLM61U" had to be terminated because it has
    come across a statement that unfortunately cannot be executed.
    Error analysis
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
    in
    procedure "INSERT_MDSBI_IN_MDSB" "(FORM)", nor was it propagated by a RAISING
    clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    If you use an ABAP/4 Open SQL array insert to insert a record in
    the database and that record already exists with the same key,
    this results in a termination.
    (With an ABAP/4 Open SQL single record insert in the same error
    situation, processing does not terminate, but SY-SUBRC is set to 4.)
    1 *----
    2 * ARRAY-INSERT auf MDSB
    3 *----
    4 FORM INSERT_MDSBI_IN_MDSB.
    INSERT MDSB6 FROM TABLE MDSBI.
    7 ADD SY-DBCNT TO STATS-RESBI. "statistics
    8 ENDFORM.

    Hi,
    There must be inconsistency in the number range. This happens when the current number in the number range for dependent requirements is lower than the highest number in the database table of the dependent requirements RESB.
    Please check the current number in transaction OMI2. Here in the interval you can see the current number. Then please check the highest number in table RESB. If the current number in OMI2 is lower than the highest number in table RESB then this should be the reason for the dump.
    Check and revert. If that's not the case we'll look into other possibilities.
    In mean time check for SAP Note 138108.

  • ABAP/4 Open SQL array insert results in duplicate database records in SM58

    Hi Everyone,
    I am testing a file to idoc scenario in my Quality system. When I passed the input file, the mapping executed successfully and there are no entries in SMQ2 but still the idoc wasn't created in the ECC system. When I have checked in TRFC, I am getting the error  ABAP/4 Open SQL array insert results in duplicate database records for IDOC_INBOUND_AYNCHRONOUS function module. I thought this is a data issue and I have tested with a fresh data which was never used for testing in Quality but even then I am getting the same error.Kindly advise.
    Thanks,
    Laawanya

    use FM idoc_status_write_to_database to change the IDoc status from 03 to 30 and then  run WE14 or  RSEOUT00 to change the status back to 03
    resending idoc from status 03 ...is a data duplicatino issue on receiving side...why do u need to do that ?
    Use WE19 tcode to debug
    In we19
    1)U can choose your Idoc number in existing Idoc textbox
    2)Press execute
    3)u will display ur Idoc struct
    4)Dbl click on any field then u can modify its content
    5)PressStd Outbound Processing Btn to process modified Idoc
    Thats it

  • Error: The ABAP/4 Open SQL array insert results in duplic in EWM

    Hi Friends,
    During outbound process in EWM, my completed EWM delivery gets stuck in SMQ1 with error "The ABAP/4 Open SQL array insert results in duplic". I performed following checks and found all the ok. Please help me with your insights.
    - Checked the Master data Products, Business Partners,are CIFed properly. Yes they are done properly.
    - Checked if inbound is stuck in same way. But its not.
    - Checked if there is any enhancement stopping in ECC. There is some enhancement in Document_save in ECC outbound delivery which I got it commented. Still the problem is same.
    Please suggest what could be the root cause.
    Thanks
    Trivedi

    Hi Rushikesh,
    I checked all Number ranges (O/D in EWM and ECC, HU and Batches). All are ok. I tried taking help of ABAPer to see if any Run time errors occuring but no use.
    Regards,
    Trivedi

  • Behavior of array insert

    Quick question: Does the array insert method send the SQL string once or once for each bind? i.e could the sql text size lead to network problems?

    Are you referring to Array Binding, or passing an Associative Array? Actually, it doesnt matter, the sql statement gets sent once in both cases. If you've messed around with SQLNet tracing, you can use it to see the actuall communication with the db to confirm that.
    I'm not too sure what you mean by "could the sql text size lead to network problems".
    Hope it helps,
    Greg

  • Bought a Macbook pro 2009 2.8 ghz used, how do I make the most? (it was not formatted)

    bought a Macbook pro 2009 2.8 ghz used, how do I make the most? (it was not formatted)

    The first thing to do with a second-hand computer is to erase the internal drive and install a clean copy of OS X. You—not the original owner—must do that. How you do it depends on the model, and on whether you already own another Mac. If you're not sure of the model, enter the serial number on this page. Then find the model on this page to see what OS version was originally installed.
    It is not safe to use a computer with software installed by a previous owner.
    1a. If you don't own another Mac
    If the machine shipped with OS X 10.4 or 10.5, you need a boxed and shrink-wrapped retail Snow Leopard (OS X 10.6) installation disc from the Apple Store or a reputable reseller—not from eBay or anything of the kind. If the machine has less than 1 GB of memory, you'll need to add more in order to install 10.6. Preferably, install as much memory as it can take, according to the technical specifications.
    If the machine shipped with OS X 10.6, you need the installation media that came with it: gray installation discs, or a USB flash drive for some MacBook Air models. For early MBA models, you may need a USB optical drive or Remote Disc. You should have received the media from the original owner, but if you didn't, order replacements from Apple. A retail disc, or the gray discs from another model, will not work.
    To start up from an optical disc or a flash drive, insert it, then restart the computer and hold down the C key at the startup chime. Release the key when you see the gray Apple logo on the screen.
    If the machine shipped with OS X 10.7 or later, you don't need media. It should start up in Internet Recovery mode when you hold down the key combination option-command-R at the startup chime. Release the keys when you see a spinning globe.
    Some models shipped with OS X 10.6 and received a firmware update after 10.7 was released, enabling them to use Internet Recovery. If you have one of those models, you may not be able to reinstall 10.6 even from the original discs, and Internet Recovery may not work either without the original owner's Apple ID. In that case, contact Apple Support, or take the machine to an Apple Store or another authorized service provider to have the OS installed.
    1b. If you do own another Mac
    If you already own another Mac that was upgraded in the App Store to the version of OS X that you want to install, and if the new Mac is compatible with it, then you can install it. Use Recovery Disk Assistant to prepare a USB device, then start up the new Mac from it by holding down the C key at the startup chime. Alternatively, if you have a Time Machine backup of OS X 10.7.3 or later on an external hard drive (not a Time Capsule or other network device), you can start from that by holding down the option key and selecting it from the row of icons that appears. Note that if your other Mac was never upgraded in the App Store, you can't use this method.
    2. Partition and install OS X
    If you see a lock screen when trying to start up from installation media or in Recovery mode, then a firmware password was set by the previous owner, or the machine was remotely locked via iCloud. You'll either have to contact the owner or take the machine to an Apple Store or another service provider to be unlocked. You may be asked for proof of ownership.
    Launch Disk Utility and select the icon of the internal drive—not any of the volume icons nested beneath it. In thePartition tab, select the default options: a GUID partition table with one data volume in Mac OS Extended (Journaled) format. This operation will permanently remove all existing data on the drive.
    After partitioning, quit Disk Utility and run the OS X Installer. If you're installing a version of OS X acquired from the App Store, you will need the Apple ID and password that you used. When the installation is done, the system will automatically restart into the Setup Assistant, which will prompt you to transfer the data from another Mac, its backups, or from a Windows computer. If you have any data to transfer, this is usually the best time to do it.
    Then run Software Update and install all available system updates from Apple. To upgrade to a major version of OS X newer than 10.6, get it from the Mac App Store. Note that you can't keep an upgraded version that was installed by the original owner. He or she can't legally transfer it to you, and without the Apple ID you won't be able to update it in Software Update or reinstall, if that becomes necessary. The same goes for any App Store products that the previous owner installed—you have to repurchase them.
    3. Other issues
    If the original owner "accepted" the bundled iLife applications (iPhoto, iMovie, and Garage Band) in the App Store so that he or she could update them, then they're irrevocably linked to that Apple ID and you won't be able to download them without buying them. Reportedly, Mac App Store Customer Service has sometimes issued redemption codes for these apps to second owners who asked.
    If the previous owner didn't deauthorize the computer in the iTunes Store under his Apple ID, you wont be able to  authorize it immediately under your ID. In that case, you'll either have to wait up to 90 days or contact iTunes Support.
    When trying to create a new iCloud account, you might get a failure message: "Account limit reached." Apple imposes a lifetime limit of three iCloud account setups per device. Erasing the device does not reset the limit. You can still use an account that was created on another device, but you won't be able to create a new one. Contact iCloud Support for more information.

  • Updating with Host Arrays

    Hello,
    I would like to query the Oracle community about an item
    that is giving me some trouble.
    I am developping a real time data base for a utility and I
    have situation where I receive messages from the SCADA of which
    not all are included in the database (for example, the firmware
    of some SCADA components has not been programmed correctly and
    gives the wrong ID number); I have to update the data base and
    then resend to other process the messages I have received.
    Naturally I do not want to resend the messages that contain the
    wrong information, and as this is a real time data base, I try
    to use the fastest techniques available (to the best of my
    knowledge), in this case, host arrays.
    The trouble is, when updating with host arrays, if no data
    is found for a particular ID ( Error ORA-1403), oracle continues
    and follows on with the next item in the host array, which is
    great, but it does warn you (as far as I know), that that
    particulat member of the host array is not included in the data
    base.
    Is there any method with which I can find out which member
    (s) failed in the update? or which members succeded?
    Thanks!!!!
    null

    I found after testing that your response is correct.
    The database does not consider '0 rows updated' a true error condition, therefore sqlerrd[2] reports the number of rows that WERE updated,NOT the array offset of the row that did not get updated.
    Furthermore, through extensive testing, I have found that the behavior I was told to expect by Oracle is NOT how Oracle behaves. Specially, if I have 5 array items, and item 3 does not result in an update, sqlerrd[2] reports 4 - meaning 4 rows updated, not 2, meaning that the third array item failed to result in an update.
    If the first item does not result in an update, the second item results in an update, and the 3rd item results in an oracle error (field too large for instance),sqlerrd[2] does not return 2 as expected (indicating the error occured in array item 3) but instead returns a 1, indicating one row was updated before the error occurred.
    Test scenario as follows:
    for some table, col1 CHAR[10], col2 CHAR[3] with the following rows:
    200010, ABC
    200020, ABC
    200030, ABC
    200040, ABC
    200050, ABC
    The statement in the ProC code:
    UPDATE tablename SET col2 = :v1 where col1 = :v2;
    col1 array holds:
    200011
    200020
    200030
    200040
    200050
    col2 array holds:
    XYZ
    XYZ
    XYZZ <<< note field too long forcing Oracle error
    XYZ
    XYZ
    I would expect based on the documentation that sqlerrd[2] returns 2 (3rd array element results in Oracle error), but what happens instead is sqlerrd[2]
    returns 1 (indicating that one row was updated, col1=200020, before an error was encountered in 3rd element of array.
    If col2 array holds:
    XYZ
    XYZ
    XYZ
    XYZ
    XYZ
    I would expect based on the feedback in the TAR that sqlerrd[2] would return 0 indicating that the first array resulted in a 1403 - what I get is 4,
    indicating 4 rows were updated as a result of this array.

Maybe you are looking for

  • Creation of BW Query

    Hi, There is a thinking to allow some business users to create their own queries in QA system but to restrict them to save their queries in their favourites folder alone! Global client settings shouldn't be opened. Is there any way to achieve this? P

  • Creation of XSD from XML

    Hi SDN, Can anybody guide me to solve this problem. I have created a custom repository as per the requirement(repository has text fields, taxonomy fields etc). I have created a XSD structure using xomLite from the XML(by exporting from Console). Now

  • Query Builder in 10g Developer Suite

    I am accustomed to using previous versions of Oracle developer (2000,6 i...), and there was "Query Builder", which is very useful for us, especially when we do statistics and complex Reports. Now the Staff has chosen 10g Developer Suite that unfortun

  • Help me with this code please

    Hello, This is the first program that I have attempted to write alone....and I am stuck. I am trying to acquire data from a scope. I want the vi to only load the scope setup the first time the code is executed. Once the setup has been loaded I just w

  • Un installing third party software

    I've been unable to find any way of un installing non Mac third party software that I've installed, but now no longer want to be installed. Program is called 'Skype'.