How do I insert into the next available primary key

Hello,
I am attempting to insert into an already populated database.
How do I use dreamweaver to get the next available PK record in a
MySQL database.
Thanks

If you do an insert it will go into the next available key.
Is that what
you mean?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"Mesh55" <[email protected]> wrote in
message
news:fo2trm$scl$[email protected]..
> Hello,
>
> I am attempting to insert into an already populated
database. How do I
> use dreamweaver to get the next available PK record in a
MySQL database.
>
> Thanks

Similar Messages

  • How to re-order automatically the number of primary key column in MySql that has been set as auto_increment if one of the row deleted?

    Hello,
    Can anyone show me the way how to re-oder automatically the number of primary key that has been set as auto_increment in mysql database when the row deleted?
    example:
    No (primary key=auto increment)|
    Name |
    AGE |
    1
        | JO
    | 21
    |
    2
        | Kyle
    | 25
    |
    3
        | Macy
    | 30
    |
    When delete 1 row:
    No (primary key=auto increment)|
    Name |
    AGE |
    1
        | JO
    | 21
    |
    2
        | Macy
    | 30
    |

    Hello,
    This is not a VB.NET question, best to ask this question in
    MySQL forum.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • Taking More Time while inserting into the table (With foriegn key)

    Hi All,
    I am facing problem while inserting the values into the master table.
    The problem,
    Table A -- User Master Table (Reg No, Name, etc)
    Table B -- Transaction Table (Foreign key reference with Table A).
    While inserting the data's in Table B, i need to insert the reg no also in table B which is mandatory. I followed the logic which is mentioned in the SRDemo.
    While inserting we need to query the Table A first to have the values in TableABean.java.
    final TableA tableA= (TableA )uow.executeQuery("findUser",TableA .class, regNo);
    Then, we need to create the instance for TableB
    TableB tableB= (TableB)uow.newInstance(TableB.class);
    tableB.setID(bean.getID);
    tableA.addTableB(tableB); --- this is for to insert the regNo of TableA in TableB.. This line is executing the query "select * from TableB where RegNo = <tableA.getRegNo>".
    This query is taking too much time if values are more in the TableB for that particular registrationNo. Because of this its taking more time to insert into the TableB.
    For Ex: TableA -- regNo : 101...having less entry in TableB means...inserting record is taking less than 1 sec
    regNo : 102...having more entry in TableB means...inserting record is taking more than 2 sec
    Time delay is there for different users when they enter transaction in TableB.
    I need to avoid this since in future it will take more time...from 2 sec to 10 sec, if volume of data increases mean.
    Please help me to resolve this issue...I am facing it now in production.
    Thanks & Regards
    VB

    Hello,
    Looks like you have a 1:M relationship from TableA to TableB, with a 1:1 back pointer from TableB to TableA. If triggering the 1:M relationship is causing you delays that you want to avoid there might be two quick ways I can see:
    1) Don't map it. Leave the TableA->TableB 1:M unmapped, and instead just query for relationship when you do need it. This means you do not need to call tableA.addTableB(tableB), and instead only need to call tableB.setTableA(tableA), so that the TableB->TableA relation gets set. Might not be the best option, but it depends on your application's usage. It does allow you to potentially page the TableB results or add other query query performance options when you do need the data though.
    2) You are currently using Lazy loading for the TableA->TableB relationship - if it is untriggered, don't bother calling tableA.addTableB(tableB), and instead only need to call tableB.setTableA(tableA). This of course requires using TopLink api to a) verify the collection is an IndirectCollection type, and b) that it is hasn't been triggered. If it has been triggered, you will still need to call tableA.addTableB(tableB), but it won't result in a query. Check out the oracle.toplink.indirection.IndirectContainer class and it's isInstantiated() method. This can cause problems though in highly concurrent environments, as other threads may have triggered the indirection before you commit your transaction, so that the A->B collection is not up to date - this might require refreshing the TableA if so.
    Change tracking would probably be the best option to use here, and is described in the EclipseLink wiki:
    http://wiki.eclipse.org/Introduction_to_EclipseLink_Transactions_(ELUG)#Attribute_Change_Tracking_Policy
    Best Regards,
    Chris

  • How do I print pictures from a disc inserted into the Apple Superdrive connected to the 2011 MacBook Air?

    How do i print pictures from a disc inserted into the Apple Superdrive connected to the 2011 MacBook Air by USB port?  Thanks

    How do i import them?  The only place i can find them is on "Finder" and I don't know how to get them to a place where I can print them.

  • How can I play only part of a song (stop the song short) during a slideshow in iphoto and fade into the next song?

    I am making a slideshow and I only want to play half of one song and fade into the next. How can I do this?

    You need an slideshow app that gives you more control over the Soundtrack.
    Alternatives to iPhoto's slideshow include:
    iMovie, on every Mac sold.
    Others, in order of price:  PhotoPresenter  $29
    PhotoToMovie  $49.95
    PulpMotion  $129
    FotoMagico $29 (Home version) ($149 Pro version, which includes PhotoPresenter)
    Final Cut Express  $199
    It's difficult to compare these apps. They have differences in capability - some are driven off templates. some aren't. Some have a wider variety of transitions. Others will have excellent audio controls. It's worth checking them out to see what meets your needs.  However, there is no doubt that Final Cut Express is the most capable app of them all. You get what you pay for.

  • Recipients of my email have been getting a bunch of scrambled code, letters and symbols, inserted into the body of my email - preceded by "span.IP". How to fix?

    Some recipients of my emails have been getting a bunch of code, letters and symbols, inserted into the email preceded by "span.IP". What is causing this and how can I fix it? Also (may be related) when i start up Thunderbird, I get the following error message:
    Secure connection failed
    live.mozillamessaging.com uses an invalid security certificate. The certificate is not trusted because no issuer chain was provided. (Error code: sec_error_unknown_issuer)
    This could be a problem with the server's configuration, or it could be someone trying to impersonate the server.
    If you have connected to this server successfully in the past, the error may be temporary, and you can try again later.
    Or you can add an exception…

    Browser Safeguard apparently attempts to intercept your secure connection to the server, so just uninstall it. Reboot your computer, and run a malware check.
    It's also possible that it issued certificates for secure sites you visit. Those self signed certs could then be used by IE, so you should get rid of them as well.
    In IE under Internet Options - Content tab click on Certificates. It opens to the Personal tab. Look for certificates issued by DO_NOT_TRUST_FiddlerRoot. Those are the ones created by Browser Safeguard.
    Both, Thunderbird and Firefox use their own certificate store independent from the Windows certificate store. So they should not be affected by those certs.
    For the future watch out for additional software being sneaked in when installing a program.

  • How to a composition from project insert into the current composition?

    How to a composition(specific name) from current project insert into the current composition?

    Good point about checking the name of the current comp, but then you don't need to enter the loop if the name ofthe object you find is the name of the current comp:
    function insertComp(name)
         var proj = app.project;
         var comp = proj.activeItem;
         if ( comp != null && comp instanceof CompItem)
              var foundIt = null;
              var curItem;
              if(comp.name != name)
                   for(var a=1; a<=proj.numItems && foundIt == null; a++)
                        curItem = proj.item(a);
                        if(curItem instanceof CompItem && curItem.name == name)
                               foundIt = curItem;
                   if (foundIt != null)
                        app.beginUndoGroup("Insert Comp");
                        try
                             comp.layers.add(foundIt);
                             alert("All done!");
                        catch (err)
                             alert(err);
                        app.endUndoGroup();
                   else
                        alert("Not found");
              else
                   alert("Can't add item to itself.");
         else
              alert("Open a comp first.");

  • How to show the next available number to populate

    I have a page which displays all of my columns.
    My second column are numbers. If the 3rd column is filled in, the data on all of the columns will be displayed including the 2nd column on this page.
    If the 3rd column is not filled in yet, only the next number of the 2nd column will be displayed somewhere on the page together with the rest of the data mentioned above. This number will be the next higher available number, or in other words, the next lowest number without something filled in for the 3rd column.
    So when I click on this number, I can go to the next page to at least populate column 3. Thanks.

    Let me see if I can explain better.
    I have a table with all fields displayed including the edit icon on the left.
    Let me see if I can illustrate this. Let the capital letters be columns of this table.
    And let the data be as shown under the lettered columns. Here is a hypothetical sample of the data. The ...... is just to make the spacing happen for the columns to line up in this example
    ..... A B C D E.........F
    edit 1 7 .c .d e 01-MAY-2008
    edit 1 8 .c .d e 02-MAY-2008
    edit....9...........-- would like to display this line
    I would like to display the next available number for column B (in this case number 9 since it is after 8) for me to be able to edit by filling in data in the rest of the columns.
    Now, for column B, I have number 9 all the way to say, 1000 available in the database but with no other data, just the number itself existing. Because these numbers (like 9) in column B have no data yet in colunm C, it will not be displayed in the table because there is no data to look at.
    So after I can add data to column C and maybe other columns, then when I apply changes will #9 and its data show up in the table after data 8 and then #10 will show up as the next number available to receive data where 9 use to appear.
    I hope this clarified it.

  • Copy a certain row of data into the next row in a same internal table ??

    HI, guys.
    May i know how to copy a certain row of data into the next row in a same internal table ?? Bcz I plan to update a certain colum of data in the row just now into another value..
    For example:-
    *at first...
    ebeln1   ebelp1   xblnr1
    ebeln2   ebelp2   xblnr2
    ebeln3   ebelp3   xblnr3
    *after that, become...
    ebeln1   ebelp1   xblnr1
    ebeln2   ebelp2   xblnr2
    ebeln2   ebelp2   xblnr4
    ebeln2   ebelp2   xblnr5
    ebeln3   ebelp3   xblnr3
    Thanks in advance.

    hi,
    If you have this kind of requirement then you must be having 2 internal tables ,one existing data and 2nd from which you have to insert the records into 1st table.
    so in this case,
    loop at itab1.
      v_index = sy-tabix.
      loop at itab2 into wa where pri_key = itab1-pri_key.
      v_index = v_index + 1.
      insert  wa into itab index v_index.
      endloop.
    endloop.
    Using this code ,your data records similar to your 1st tables primary key records will get inserted into table.

  • Is there a way to create a .dmg file for a DVD inserted into the system

    I am wondering if Snow Leopard has integrated any tools that can create a .dmg file for the CD or DVD inserted into the system?
    If not, any recommendations for freeware 3rd party tools? Thanks

    Insert the disc you want to create the .dmg from, then choose the disc in the left hand pane of Disk Utility. From the File menu, choose New > Disk Image from (name of disc).
    EDIT: This is basically how it's done; however, there may be other steps involved, depending on the type of disc you're trying to copy and what your goals are with the .dmg. If you provide more details about what you're trying to achieve, maybe we can help you further.
    Message was edited by: Tuttle

  • Bootcamp 5.1 Windows could not prepare the computer to boot into the next phase of installation

    I've searched the internet, I've tried solutions on some of the discussions on here:
    Windows 8.1 install fails on new 2013 Retina MacBook
    https://discussions.apple.com/message/23490854#23490854
    How to install Windows 8.1 on Haswell MBP
    https://discussions.apple.com/message/23545484#23545484
    Windows 8.1 Install Fails on New 2013 Retina MacBook, Users Report
    http://wind8apps.com/windows-8-1-install-fails-new-2013-retina-macbook/
    (Can't try this one because I don't have physical media or a burner and don't want to upgrade to 8.1)
    Tried maskedferret's and jarvil's instructions that might work for others but not for me. Also the process must be older version of disk utility. There is no "minus" to remove a partition in the one I have.
    Half the problem is those threads are so long with people posting up their problems that are not even the same problem. So then you have to sift through all these responses that aren't even really releated.
    If you're problem isn't this problem then please don't use this thread to solve another issue.
    “Windows could not prepare the computer to boot into the next phase of the installation. To install Windows, restart the installation.”
    I can't find in the release notes of any beta Maverick update that this is being addressed.
    1) Does anyone know if there is a fix coming out for this?
    2) Is there some solution that doesn't require to have physical media?
         a) I have Windows 8.1 iso and product key
         b) I have a 32gb USB stick that I had Bootcamp format
         c) I have a spare 16gb USB stick.  Both are USB 2.0 so I can't do Windows To Go. Maybe I should get one.
    3) I have no idea how tell which MacBookPro I have since no one at Apple seems to believe in model numbers. I just ordered it online two weeks ago and received it this week so I guess it's the "latest" model hardware wise.  Running 10.9
    The cloest possible solution I came across was to boot up Windows 8 OS on a USB stick (Not the install) and run diskpert or fdisk for mbr thought I can' try this out because I don't have Windows To Go.  I'd rather have it worked problem from Apple if I can figure out when they plan to update I might be willing to wait.

    Finally got a physical CD and to the third link option still same issue. Even worse actually as even after formating the partition I get a "Windows cannot be installed on this disk. The selected disk is of the GPT partition style"
    Found my "-" minus remove parition in Disk Utility. Will attempt maskedferret's again

  • ORA-22275 inserting into the CLOB column using ODBC input parameters

    Hi all,
    I'm having problem with INSERT into the CLOB column via bound input parameters.
    After calling SQLExecDirect() I'm getting following error:
    [Oracle][ODBC][Ora]ORA-22275: invalid LOB locator specified
    Adding defaults to the table definitions does not help. If I embed parameter values into the SQL statement - everything works just fine.
    I use Oracle 9.2 with latest Oracle ODBC driver 9.2.0.4 under Windows XP.
    Any ideas appreciated...
    Vlad
    Code looks like this:
    SQLBindParameter(hstmt,1,...);
    SQLBindParameter(hstmt,2,...);
    SQLBindParameter(hstmt,3,...);
    SQLExecDirect(hstmt,...);
    SQL statement looks like this:
    insert into tst_table (id,str_fld,clob_fld1,clob_fld2) values (50, ? , ? , ?)
    Table looks like this:
    CREATE TABLE tst_table (
         id          number (10,0)     NOT NULL ,
         str_fld          nvarchar2 (50)     NOT NULL ,
         clob_fld1     nclob          NOT NULL ,
         clob_fld2     nclob          NOT NULL ,
         CONSTRAINT PK_tst_table PRIMARY KEY
              id
    I tried to add defaults to the table, but result is the same:
    CREATE TABLE tst_table (
         id          number (10,0)               NOT NULL ,
         str_fld          nvarchar2 (50)               NOT NULL ,
         clob_fld1     nclob     default EMPTY_CLOB()     NOT NULL ,
         clob_fld2     nclob     default EMPTY_CLOB()     NOT NULL ,
         CONSTRAINT PK_tst_table PRIMARY KEY
              id

    You need to provide the data at execution time (i.e. SQL_LEN_DATA_AT_EXEC(0) in the SQLBindParameter followed by a series of SQLPutData calls). If you go to Metalink
    Top Tech Docs | Oracle ODBC Driver | Scripts & Sample Code
    has some sample code that shows you how to do this.
    Justin

  • Is it possible to have a link/button inserted into the end of my flash video that makes up the first page of my web site

    i am not sure if this will make sense so please tell me if it
    doesn't. is it possible to have a link/button inserted into the end
    of my flash video that makes up the first page of my web site. the
    video plays showing the name of the site then fades to show the
    text "enter" which i want to make the link to the next page.

    > the video plays showing the name of the
    > site then fades to show the text "enter"
    in FLASH set a gotourl action on the last frame of the move.
    If this is a "splash page" and has a dancing company logo and
    a throbbing
    drumbeat- reconsider. Just make the homepage of the website
    the homepage.
    Don't make people wait to see some content.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • CD-ROM drive letter changed to the next available letter after an issue with the Storage appliance.

    Server platform:Windows server 2008 R2 Enterprise.
    Last time we experienced an issue with the storage device we are using to  attach a disk to our server 2008 (virtual). This storage device is also providing storage to the ESX where the server 2008 is hosted.
    The drive configuration in the server was:
    System C:\
    Tools D:\
    Apps E:\
    CD-ROM F:\
    Some hours after the storage appliance issue, we realized the Application on the server was not working and then we restarted the server. After restarting the server we went to the file explorer and realized that the Apps volume had the drive letter F and
    the CD-ROM had the E letter assigned.
    I assume windows lost the Apps disk due to the SAN disconnection. Maybe the CD-ROM was also disconnected and when the Storage appliance was connected again the CD-ROM acquire the next drive letter it found, which was the letter E:. Then the Apps disk was
    also discovered by Windows and it assigned the next available letter, F:.
    I was looking for some MS knowledge base to see how Windows 2008 server assigns the letter to the CD-ROM and how we can permanently fix the letter assigned to the disks and the CD-ROM so that this issue won't happen again. As you know many applications use
    the path including the drive letter.
    I thought that when you set a CD-ROM drive letter, it remains forever as is, and that in case of a SAN disconnection Windows assigns the same letter the drive had before the disconnection.
    Please advice if you have some documentation about this. And let me know if you have any thoughts about what really happened to prevent this in the future.
    Thank you guys!! 

    Hi, for the APP's drive it could had been assigned a new letter if the system did seen it as a new disk/partition.
    The partition was on your esx's LUN on the SAN ? (not an iSCSI connection from inside a VM?)
    Regards, Philippe
    Don't forget to mark as answer or vote as helpful to help identify good information. ( linkedin endorsement never hurt too :o) )
    Answer an interesting question ? Create a
    wiki article about it!

  • How to move floats to the next page?

    Hi All,
    Can anyone help me on this?
    How to move floats to the next page the same position?
    Thanks in advance

    @Learner – you can duplicate the object to the next page and remove the original.
    If the original one is anchored you also have to account for its position, because duplicating an anchored object will move it.
    Here an example for duplicating a selected object to the same page.
    //DuplicateAnchoredObject_SELECTION_SNIPPET.jsx
    //Uwe Laubender
    * @@@BUILDINFO@@@ DuplicateAnchoredObject_SELECTION_SNIPPET.jsx !Version! Fri Apr 12 2013 07:53:31 GMT+0200
    var sel = app.selection[0];
    var x = sel.geometricBounds[1];
    var y = sel.geometricBounds[0];
    //The duplicate() method without an optional argument:
    var dup = sel.duplicate();
    //NOW: the duplicated objects is at the inner border of the page
    //To move it to its original position we need the following:
    var xd = dup.geometricBounds[1];
    var yd = dup.geometricBounds[0];
    dup.move(undefined,[x-xd,y-yd]);
    That snippet can be enhanced for duplicating to a certain page, because the duplicate() methods can take arguments like "Page", "Layer", "Spread" etc. For details see the DOM documentation at:
    http://www.jongware.com/idjshelp.html
    One caution here: to make that work the way you want with facing pages, you have to take into account, that your coordinate system must be changed to "per page" by the property "RulerOrigin" of the ViewPreferences.
    This said, here is a working example for duplicating a selected object to page 3 of the current document:
    //DuplicateAnchoredObject_TO-DIFFERENT-PAGE_SELECTION_SNIPPET.jsx
    //Uwe Laubender
    * @@@BUILDINFO@@@ DuplicateAnchoredObject_TO-DIFFERENT-PAGE_SELECTION_SNIPPET.jsx !Version! Tue May 14 2013 10:11:29 GMT+0200
    var d=app.documents[0];
    var oldRulerOrigin = d.viewPreferences.rulerOrigin;
    var sel = app.selection[0];
    var x = sel.geometricBounds[1];
    var y = sel.geometricBounds[0];
    //In case of facing pages we change the ruler origin:
    d.viewPreferences.rulerOrigin = RulerOrigin.PAGE_ORIGIN;
    //Duplication of selected object:
    var dup = sel.duplicate(d.pages[2]);
    //NOW: the duplicated objects is at the inner border of the page
    //To move it to its original position we need the following:
    var xd = dup.geometricBounds[1];
    var yd = dup.geometricBounds[0];
    dup.move(undefined,[x-xd,y-yd]);
    //Restore the original ruler origin:
    d.viewPreferences.rulerOrigin = oldRulerOrigin;
    Of course, thiese snippets are working also with not anchored objects…
    Uwe

Maybe you are looking for

  • How do I set up a new iphone so that contacts, calanders, and mail do not sync to the other phones in my houshold?

    I just purchased a new iPhone 4S for my 11 year old daughter. After setting it up today, and entering in our apple ID, all of my contacts appeared in her contact list, same with emails and messages. How do I set it up so that all my garbage isn't in

  • Windows Visual C++ error (?)

    I've been burning discs via ITunes for six months w/o issue. I recently started having a problem: After the cd burning finishes I get a quick audio blast followed by a 'Windows Visual C++' error tab on my bottom toolbar, and a rotating blue hourglass

  • Adobe Creative CS3 Design Premium - Problem with Photoshop CS3

    Hi, I have been trying to install Adobe Creative CS3 Design Premium for 2 days. The problem is when I try to install the software the Photoshop CS3 is gray out. I can install the all except the Photoshop. I have no idea what  is wrong but has failed

  • I'm new to Java, anyone want to lend a hand?

    Please copy my program in to Java and take a look. What I am trying to do is when the button is pressed to buy a Mr Big bar I want the quantity value to rise by one, only it doesn't. I have tried several things to no avail! I may be missing something

  • Strange behavior in inner query with group by clause

    Hi All, I found a very strange behaviour with Inner query having a group by clause. Please look the sample code Select b,c,qty from (select a,b,c,sum(d) qty from tab_xyz group by b,c); This query gives output by summing b,c wise. But when i run the i