Cursor%ROWCOUNT at start of cursor?

I want show the number of records pulled from the database in a report at the top of it.
E.g.
500 students match your request:
/* The students details here */
It seems ROWCOUNT increments each time just like a counter, is there a way to get the total number of rows returned at the start of the cursor.

Hi,
one way could to execute a COUNT(*) query before you execute the query which returns the data (not a efficient way). Which reporting tool you are using may be they have a knowing the count of records received.
thanks

Similar Messages

  • How to set  dynamic parameter in bean

    I want to set a change able paramerter in my bean what can I do?
    like
    db.setCatalog(" HkData "); hard code, work fine.
    but if
    public String getOurDatabase(){
    return ourDatabase;}
    public void setOurDatabase ( String ourDatabase ) {
    this.ourDatabase =ourDatabase; }
    what is the correct syntax in
    db.setCatalog(" ? ");

    Hi follow is my bean, I need code in ???? place
    Thank you
    package num;
    import java.util.*;
    import java.sql.*;
    public class NameBean1 implements java.io.Serializable {
      /* Member Variables */
      private String fieldNumber;
      private String name;
      private String hiTiter;
      private String subType;
      private String string;
      private String ourDatabase;
      /* ArrayLists to hold recordsets */
      private List fieldNumberList, nameList, hiTiterList, subTypeList;
      /* Helper Variables */
      private int currentRow;
      private int rowCount;
      private boolean anyRecords = false;
      private Connection db = null;
      private ResultSet rs=null;
      /* Constructor */
      public NameBean1() {
         again(); 
      /* Get Database Connection */
      private void dbConnect() {
        if (db == null) {
          try {
            Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
            db = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;selectMethod=cursor","test","1234");
           what is code in here????????
          catch (Exception e) {
            System.out.println("Error Connecting to catalog DB: " + e.toString());
      /* Accessor Methods */
      public String getfieldNumber() {
        return fieldNumber;
    /* one way to set data will get from database */
      public void setFieldNumber(String fieldNumber) {
         this.fieldNumber =fieldNumber;
      public String getName() {
        return name;
      public void setName(String _name) {
        name = _name;
      public String getHiTiter() {
        return hiTiter;
      public void setHiTiter(String _hiTiter) {
        hiTiter = _hiTiter;
       public String getSubType() {
        return subType;
      public void setSubType(String _subType) {
        subType = _subType;
    public  String getString(){
        return string;
    public void setString( String string ) {
       this.string =string;    }
    public void setOurDatabase(String ourDatabase){
            ourDatabase=ourDatabase;
    public String getOurDatabase() {
        return ourDatabase;
      /* Read-only attribute */
      public int getCurrentRow() {
        return currentRow;
      public int getRowCount() {
        return rowCount;
      /* Populate Record List */
      public boolean Mysearch() {
        /* If fieldNumberList is empty, then execute the query  */
        if (fieldNumberList.isEmpty()) {
          try {
                       Statement s = db.createStatement();
                        String Sql=" select ourDatabase.dbo.ViruName00.FieldNumber, Name, HiTiter, SubType, Storage";
                             Sql+=" from ourDatabse.dbo.ViruName00,ourDatabse.dbo.Storage00";
                             Sql+=" where ourDatabse.dbo.ViruName00.NewNum=ourDatabse.dbo.Storage00.NewNum and Name like'%"+string+"%'";
                             Sql+=" Union";
                             Sql+=" ourDatabse.dbo.select ViruName01.FieldNumber,Name, HiTiter,SubType, Storage";
                             Sql+=" from ourDatabse.dbo.ViruName01, ourDatabse.dbo.Storage01";
                             Sql+=" where ourDatabse.dbo.ViruName01.NewNum = ourDatabse.dbo.Storage01.NewNum and Name like'%"+string+"%'";
                             Sql+=" Union";
                             Sql+=" select ourDatabse.dbo.ViruName02.FieldNumber,Name, HiTiter, SubType,Storage";
                             Sql+=" from ourDatabse.dbo.ViruName02, ourDatabse.dbo.Storage02";
                             Sql+=" where ourDatabse.dbo.ViruName02.NewNum=ourDatabse.dbo.ourDatabse.dbo.Storage02.NewNum and Name like'%"+string+"%'";
                             Sql+=" Union";
                             Sql+=" select ViruName03.FieldNumber,Name, HiTiter, SubType, Storage";
                             Sql+=" fromourDatabse.dbo. ViruName03, ourDatabse.dbo.Storage03";
                             Sql+=" where ourDatabse.dbo.ViruName03.NewNum=ourDatabse.dbo.Storage03.NewNum and Name like'%"+string+"%'";
                rs = s.executeQuery (Sql);
            fieldNumberList.clear();
            nameList.clear();
            hiTiterList.clear();
            subTypeList.clear();
            rowCount = 0;
            while (rs.next()) {
               fieldNumberList.add(rs.getString("FieldNumber"));
               nameList.add(rs.getString("Name"));
               hiTiterList.add(rs.getString("HiTiter"));   
               subTypeList.add(rs.getString("SubType"));
               rowCount++;
              anyRecords = true;
            }//end while
          }//end try
          catch (Exception e) {
            System.out.println("Error populating productBean: " + e.toString());
        }//end if   
         return anyRecords; }//end function
    public boolean getAnyRecords() {
        return anyRecords;  }
      /* Reset current row */
      public void setStartRow(int start) {
        if (start < rowCount) {
          currentRow = start;
      /* Move to next row */
      public int nextRow() {
        if (currentRow == rowCount) {
          currentRow = 0; // Reset for next page request
          return 0; // return 0 to indicate end of recordset
        /* Populate bean properties with current row */
        setFieldNumber((String)fieldNumberList.get(currentRow));
        setName((String)nameList.get(currentRow));
        setHiTiter((String)hiTiterList.get(currentRow));
        setSubType((String)subTypeList.get(currentRow));   
        currentRow++;
        /* return currentRow*/
        return currentRow;
    public void again(){
        /* Initialize bean properties */
        setFieldNumber("");
        setName("");
        setHiTiter("");
        setSubType("");
        /* Initialize arrayLists to hold recordsets */
        fieldNumberList = new ArrayList();
        nameList = new ArrayList();
        hiTiterList = new ArrayList();
        subTypeList = new ArrayList();
         fieldNumberList.clear();
            nameList.clear();
            hiTiterList.clear();
            subTypeList.clear();
        /* Initialize helper variables */
        currentRow = 0;
        rowCount = 0;
        anyRecords= false;
        /* Get database connection */
        dbConnect();
      rs=null;
    }

  • Can I change scope in my jsp file ??

    Hi all,
    I have html form, jsp for display, bean for Logic and I want the project result is doing sarch in html file,
    bean handle the search in database, and display in jsp, since the database is big, the result is lot, so I want my search result be display 10 recode per page there for I had to use session in my display jsp file.but that bother my new search, if I don't reopen my browns I can't do the new search, like first I search chicken it has over 400 recods, then I jump back to my html file and want to search by duck , I still got the result chicken, if I change my scope to request then is easy to start a new search but can't do to next.
    any ideal??

    Hi,
    The problem still at handle continue search and a new search. i add a again method in my jsp file and can handle new search and old session for few search then get error
    IndexOutOfBoundsException: Index: 60, Size: 4
    <html>
    <head>
         <title>select List</title>
    </head>
    <body>
    <basefont face="Arial">
    <%@ page import = "num.NameBean" %>
    <jsp:useBean id="ViruName" scope="session" class="num.NameBean"/>
    <jsp:setProperty name="ViruName" property="*"/>
    </jsp: useBean>
      <%
       if (ViruName.getString()==null){%>
        <center>
         Sorry, you nedd to enter something for search!
      <br>
    <font size=-1>(Please hit the browser 'back' button to continue)</font><br>
    </center>
    <%}else{%>
    <table align="center" width="600"border="1">
         <tr>
              <td width="20%"><b>FieldNumber</b></td>
              <td width><b>Name</b></td>
              <td width="30%"><b>HiTiter</b></td>
              <td width="30%"><b>SubType</b></td>
         </tr>
    <%
         int rowCount = 0;
         int startRow = 0;
         if (ViruName.Mysearch()) {
              String start = (String) request.getParameter("start");
              if (start != null) {
                   startRow = new Integer(start).intValue();
                   ViruName.setStartRow(startRow);
              while (rowCount < 10 && ViruName.nextRow() > 0) {
                   rowCount++;
    %>
         <tr>
                   <td width="10%"><jsp:getProperty name="ViruName" property="fieldNumber"/></td>
                    <td width="30%"><jsp:getProperty name="ViruName" property="name"/></td>
              <td width="30%"><jsp:getProperty name="ViruName" property="hiTiter"/></td>
              <td width="30%"><jsp:getProperty name="ViruName" property="subType"/></td>
         </tr>
    <%
              }//end while
         }//end if
    %>
    </table>
         <!-- Display the back and next links -->
                   <a href="?start=<%= ViruName.getCurrentRow() %>">Next</a>
                            <% ViruName.again();%>
                     <a href ="test.html">new search</a>
    <%
    %>
    </body>
    </html>
    package num;
    import java.util.*;
    import java.sql.*;
    public class NameBean implements java.io.Serializable {
      /* Member Variables */
      private String fieldNumber;
      private String name;
      private String hiTiter;
      private String subType;
      private String string;
      private String text=null;
      /* ArrayLists to hold recordsets */
      private List fieldNumberList, nameList, hiTiterList, subTypeList;
      /* Helper Variables */
      private int currentRow;
      private int rowCount;
      private Connection db = null;
      /* Constructor */
      public NameBean() {
        /* Initialize bean properties */
        setFieldNumber("");
        setName("");
        setHiTiter("");
        setSubType("");
        /* Initialize arrayLists to hold recordsets */
        fieldNumberList = new ArrayList();
        nameList = new ArrayList();
        hiTiterList = new ArrayList();
        subTypeList = new ArrayList();
        /* Initialize helper variables */
        currentRow = 0;
        rowCount = 0;
        /* Get database connection */
        dbConnect();
      /* Get Database Connection */
      private void dbConnect() {
        if (db == null) {
          try {
            Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
            db = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;selectMethod=cursor","test","1234");
            db.setCatalog("HKData");          
          catch (Exception e) {
            System.out.println("Error Connecting to catalog DB: " + e.toString());
      /* Accessor Methods */
      public String getfieldNumber() {
        return fieldNumber;
    /* one way to set data will get from database */
      public void setFieldNumber(String fieldNumber) {
         this.fieldNumber =fieldNumber;
      public String getName() {
        return name;
      public void setName(String _name) {
        name = _name;
      public String getHiTiter() {
        return hiTiter;
      public void setHiTiter(String _hiTiter) {
        hiTiter = _hiTiter;
       public String getSubType() {
        return subType;
      public void setSubType(String _subType) {
        subType = _subType;
    public  String getString(){
        return string;
    public void setString( String string ) {  
       this.string =string;    }
      /* Read-only attribute */
      public int getCurrentRow() {
        return currentRow;
      /* Populate Record List */
      public boolean Mysearch() {
        /* If prodIDList is empty, then execute the query to populate it */
        if (fieldNumberList.isEmpty()) {
          try {
                       Statement s = db.createStatement();
                      String Sql="select ViruName00.FieldNumber, Name, HiTiter, SubType, Storage";
                             Sql+=" from ViruName00, Storage00";
                             Sql+=" where ViruName00.NewNum=Storage00.NewNum and Name like'"+string+"%'";
                            Sql+=" Union";
                             Sql+=" select ViruName01.FieldNumber,Name, HiTiter,SubType, Storage";
                            Sql+=" from ViruName01, Storage01";
                             Sql+=" where ViruName01.NewNum=Storage01.NewNum and Name like'"+string+"%'";
                            Sql+=" Union";
                             Sql+=" select ViruName02.FieldNumber,Name, HiTiter, SubType,Storage";
                             Sql+=" from ViruName02, Storage02";
                             Sql+=" where ViruName02.NewNum=Storage02.NewNum and Name like'"+string+"%'";
                             Sql+=" Union";
                             Sql+=" select ViruName03.FieldNumber,Name, HiTiter, SubType, Storage";
                             Sql+=" from ViruName03, Storage03";
                             Sql+=" where ViruName03.NewNum=Storage03.NewNum and Name like' "+string+"%'";
               ResultSet rs = s.executeQuery (Sql);
            fieldNumberList.clear();
            nameList.clear();
            hiTiterList.clear();
            subTypeList.clear();
            rowCount = 0;
            while (rs.next()) {
              fieldNumberList.add(rs.getString("FieldNumber"));
              nameList.add(rs.getString("Name"));
              hiTiterList.add(rs.getString("HiTiter"));   
              subTypeList.add(rs.getString("SubType"));
              rowCount++;
          catch (Exception e) {
            System.out.println("Error populating productBean: " + e.toString());
            return false;
        /* Return status of operation (assume success if it made it this far) */
        return true;
      /* Reset current row */
      public void setStartRow(int start) {
        if (start < rowCount) {
          currentRow = start;
      /* Move to next row */
      public int nextRow() {
        if (currentRow == rowCount) {
          currentRow = 0; // Reset for next page request
          return 0; // return 0 to indicate end of recordset
        /* Populate bean properties with current row */
        setFieldNumber((String)fieldNumberList.get(currentRow));
        setName((String)nameList.get(currentRow));
        setHiTiter((String)hiTiterList.get(currentRow));
        setSubType((String)subTypeList.get(currentRow));   
        currentRow++;
        /* return currentRow*/
        return currentRow;
    public void again(){
        fieldNumberList.clear();
            nameList.clear();
            hiTiterList.clear();
            subTypeList.clear();
    }

  • How do i create an ssis package that transforms data from a text file?

    I have a text file with data that in the following  format; i want this data in columns with the appropriate heading. Any ideas??
    Name – Tony
    Married – 2 children (Girl:3, Boy:1)
    AddressLine1: 10 Sunnhill Ave
    AddressLine2: Streatham
    AddressLine3: London
    PostCode:  SW18 7NN
    Name – Sarah
    Married – 2 children (Girl:3, Boy:1)
    AddressLine1: 10 High St
    AddressLine2: Streatham
    AddressLine3: London
    PostCode:  TW18 7NN
    Name – Tom
    Married – 2 children (Girl:3, Boy:1)
    AddressLine1: 10 Bridge Ave
    AddressLine2: Hammersmith
    AddressLine3: London
    PostCode:  TF20 8HN
    sukai

    I don't see how you're going to pivot that using SSIS.  I happen to know VBA pretty well, and I'll give you this Macro, which should do what you want.
    Sub CombineRows()
    lastRow = Range("A" & Rows.Count).End(xlUp).Row
    'set rowcount to row where you want 1st entry
    RowCount = 1
    NewRow = RowCount
    Start = False
    Do While RowCount <= lastRow
    If Start = False Then
    If Range("A" & RowCount) <> "" Then
    Start = True
    StartRow = RowCount
    End If
    Else
    If Range("A" & (RowCount + 1)) = "" Then
    ColCount = 1
    For MoveRow = StartRow To RowCount
    Cells(NewRow, ColCount) = Cells(MoveRow, "A")
    ColCount = ColCount + 1
    Next MoveRow
    NewRow = NewRow + 1
    Start = False
    End If
    End If
    RowCount = RowCount + 1
    Loop
    Rows(NewRow & ":" & lastRow).Delete
    End Sub
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • How do I create an installation package

    Apologies, but I am a newbie^2 when it comes to Apple installations. I have a product I use to bundle my software on windoz (it creates a .exe file). I now have a Mac version of my software so I want to make it easy for Joe User to install it on a Macbook.  I don't want to go through a massive SDK experience. I just want brain dead software that will gather up a shallow hierarchy of files, one of which is an OS executable. It needs to make the executable available to the user as well as create an application folder in a well known place where it can dump data when the user requests this
    Is there very simple bundling software someone can point me to? If the SDK is the way to go, a few pointers will be appreciated.
    Thanks in advance.
    -D

    I don't see how you're going to pivot that using SSIS.  I happen to know VBA pretty well, and I'll give you this Macro, which should do what you want.
    Sub CombineRows()
    lastRow = Range("A" & Rows.Count).End(xlUp).Row
    'set rowcount to row where you want 1st entry
    RowCount = 1
    NewRow = RowCount
    Start = False
    Do While RowCount <= lastRow
    If Start = False Then
    If Range("A" & RowCount) <> "" Then
    Start = True
    StartRow = RowCount
    End If
    Else
    If Range("A" & (RowCount + 1)) = "" Then
    ColCount = 1
    For MoveRow = StartRow To RowCount
    Cells(NewRow, ColCount) = Cells(MoveRow, "A")
    ColCount = ColCount + 1
    Next MoveRow
    NewRow = NewRow + 1
    Start = False
    End If
    End If
    RowCount = RowCount + 1
    Loop
    Rows(NewRow & ":" & lastRow).Delete
    End Sub
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • Why does my cursor not automatically select the entire word when I try to select text by starting/ending in the middle of a word?

    In any other browser I've used (or word processor, for that matter) when I select text using my mouse cursor, if I start and/or end in the middle of a word, it automatically selects the whole word when I'm selecting more than one word. But for some reason this is not happening in Firefox. If I try to select say 3 words, and I start in the middle of the first word and end in the middle of the last word, it will only select those parts, not all 3 words entirely.

    Firefox allows to select part of a word. You can select a word with a double click and use Shift + left click to set the end of the selection, so you need to click at the end of the last word instead of in it.

  • My cursor recently started to dissapear when im not using it but when i press a key it flashes back for a second... how do i fix this?

    Well I'm a frequent Firefox user ad recently my cursor has started to dissapear when I'm not moving it. However when i press a key it flashes back for a second also, when I'm moving it flickers a lot (one moment its there one moment it isn't). How do i fix this?
    == This happened ==
    Every time Firefox opened
    == Earlier today (july 20th 2010)

    Never saw this problem until today, first on Facebook, then on these Mozilla support pages. I had one Firefox window with multiple FB and Mozilla tabs open.
    Here's my observations: On the FB and Mozilla pages, the cursor (arrow/hand) acted identical and as described here, would disappear after 2-3 seconds of inactivity or non-motion, then instantly reappear with mouse movement or key strike but only momentarily if no further motion/action occurred. Interestingly, I also had one FoxNews tab (actually FoxNewsInsider) open, and observed slightly different activity. The Cursor/hand would disappear as described above, but instead of staying invisible, it flashed on /off for what appeared to be <1 second on then <1 second off, until mouse movement or key strike. Now, here's the really interesting part ... When I opened a second FoxNewsInsider tab, the problem corrected itself with no direct action on my part to resolve the issue. I was going to close all tabs, then Firefox and perform the system reboot to correct this annoyance ... but, still have not seen the problem.
    Okay, I'm not going to say viewing FoxNewsInsider webpages not only provides one perspective on news, and the added benefit of fixing cursor/hand problems .. but maybe there's some to being well informed ... Sorry folks, couldn't resist ... :) I will be watching for the disappearing cursor issue again, and will reply here with any updates or changes in my observations.

  • Blank Screen with cursor after login Windows 7, Unable to start new tasks

    My problem is similar to the well know Windows 7 Black Screen as referenced by Prevx, though different. When I boot my Windows 7 computer, the login screen appears as always. Following entering the password for default user,
    the screen will give the impression of login, but the final result is a plain black screen with the cursor only. The black screen appears indefinitely and the Windows GUI never appears. The only available option from booting in normal mode with this is Ctrl-Alt-Del
    (Task Manager). From analyzing another computer with Windows 7 Professional, my Task Manager is missing the following user processes: dwm.exe, explorer.exe, and taskhost.exe. Additionally, it is missing the following system processes (possibly irrelevant):
    spoolsv.exe and wmiprvse.exe.
    When I attempt to start a new process using Windows Task Manager, an error message will appear saying “Windows Task Manager has stopped working” and forces you to close Windows Task Manager. This includes starting
    any process such as cmd or explorer.
    I attempted to boot into safe mode. 
    The result was the same as above. Then I attempted booting into safe mode with command prompt. This showed some hope. Following authentification from the login screen, the command prompt appears with the same blank screen with a cursor behind it. Initially
    I attempted to run msconfig.msc to run a clean startup. System Configuration Utilities opens briefly then displays the error same as above. “System Configuration Utility has stopped working” and again forces the program to close. Then I tried to
    open regedit. This works with no error messages! So I have access to the registry, but have no idea what I should modify to get my computer running normally.
    Things I have tried:
    1)   
    Restoring to last know good configuration. (No result)
    2)   
    Repairing Windows configuration. (No result)
    3)   
    Scanning the drive 3 separate times for viruses with both Avast and Symantec. (No viruses detected)
    4)   
    Repairing the REG_SZ value HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell as proposed in
    http://social.technet.microsoft.com/Forums/en/w7itprogeneral/thread/5b94b775-992e-4f48-b3ff-c89b3cf45e82
    5)   
    Executing Prevx’s fix file as proposed in
    http://www.prevx.com/blog/140/Black-Screen-woes-could-affect-millions-on-Windows--Vista-and-XP.html
    Any ideas are much appreciated.
    Thanks,
    John

    Same problem  I've found a solution.
    #1 Hit fastly 5 time the left shitf button on your keyboard.
    A windows will appaers to know if you want to caps lock. Keep it open
    #2 Alt-CTRL-Del
      You have know your desktop
    #3 Go on add-remove programme
    3a) Go on windows add-remove
    3b) Remove internet explorer
    ok-ok-ok - untill it's remove and ask to restart
    #4 No more problem. You have to go on the net with chrome or firefox.

  • Since downloading Firefox 4, I am having problems archiving gmail conversations from my inbox view. Also, when I go to enter a new event in google calendar, I now have to click the cursor in the box to type the event (it used to let me just start typing).

    Since downloading Firefox 4, I am having problems archiving gmail conversations from my inbox view (either one or several conversations) as it says "No Conversations Selected" when I have selected one or several. Also, when I go to enter a new event in google calendar, I have to click the cursor in the box to type the event (it used to let me just start typing) or else it flips out and starts jumping to day view or another month. Does anyone know how to fix either of these?

    I have had this problem; but while trying to fix another problem, I reset my preferences for Firefox and it fixed this problem as well. To reset preferences, follow this link: http://support.mozilla.com/en-US/kb/Resetting%20preferences

  • In firefox, whenever i have my mouse over the page (not the toolbar section), any selection i have moves. For example - a text entry box and the cursor keeps returning to the start of the box. This is only in firefox, everything else works fine (IE and Ch

    I have an issue with FF. Whenever I have my mouse on the page (not the toolbar area) any selection I make gets altered in the following way:-
    Text boxes - The cursor keeps moving to the left.
    "Radio" buttons - Selection keeps moving up.
    This is only happening in FF, I am not seeing this behaviour in Chrome or IE.
    == This happened ==
    Every time Firefox opened

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    You can use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    You have to close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • My Power Mac G5 is freezing up. A few days ago my G5 started freezing up, the cursor is unresponsive and none of the keys have any use. I have to press the power button to shut down and then restart. Sometimes on the restart, instead of the Apple logo I g

    A few days ago my G5 started to freeze up while in use. It doesn't matter if in Safari, iTunes, Pages, etc. The cursor will not respond nor does any keystroke, force quit, escape, etc. I have to hold the power button down to shut the computer down. Then, try to restart. Sometimes restart will work and the computer will work for a while and then freeze again. Other times on restart, instead of the Apple logo at start up, I get a Zero with a line thru it, have to power off and restart again. When it does restart, the "spinning gear" takes a lot longer than normal to spin up and take me to the login screen. Have been told it may be my hard drive getting ready to fail. Have looked at disk utilities, S.M.A.R.T looks fine, "verified" and have verified disk, and repaired permissions. In case it is the hard drive, I bought external hard drive and hooked it up to Time Machine. The backing up to a long time, overnight, about 10 hours because it kept freexing up and I would have to shut down and try restarting again. Finally got everything backed up.
    Any help or suggestions greatly appreciated!!!   Could it be my hard drive is dying? Is the the normal chain of events or is it something else???

    Ok, to copy the Drive from one to another, get carbon copy cloner to make an exact copy of your old HD to the New one...
    http://www.bombich.com/software/ccc.html
    Or SuperDuper...
    http://www.shirt-pocket.com/SuperDuper/
    Believe it or not, anything on the Desktop uses 3 times the Resources of the Mac than if stored elsewhere, I can note a slowdown from just 30 items on the Desktop on a really fast Mac, so the less the better on the Desktop.
    DW will not tell you about Bad Sectors, it's just the very best at Repair Directory damage & such.
    At this point I think you should get Applejack...
    http://www.macupdate.com/info.php/id/15667/applejack
    After installing, reboot holding down CMD+s, (+s), then when the DOS like prompt shows, type in...
    applejack AUTO
    Then let it do all 6 of it's things.
    At least it'll eliminate some questions if it doesn't fix it.
    The 6 things it does are...
    Correct any Disk problems.
    Repair Permissions.
    Clear out Cache Files.
    Repair/check several plist files.
    Dump the VM files for a fresh start.
    Trash old Log files.
    First reboot will be slower, sometimes 2 or 3 restarts will be required for full benefit... my guess is files relying upon other files relying upon other files! :-)
    Disconnect the USB cable from any Uninterruptible Power Supply so the system doesn't shut down in the middle of the process.

  • Windows 7 on Boot Camp stuck at black screen with blinking cursor... starts up fine in Parallels desktop

    Hi,
    Recently my dad's Windows 7 (Ultimate 64-bit) on his Mac Pro has stopped working. It gets stuck at a black screen with a blinking cursor. I've waited at least five minutes and it doesn't do anything, I have to power it off.
    However it starts up perfectly fine and intact in Parallels desktop. If I insert the original installation DVD and boot from the Disc that says 'Windows' it will boot into the partition and work fine, unless I press a key to boot from the DVD.
    I find both these things to be strange. The partition is backed up, which is fine, but I'd rather not have to re-install it if possible.
    I have booted from the DVD and tried to repair the disk. It said it found a problem with something related to startup and that it needed to restart to repair it. I clicked yes, and then held alt/opt and (I think wrongly) booted back into the disc rather than the Windows partition. However it now says that it can't detect any problems.
    In the repair my computer section when booting from the DVD, it detects the OS as Windows Vista Business. I followed these steps I found online:
    Fixed! Peroblem was I think using OEM, which Bootcamp advise against using... they advise to use retail only. Fixed like this:
    1. Put the Windows 7 installation disc in the disc drive, and then start your computer.
    2. Hold down Option key till all available disks are displayed and select DVD. Press a key when you are prompted.
    3. Select a language, a time, a currency, a keyboard or an input method, and then 4. click Next.
    5. Click Repair your computer.
    6. Click the operating system that you want to repair, and then click Next.
    7.In the System Recovery Options dialog box, click Command Prompt.
    Type (these commands are safe)
    Code: Bootrec.exe /FixMbr
    Code: Bootrec.exe /FixBoot
    Code: Bootrec.exe /RebuildBcd
    *Press ENTER after each command.*
    *Restart your computer.*
    Done. Rockin'
    FixMbr was successful, as was FixBoot. However RebuildBcd reported that it found no Windows installations.
    Does anyone know what could be wrong here? I should note that recently I removed the drive Windows 7 is installed on and put it back in. Also Windows Updates probably have been done by my dad. Not sure if they could be the problem.

    Cult, welcome to the forum.
    It sounds like you have a failing power supply unit (PSU).  This will cause the symptoms that you describe.  If the computer isn't getting enough power, it can cause numerous problems.  You can try disconnecting any unnecessary components to see if it will boot.  Here is a guide to help you troubleshoot the problem.
    Please click "Accept as Solution" if your problem is solved.
    Signature:
    HP TouchPad - 1.2 GHz; 1 GB memory; 32 GB storage; WebOS/CyanogenMod 11(Kit Kat)
    HP 10 Plus; Android-Kit Kat; 1.0 GHz Allwinner A31 ARM Cortex A7 Quad Core Processor ; 2GB RAM Memory Long: 2 GB DDR3L SDRAM (1600MHz); 16GB disable eMMC 16GB v4.51
    HP Omen; i7-4710QH; 8 GB memory; 256 GB San Disk SSD; Win 8.1
    HP Photosmart 7520 AIO
    ++++++++++++++++++
    **Click the Thumbs Up+ to say 'Thanks' and the 'Accept as Solution' if I have solved your problem.**
    Intelligence is God given; Wisdom is the sum of our mistakes!
    I am not an HP employee.

  • My Macbook Pro (OSX 10.6.7 2.26 GHz Intel Core 2 Duo) has started misbehaving on me. When I'm working, the cursor will start spontaneously moving to the left in a straight line, and randomly right clicking on things.  If I close the computer and open it b

    my Macbook Pro (OSX 10.6.7 2.26 GHz Intel Core 2 Duo) has started misbehaving on me. When I'm working, the cursor will start spontaneously moving to the in a straight line, and randomly right clicking on things.
    If I close the computer and open it back up, it sometimes stops for a little while, then will spontaneously start again. Any help would be truly appreciated. Thanks!

    See this knowledge base article. Also, you might want to update to 10.6.8 (don't know that that will fix your problem, but it's the latest version of Snow Leopard).
    Clinton

  • HACKED! Someone just took control of my cursor while I was on the Internet! They started to open files and search through stuff but I immediately shut down my computer! I have been hacked and I need to know how to fix my problem???

    I was watching a YouTube video when my cursor suddenly started to control itself. I had screen sharing on and remote login etc. but I have disabled all of them! I'm writing this from my IPhone because I refuse to go back online with my MacBook Pro until I know I won't be hacked again! Please inform me on my best options and where my problem might be stemming from! If it helps I will inform you that I do stream illegal Tv-Shows online and download music torrents, I'm fussing that's why all of this happened! I need to know if I can disinfect my Mac or if ill have to completely wipe it and restore it? Thanks!

    There are several possible causes for this issue. Take each of the following steps until it's resolved.
    1. Follow the instructions in this support article.
    2. Reset the System Management Controller.
    3. If you're using a Bluetooth trackpad, investigate potential sources of interference, including USB 3 devices.
    4. A swollen battery in a MacBook Pro or Air can impinge on the trackpad from below and cause erratic behavior. If you have trouble clicking the trackpad, this is likely the reason. The battery must be replaced.
    5. There's a report that a (possibly defective) Thunderbolt Ethernet adapter can cause the built in trackpad of a MacBook to  behave erratically. If you're using such an adapter, disconnect it and test.
    6. There's also a report of erratic cursor movements caused by an external display that was connected but not turned on.
    7. If none of the above applies, or if you have good reason to think your computer is being controlled remotely, remove it from the network by turning off Wi-Fi, disconnecting from a Bluetooth network link, and unplugging the Ethernet cable or USB modem, whichever is applicable. If the cursor movements stop immediately, you should suspect an intrusion.

  • Hard disk in mums macbook failed, bought a new one, formatted it first. Have tried starting it with every possible key and I either get flashing question mark folder or a cursor.

    Hard disk in mums macbook failed, bought a new one, used sata adapter cable to format it for mac first. Connected it and have tried starting it with every possible key combination and I either get flashing question mark folder or a cursor. A disk is stuck in it so I can't boot from OSX, and yes I have tried every option of starting to try and eject disk but none work. HELP ME!

    Five ways to eject a stuck CD or DVD from the optical drive
    Ejecting the stuck disc can usually be done in one of the following ways:
      1. Restart the computer and after the chime press and hold down the
          left mouse button until the disc ejects.
      2. Press the Eject button on your keyboard.
      3. Click on the Eject button in the menubar.
      4. Press COMMAND-E.
      5. If none of the above work try this: Open the Terminal application in
          your Utilities folder. At the prompt enter or paste the following:
            /usr/bin/drutil eject
    If this fails then try this:
    Boot the computer into Single-user Mode. At the prompt enter the same command as used above. To restart the computer enter "reboot" at the prompt without quotes.
    If you have a 2010 MBP or later, then you can use Internet Recovery. Start by rebooting the computer. At the chime press and hold down the COMMAND-OPTION-R keys until a Globe appears in the upper part of the screen. This process can take upwards of 15 minutes to get connected to the Apple network servers. You should eventually see the utility screen of the Recovery HD. You may now go about the process to install Mountain Lion:
    Install Lion/Mountain Lion on a New HDD/SDD
    Be sure you backup your files to an external drive or second internal drive because the following procedure will remove everything from the hard drive.
    Boot to the Internet Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND-OPTION- R keys until a globe appears on the screen. Wait patiently - 15-20 minutes - until the Recovery main menu appears.
    Partition and Format the hard drive:
    1. Select Disk Utility from the main menu and click on the Continue button.
    2. After DU loads select your external hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Click on the Options button, set the partition scheme to GUID then click on the OK button. Set the format type to Mac OS Extended (Journaled.) Click on the Partition button and wait until the process has completed. Quit DU and return to the main menu.
    Reinstall Lion/Mountain Lion: Select Reinstall Lion/Mountain Lion and click on the Install button. Be sure to select the correct drive to use if you have more than one.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.

Maybe you are looking for