Is it possible to obtain row #

when inserting a new record is it possible
to obtain the row # of the just inserted
record. Im using MS SQL 7.0
Thank u for your time

you can use getRow() to retrieve the current row number. Huh? I would guess that getRow() returns the row number in the result set, not in the table.
And there is this from the suggested link...
ResultSet.getRow() may return zero at certain, or even all, positions. Among other things, this means that usage of the valued ResultSet.last(), ResultSet.getRow() sequence to obtain the number of rows is not reliable across databases, or even drivers for the same database.

Similar Messages

  • IS it possible to obtain the username from a authentication  dialog box?

    Kind of simple question and I'm looking for a simple answer. Is it possible to obtain the username from the dialob box during java web start or not?

    I'm not really sure what you are asking but if you look at the Javadoc of System.getProperties() you will find a property named 'user.name' .

  • Is it possible to sort rows by font color in Numbers ?

    Is it possible to sort rows by font color in Numbers ?

    CC,
    You probably had something in mind when you applied the colors to the text. It's always best to record the conditions directly rather than to indicate them indirectly by by use of color.
    You can use Conditional Formatting to do some color coding based on the condition. You might even find that it's easier to let the conditional format tool than to assign the colors manually.
    Jerry

  • In a hierarchical query, is it possible for a row to have more than one immediate ancestor?

    Hi
    Question:
    In a hierarchical query, is it possible for a row to have more than one immediate ancestor?
    Answer:
    No
    No?  Surely, it's yes?
    Thanks,
    Jason

    As Frank pointed out already hierarhical most often means a tree (data structure) to deal with.
    There must usually be just one boss (the root) in which case the answer is no.
    Something to read: http://en.wikipedia.org/wiki/Tree_(data_structure)
    You can find out Solomon spoke about a generalization therein.
    Related to forum troubles:
    If I login first thing after reaching forum, the behaviour is rather consistent - I'm allowed to post answers, otherwise ...
    Regards
    Etbin

  • Possible to obtain phone IMEI number with flex mobile project?

    Just like the title says, is it possible to obtain phone IMEI number with flex mobile project? If not, does anyone know of another method to get a unique number to identify the phone being used (on android and iphone)? I'm asking because I'm building a chat application, and I need a way to potentially ban users based on something other than an IP address.
    edit: now that I think about it, an IMEI number might not be the best way, since wifi tablets may not hav an IMEI number, anyone have any other idea how I could get a number to identify a device that would already be present, because i'm afraid if its something generated by me, a simple uninstall and re-install could circumvent a ban.

    If this is an Android project, you can use this ANE:
    http://blog.snowflax.com/native-imei-action-script-extension-for-android/
    I have verified that it does work and provides the IMEI.  For cases where there is no IMEI ( bc the device is not a mobile phone, or it uses IMSI instead ), you can just bypass the device id check with your database, and enable full functionality.
    Although this is not full-proof, it will nevertheless screen a lot of devices.  With this, you can keep track of the number of app installs / resets, and add a 'banned' flag if you want to in your DB -- if you see unusal activity ( like:  unsually high number of re-installs ).
    ----->  UPDATE:
    I just found this ANE which  includes a class called 'SystemProperties', to find the IMEI/IMSI/serial/phone number on Android, and the MAC address on iOS:
    https://github.com/mateuszmackowiak/NativeAlert
    I have verified that the iOS part works, but haven't tried the Android side, yet.  Note: for iOS, it will also give you a UUID ( even though the object tag claims it is the UDID -- it's not ), which is worthless as a persistent means of identifying the device. since it gets reset on each app re-install.  So, for iOS, you have to use the MAC address, unless you are willing to store/restore the UUID into EncryptedLocalStore, as suggested by a user in:
    http://stackoverflow.com/questions/6794493/get-unique-identifier-mac-address-udid-etc-in-a dobe-air-for-ios

  • Re: Is it possible to change row colors on array fields ors

    HI Martin!
    Yes, it is possible to change row colors on array fields.
    I have attached a PEX (tools.pex) which has an object which changes FillColor
    and PenColor for Arrays. The PEX has it's own test window, so you can try
    various combinations. (There are a few other Objects in the Project which are
    not relevant
    I'm not sure that you can change colors on individual choices in a scroll list.
    I haven't tried playing around with it.
    The test window actually changes the color of scroll lists as well.
    The object keeps track of which rows have changed color, same with pen color, so
    that when you scroll it keeps track of which rows are a different colors.
    The pex is self-contained, just import the file and do a test run.
    Please let me know if you have any problems.
    -later
    -labeaux
    Is it possible to change row colors on array fields or scroll lists?
    I need to create a list field that will allow me to dynamically change the
    fillColor and/or penColor attributes of individual rows. (I just want to
    highlight the rows, and those seem to be the obvious attributes...) It appears
    you can't do that on scroll lists (the elements are list elements, and don't
    have those attributes) and I can't figure out how to do it on an array field
    either. Any ideas for how to accomplish this?
    -Martin ([email protected])

    FreshWebmuse,
    Version 2 of iCal has the "Group Calendar" feature. It was released as part of Mac OS X v10.4, and if you really want/need that feature you will have to upgrade to Tiger.
    ;~)

  • Is it possible to insert row with timestamp field without to TO_TIMESTAMP

    hello
    is it possible to insert row with timestamp column without using to_timestamp unction
    somthing like insert into app.master values (3,333, 'inser tmstmp', 6.7, '2010-11-10 15:14', 'f','9','2010-12-22')

    784633 wrote:
    hello
    is it possible to insert row with timestamp column without using to_timestamp unction
    somthing like insert into app.master values (3,333, 'inser tmstmp', 6.7, '2010-11-10 15:14', 'f','9','2010-12-22')If you don't like the answers in your previous thread (Re: how can i set timestamp format don't expect to get different answers just because you start a new thread.

  • Obtaining "rows selected" value after custom sql query in Database adaptor

    We are executing a custom query in a database adaptor. With other technologies (JDBC, etc.) the result of a query will not only produce a result set but a count of the number of rows selected. E.G. the script output of Oracle SQL Developer will print out something like:
    9999 rows selected
    at the end of the script output.
    I would like to obtain this value for a BPEL process. Of course, I could execute a 2nd query whose where clause is identical to the first, but selects count(*) instead. However, this is not only inefficient but (in rare circumstances in an active database) could be wrong.
    It is not obvious to this BPEL novice how to obtain the row selected value as well as the result set in one Invoke. Is this possible?

    This may not be the only solution - but it is how I have done it in the past.
    Following the invoke step of the adapter, use an assign/copy step to populate an integer BPEL variable using the count xpath function...
    <assign name="Initialize">
    <copy>
    <from expression="count(bpws:getVariableData('Invoke_Query_OutputVariable','MyTableQueryCollection','/ns3:MyTableQueryCollection/ns3:MyTableQuery'))"/>
    <to variable="NumberOfRecordsReturned"/>
    </copy>
    </assign>
    That should assign the number of records returned by the query.
    I hope that helps.
    Rod.
    Edited by: Rod Tunnels on Dec 15, 2009 1:16 PM

  • Is it still possible to obtain imovie HD?

    Friends,
    I have ilife 08 but I would like to obtain a version of imovie HD. Is it possible? I can't find a downloadable version on Apple's website.
    Thanks!
    Steve

    imovie HD did not want to read the movies I created in imovie 08. Any particular reason?
    iMovie 08 is NOT an upgrade of iMovie 06. It is a completely new application. iMovie 08 is better for absolute beginners that don't want to burn a DVD. Most others will like iMovie 06 for its far greater editing power and ease of making DVDs. (Like creating Chapter Markers and Share to iDVD.)
    I would restart with iMovie 06.

  • Problem obtaining row number in a TableView

    I have a TableView configured by means of a MapValueFactory as it is shown in the code below:
    private void configureColumns() {
        getColumns().clear();
        List<String> nonAnonymousVariablesNames = getNonAnonymousVariablesNames();
        if(nonAnonymousVariablesNames != null && !nonAnonymousVariablesNames.isEmpty()) {
            for(String nonAnonymousVarName : nonAnonymousVariablesNames) {
                TableColumn<Map<String, Term>, Term> dataColumn = new TableColumn<>(nonAnonymousVarName);
                dataColumn.setCellValueFactory(new MapValueFactory(nonAnonymousVarName));
                dataColumn.setMinWidth(130);
                Callback<TableColumn<Map<String, Term>, Term>, TableCell<Map<String, Term>, Term>>
                    cellFactoryForMap = new Callback<TableColumn<Map<String, Term>, Term>, TableCell<Map<String, Term>, Term>>() {
                        @Override
                        public TableCell call(TableColumn p) {
                            TextFieldTableCell tableCell = new TextFieldTableCell();
                            TableRow row = tableCell.getTableRow();
                            final int index = row.getIndex();
                            StringConverter sc = new StringConverter() {
                                @Override
                                public String toString(Object t) {
                                    //return something based on the current row and the object t
                                @Override
                                public Object fromString(String string) {
                                    return null;
                            tableCell.setConverter(sc);
                            return tableCell;
                dataColumn.setCellFactory(cellFactoryForMap);
                getColumns().add(dataColumn);
    I am trying to get the row number before printing the content of a cell. However, the call to row.getIndex(); triggers the following exception:
    SEVERE: javafx.scene.control.Control impl_processCSS The -fx-skin property has not been defined in CSS for TableRow[id=null, styleClass=cell indexed-cell table-row-cell]
    SEVERE: javafx.scene.control.Control loadSkinClass Failed to load skin 'StringProperty [bean: TableRow[id=null, styleClass=cell indexed-cell table-row-cell], name: skinClassName, value: com.sun.javafx.scene.control.skin.TableRowSkin]' for control TableRow[id=null, styleClass=cell indexed-cell table-row-cell]
    java.lang.NullPointerException
        at org.jpc.commons.prologbrowser.model.QueryResultModel$1.call(QueryResultModel.java:74)
        at org.jpc.commons.prologbrowser.model.QueryResultModel$1.call(QueryResultModel.java:1)
        at com.sun.javafx.scene.control.skin.TableRowSkin.recreateCells(TableRowSkin.java:224)
        at com.sun.javafx.scene.control.skin.TableRowSkin.<init>(TableRowSkin.java:87)
        at sun.reflect.GeneratedConstructorAccessor6.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
        at javafx.scene.control.Control.loadSkinClass(Control.java:1044)
        at javafx.scene.control.Control.access$500(Control.java:70)
        at javafx.scene.control.Control$12.invalidated(Control.java:972)
        at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:127)
        at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:161)
        at com.sun.javafx.css.StyleableStringProperty.set(StyleableStringProperty.java:71)
        at javafx.scene.control.Control$12.set(Control.java:964)
        at com.sun.javafx.css.StyleableStringProperty.applyStyle(StyleableStringProperty.java:59)
        at com.sun.javafx.css.StyleableStringProperty.applyStyle(StyleableStringProperty.java:31)
        at com.sun.javafx.css.StyleableProperty.set(StyleableProperty.java:70)
        at com.sun.javafx.css.StyleHelper.transitionToState(StyleHelper.java:902)
        at javafx.scene.Node.impl_processCSS(Node.java:7415)
        at javafx.scene.Parent.impl_processCSS(Parent.java:1146)
        at javafx.scene.control.Control.impl_processCSS(Control.java:1154)
        at com.sun.javafx.scene.control.skin.VirtualFlow.setCellIndex(VirtualFlow.java:1598)
        at com.sun.javafx.scene.control.skin.VirtualFlow.addTrailingCells(VirtualFlow.java:1114)
        at com.sun.javafx.scene.control.skin.VirtualFlow.layoutChildren(VirtualFlow.java:1007)
        at javafx.scene.Parent.layout(Parent.java:1018)
        at javafx.scene.Parent.layout(Parent.java:1028)
        at javafx.scene.Parent.layout(Parent.java:1028)
        at javafx.scene.Parent.layout(Parent.java:1028)
        at javafx.scene.Parent.layout(Parent.java:1028)
        at javafx.scene.Parent.layout(Parent.java:1028)
        at javafx.scene.Scene.layoutDirtyRoots(Scene.java:516)
        at javafx.scene.Scene.doLayoutPass(Scene.java:487)
        at javafx.scene.Scene.access$3900(Scene.java:170)
        at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2203)
        at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:363)
        at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:460)
        at com.sun.javafx.tk.quantum.QuantumToolkit$9.run(QuantumToolkit.java:329)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
    Is this a bug in JavaFX ? otherwise which is the correct way to obtain the row number in the string converter of the TextFieldTableCell ?

    To get the content of a cell you have to make  setCellSelectionEnabled(true);
    To get the selected row or selected column you can use the following: 
    {code}
            table.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
            table.getSelectionModel().setCellSelectionEnabled(true);
            table.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {
                @Override
                public void changed(ObservableValue observable, Object oldvalue, Object newValue) {
                    for (TablePosition t : (ObservableList<TablePosition>) table.getSelectionModel().getSelectedCells()) {
                        System.out.println("The selected column is: " + t.getColumn());
                        System.out.println("The selected row is: " + t.getRow());
    {code}
    If you need only the selected row  (TextFieldTableCell  selected)you can use the following:
    {code}
            table.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() {
                @Override
                public void changed(ObservableValue observable, Number oldvalue, Number newValue) {
                    System.out.println("Selected row is " + newValue);
    {code}

  • Is this type of query possible (select with rows stopping based on match)

    I'm trying to write a SQL query and suspect it can't be done. Or at least, I can't mentally grasp it, despite various stabs with subqueries. I've simplified it by changing the metaphor here a little.
    Let's say I have a truck in some city (say, Chicago). There are various roads leading out of that city, with routes we'll label according to compass points (N, NE, SW, etc.) Each truck can carry only one shipment. It starts going along its road, and as soon as it comes to a city that needs its shipment, it stops.
    Yes, a cooked example, but it's similar to my problem.
    Here is a table:
    TABLE: truck_routes
    scenario (integer - different possible scenarios)
    route (NE, SW, etc. - 8 compass directions)
    destination (cities along that road)
    sequence_number (order in which to go to those cities)
    So if I have a trucks in Chicago, I can say
    SELECT route, sequence_number, destination
    FROM truck_routes
    WHERE scenario = 10 (or whatever)
    ORDER BY road_out, sequence_number;
    And I'd get a report like this:
    SE 1 Gary
    SE 2 Valparaiso
    SE 3 Plymouth
    SE 4 Warsaw
    NE 1 Michigan City
    NE 2 Kalamazoo
    NE 3 Grand Rapids
    NE 4 Cadillac
    NE 5 Traverse City
    So far so good. I have another table with a list of cities that need to receive the shipment:
    TABLE: cities
    scenario (integer - different possible scenarios)
    route (NE, SW, etc. - 8 compass directions)
    destination (same keys as in truck_routes)
    e.g.:
    10 SE Valparaiso
    10 SE Warsaw
    10 NE Cadillac
    10 NE Traverse City
    Now...the tricky part...how do I rewrite the query above so that after a truck hits a city that needs a shipment (in that scenario) it stops? In other words, I want a report (for all routes) of what cities the truck will stop at - and as mentioned, it stops at the first one it makes a delivery. I don't want to see rows beyond that. So the report would look like this:
    SE 1 Gary
    SE 2 Valparaiso
    NE 1 Michigan City
    NE 2 Kalamazoo
    NE 3 Grand Rapids
    NE 4 Cadillac
    Gary shows up because it doesn't require a delivery. Valparaiso (SE route, sequence_number 2) shows up because it takes the delivery. The rest of the Southeast route doesn't show up. Same thing for the NE route.
    There are scenarios where I'd actually want to stop at the city just prior to the delivery destination, etc., and of course in the real world it's more complicated, but I think if I could get this model working I could flesh it out into a real-world query.
    I can certainly code something in PL/SQL to do this, or do it in application logic - but I'm wondering if there is a way to do it in a single SQL statement? I suspect there's something that could be built with subqueries and sorting, but...I can't quite reach it ;-)

    WITH report AS(
        SELECT 'SE' route, '1' seq_num, 'Gary' dest  FROM DUAL UNION ALL
        SELECT 'SE' route, '2' seq_num, 'Valparaiso' dest FROM DUAL UNION ALL
        SELECT 'SE' route, '3' seq_num, 'Plymouth' dest FROM DUAL UNION ALL
        SELECT 'SE' route, '4' seq_num, 'Warsaw' dest FROM DUAL UNION ALL
        SELECT 'NE' route, '1' seq_num, 'Michigan City' dest FROM DUAL UNION ALL
        SELECT 'NE' route, '2' seq_num, 'Kalamazoo' dest FROM DUAL UNION ALL
        SELECT 'NE' route, '3' seq_num, 'Grand Rapids' dest FROM DUAL UNION ALL
        SELECT 'NE' route, '4' seq_num, 'Cadillac' dest FROM DUAL UNION ALL
        SELECT 'NE' route, '5' seq_num, 'Traverse City' dest FROM DUAL 
    cities AS (
        SELECT '10' scenario, 'SE' route, 'Valparaiso' city FROM DUAL UNION ALL
        SELECT '10' scenario, 'SE' route, 'Warsaw' city FROM DUAL UNION ALL
        SELECT '10' scenario, 'NE' route, 'Cadillac' city FROM DUAL UNION ALL
        SELECT '10' scenario, 'NE' route, 'Traverse City' city FROM DUAL
    need_a_shipment AS (
          SELECT r.*
              , CASE WHEN EXISTS( SELECT 'Y' FROM cities c WHERE c.route = r.route AND c.city = r.dest )
                     THEN 'Y'
                     ELSE 'N'
                END need_a_shipment
        FROM report r
    SELECT  route
          , seq_num
          , dest
          , need_a_shipment
    FROM need_a_shipment n
    WHERE seq_num <= (  SELECT MIN(seq_num) FROM need_a_shipment
                        WHERE route = n.route AND need_a_shipment = 'Y' )
    ORDER BY route DESC, seq_num
    ROUTE SEQ_NUM DEST          NEED_A_SHIPMENT
    SE    1       Gary          N              
    SE    2       Valparaiso    Y              
    NE    1       Michigan City N              
    NE    2       Kalamazoo     N              
    NE    3       Grand Rapids  N              
    NE    4       Cadillac      Y

  • Working with VERY LARGE tables - is it possible to bypass row counting?

    Hello!
    For working with large result sets ADF provides the `Range Paging` mechanism for views, described in the 27.1.5 part of the Developer’s Guide For Forms/4GL Developers.
    It works well, but as a common mode it counts total row count to allow paging. In some cases query `select count(1) from (SELECT ...)...` can take very, very long time.
    But if a view object doesn't know row count (for example we can override getEstimatedRowCount() method ), paging controls doesn't appear in user interface.
    Meanwhile I suggest that it's possible to display two paging links - Prev and Next, without knowing row count. Is it a way to do it?
    Thank in advance,
    Ilya Rodionov.

    Hi Ilya,
    while you wait for Franks to dig up the right sample you can read this thread:
    Re: ADF BC: Performance issue with getEstimatedRowCount (ER?)
    There we discuss the exact issue.
    Timo

  • Is it possible to randomise rows of data in Numbers?

    I have over 100 rows of data (a mixture of numbers and words) on a numbers spreadsheet. This data was from survey responses and they were enterted in the order they were collected. However, i want the order to be random so that analysis can be as anonymous as possible. Therefore, is there a way to put rows of data in numbers into a random order?

    Sure. Add a column that has the formula = RAND() in every row.  Sort by that column. Each sort will create a new randomization.
    If you ever want it back in the original order, first add an "index" column (1,2,3,4 etc. down to the last row) so you can sort by that column to get back to the original order.

  • Is it possible to obtain the last IP address from which the device has displayed a message from Find My iPhone ?

    Hello, a couple of months ago my macbook got stolen so when yesterday i recieved an email my message was displayed on it i was wondering if there is a possibility to get the last IP address used on that machine .So if there is such possibility could someone direct me how to do it ?

    I'm sorry, but I'm still not clear on the problem. Do you mean that you have both "Smith Family" and "John Smith" tied to the same email address? If so, again, that "friendly" name isn't sent to the recipient, so the person receiving the email will get exactly the same thing regardless of whether you select the "Smith Family" entry or the "John Smith" entry. The "friendly" name doesn't go along as part of the email.
    It would only matter on your end when looking at your Sent email, and if that's an issue, it should be no problem to select which one you want; just start entering in the email address/name and wait a second; you'll get a dropdown with all the addresses that meet that criteria and you can just pick the correct one.
    Forgive me if I'm still not understanding what the difficult is or what you're trying to accomplish.

  • Sql Query : Sum , all the possible combination of rows in a table

    SQL Server 2008 R2
    Sample Table structure
    create table TempTable
    ID int identity,
    value int
    insert into TempTable values(6)
    insert into TempTable values(7)
    insert into TempTable values(8)
    insert into TempTable values(9)
    insert into TempTable values(10)
    I actually want something like below,
    that It returns rows such that, it has the sum of all the remaining rows , as shown below.
    I will ignore the repeated rows.
    6+7
    6+8
    6+9
    6+10
    6+7+8
    6+7+9
    6+7+10
    6+8+9
    6+8+10
    6+9+10 
    6+7+8+9
    6+7+8+9+10

    This makes no sense. What about NULLs? What about duplicate values? You have rows, so you have many combinations. We know that this set totals to 39, so there is no subset totals to half of any odd number.  19.5
    in this case. 
    None of your examples are
    even close! 
     6+7 = 13
    the remaining rows 8+9+10 = 27, so you failed! 
    Want to try again?
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

Maybe you are looking for