TotalVHDCapacity attribute is returning zero in "Get-SCVMTemplate | select Name, TotalVhdCapacity" powershell command though the Vhd capacity is 20 gb in size, vmm 2012 r2

Hi All,
TotalVHDCapacity attribute is returning zero in "Get-SCVMTemplate | select Name, TotalVhdCapacity" powershell command though the template has Vhd capacity is 20 gb in size, vmm 2012 r2. I can create VM using this template too.
For other templates it is returning correct value though.
Can anyone help us understanding the root cause and the solution too.
Thanks in advance.
Debabrata

I booted this drive from another computer (Asrock M3A770DE mobo) and works fine, speed with dd was ~100MB/s
I also update bios on my first computer with Intel D945GSEJT (there is selected AHCI mode) still the same transfers with dd (~10Mb/s)
I have no idea what to do with it now
EDIT:
More tests with other hdd (Samsung HD502IJ), dd on mounted NTFS partition:
Intel D945GSEJT booted from Archlinux iso:
hdparm: ~75 MB/s
dd: ~10 MB/s
Intel D945GSEJT booted from Archlinux iso, HDD connected to PCI SATA controller (Promise 378):
hdparm: ~60 MB/s
dd: ~10 MB/s
Asrock M3A770DE booted from Archlinux iso:
hdparm: ~87 MB/s
dd: ~76 MB/s
Asrock M3A770DE booted from Archlinux iso, HDD connected to PCI SATA controller (Promise 378):
hdparm: ~81MB/s
dd: ~76 MB/s
What is broken on D945GSEJT?
Last edited by miskoala (2012-03-30 13:47:23)

Similar Messages

  • New Win7 install. Can't open html files. Get "there was a problem sending command to the program".

    When I try to open an html file on my hard drive, I get a "There was a problem sending the command to the program" error. There is no way I can open a local html file with firefox, even though Win7 sees it these files as Firefox documents. This is a brand-new Gateway tower running Windows7-64, Athlon phenom 4x processor, 6G RAM, and the latest version of Firefox (a week old).

    Try:
    *http://kb.mozillazine.org/Windows_error_opening_Internet_shortcut_or_local_HTML_file_-_Firefox
    You can try to redo the default browser (temporarily make another browser the default).
    *http://kb.mozillazine.org/Default_browser

  • When following your instructions on setting a blank new tab, I get and error message "invalid url", even though the sting entered in the config is as you state.

    I would like a blank new tab to open, but have followed the help guidance to modify the about:config.
    However, for all strings shown, I get a consistent error message "invalid url", even though the string has been copied correctly.

    This issue can be caused by an extension that isn't working properly.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • How do I get variable selections in output when I send the output to Export

    Hi Friends,
    I am working in Web Analyzer and I would like to export the values of the variable selection to excel along with the output for future reference to know this data belongs to mentioned variable selections.
    Is there any setting in BI to get this requirement?
    Thanks in advance,
    Sam
    Edited by: Sam Reddy on Feb 18, 2009 4:00 AM

    Hi,
    I agree we can do it in workbooks but our requirement is to make available this feature in web analyzer only.
    Do you guys have any other way to work around web?
    Thanks,
    Sam.

  • Why does the picture in premiere pro gets interrupted from time to time even though the same file plays fine in a media player?

    So like I said, the video itself is fine, if played in this case in windows media player classic, its fine no problems. However once I input the video in premiere pro, it starts showing up these things.
    It does this in the preview window in premiere and even in the final exported version. Anyone know a solution to this?

    More information needed for someone to help... please click below and provide the requested information
    -Premiere Pro Video Editing Information FAQ http://forums.adobe.com/message/4200840
    •What is your exact brand/model graphics adapter (ATI or nVidia or ???)
    •What is your exact graphics adapter driver version?
    •Have you gone to the vendor web site to check for a newer driver?
    •For Windows, do NOT rely on Windows Update to have current driver information
    •-you need to go direct to the vendor web site and check updates for yourself
    •nVidia Driver Downloads http://www.nvidia.com/Download/index.aspx?lang=en-us
    •ATI Driver Autodetect http://support.amd.com/en-us/download/auto-detect-tool
    Exactly what is INSIDE the video you are editing?
    Codec & Format information, with 2 links inside for you to read http://forums.adobe.com/thread/1270588
    Report back with the codec details of your file, use the programs below... A screen shot works well to SHOW people what you are doing
    https://forums.adobe.com/thread/1070933 for screen shot instructions
    Free programs to get file information for PC/Mac http://mediaarea.net/en/MediaInfo/Download

  • How do I get my computer name to show correctly in the finder?

    I recently upgraded to Yosemite and following that upgraded to an SSD drive. Life is good and I am happy with everything except that since the upgrades I am seeing a silly variety of names for my computer.
    I renamed it to The Shire and now it shows up as The Shire (2) or The Shire (3). No matter how many times I change it back in Preferences > Sharing, it keeps adding all those extra numbers. There are times when I see four or five different iterations of my system - see attached image.
    To add insult to injury, the old name of my system, the generic MacBook Pro (5) also shows in the list.
    From what I have read this may have something to do with Bonjour, but I have not see any solutions out there for restoring order and correct names to list.
    I would appreciate some assistance resolving this.

    As of now this is simply a workaround for a bug that will hopefully be fixed in a future version of Yosemite. The only impact it may have on you is if you rely on using bonjour connections for any of your peripherals such as a bonjour-enabled printer. Otherwise, you will not notice a problem at all.

  • 0fi_ar_4 INIT returning zero records

    Hi gurus,
    0fi_ar_4 INIT is returning zero records while loading into ODS.I have checked in RSA3 it is returning zero records with INIT selection but is it is fetching records with Full update.Can ne one tell me what to do.how to solve this problem.
    rgds,
    ***Points Assured**

    Hi Suravi,
    Check at the Info Package selection-- Init with out data transfer.
    Make it with data transfer..
    Hope it helps..

  • The screen on my Macbook goes blank, if I tilt the screen it returns. Problem getting worse.

    The screen on my Macbook goes blank, if I tilt the screen it returns. Problem getting worse. Should I take it to the apple store and see if they can replace the screen? is it expensive to replace the backlight/invertor?

    This sounds to me like a fairly common Inverter Fault.
    It is not the screen that needs replacing by the sounds of it,
    It sounds like either the inverter board or the inverter cable needs replacing.
    My understanding is that inverter / inverter cable repairs aren't too expensive, but not too cheap!
    Obviously your best way to find out how much it would cost to be repaired would be to take it in to an Apple Store, as I have never had to have one replaced myself, but the information I'm providing, is based on what I've read elsewhere.
    How old is the MacBook?
    Thanks,
    Ollie.

  • WPF UI running in seperate runspace - able to set/get controls via synchronized hash table, but referencing the control via the hash table from within an event handler causes both runspaces to hang.

    I am trying to build a proof of concept where a WPF form is hosted in a seperate runspace and updates are handled from the primary shell/runspace. I have had some success thanks to a great article by Boe Prox, but I am having an issue I wanted to open up
    to see if anyone had a suggestion.
    My goals are as follows:
    1.) Set control properties from the primary runspace (Completed)
    2.) Get control properties from the primary runspace (Completed)
    3.) Respond to WPF form events in the UI runspace from the primary runspace (Kind of broken).
    I have the ability to read/write values to the form, but I am having difficulty with events. Specifically, I can fire and handle events, but the minute I try to reference the $SyncHash from within the event it appears to cause a blocking condition hanging both
    runspaces. As a result, I am unable to update the form based on an event being fired by a control.
    In the example below, the form is loaded and the following steps occur:
    1.) Update-Combobox is called and it populates the combobox with a list of service names and selects the first item.
    2.) update-textbox is called and sets the Text property of the textbox.
    3.) The Text value of the textbox is read by the function read-textbox and output using write-host.
    4.) An event handle is registered for the SelectionChanged event for the combobox to call the update-textbox function used earlier.
    5.) If you change the selection on the combobox, the shell and UI hangs as soon as $SyncHash is referenced. I suspect this is causing some sort of blocking condition from multiple threads trying to access the synchronized nature of the hash table, but I am
    unsure as to why / how to work around it. If you comment out the line "$SyncHash.TXT_Output.Dispatcher.Invoke("Send",[action]{$SyncHash.TXT_Output.Text = $Value})" within update-textbox the event handler will execute/complete.
    $UI_JobScript =
    try{
    Function New-Form ([XML]$XAML_Form){
    $XML_Node_Reader=(New-Object System.Xml.XmlNodeReader $XAML_Form)
    [Windows.Markup.XamlReader]::Load($XML_Node_Reader)
    try{
    Add-Type –AssemblyName PresentationFramework
    Add-Type –AssemblyName PresentationCore
    Add-Type –AssemblyName WindowsBase
    catch{
    Throw "Unable to load the requisite Windows Presentation Foundation assemblies. Please verify that the .NET Framework 3.5 Service Pack 1 or later is installed on this system."
    $Form = New-Form -XAML_Form $SyncHash.XAML_Form
    $SyncHash.Form = $Form
    $SyncHash.CMB_Services = $SyncHash.Form.FindName("CMB_Services")
    $SyncHash.TXT_Output = $SyncHash.Form.FindName("TXT_Output")
    $SyncHash.Form.ShowDialog() | Out-Null
    $SyncHash.Error = $Error
    catch{
    write-host $_.Exception.Message
    #End UI_JobScript
    #Begin Main
    add-type -AssemblyName WindowsBase
    [XML]$XAML_Form = @"
    <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Window.Resources>
    <DataTemplate x:Key="DTMPL_Name">
    <TextBlock Text="{Binding Path=Name}" />
    </DataTemplate>
    </Window.Resources>
    <DockPanel LastChildFill="True">
    <StackPanel Orientation="Horizontal" DockPanel.Dock="Top">
    <Label Name="LBL_Services" Content="Services:" />
    <ComboBox Name="CMB_Services" ItemTemplate="{StaticResource DTMPL_Name}"/>
    </StackPanel>
    <TextBox Name="TXT_Output"/>
    </DockPanel>
    </Window>
    $SyncHash = [hashtable]::Synchronized(@{})
    $SyncHash.Add("XAML_Form",$XAML_Form)
    $SyncHash.Add("InitialScript", $InitialScript)
    $Normal = [System.Windows.Threading.DispatcherPriority]::Normal
    $UI_Runspace =[RunspaceFactory]::CreateRunspace()
    $UI_Runspace.ApartmentState = [System.Threading.ApartmentState]::STA
    $UI_Runspace.ThreadOptions = [System.Management.Automation.Runspaces.PSThreadOptions]::ReuseThread
    $UI_Runspace.Open()
    $UI_Runspace.SessionStateProxy.SetVariable("SyncHash",$SyncHash)
    $UI_Pipeline = [PowerShell]::Create()
    $UI_Pipeline.Runspace=$UI_Runspace
    $UI_Pipeline.AddScript($UI_JobScript) | out-Null
    $Job = $UI_Pipeline.BeginInvoke()
    $SyncHash.ServiceList = get-service | select name, status | Sort-Object -Property Name
    Function Update-Combobox{
    write-host "`nBegin Update-Combobox [$(get-date)]"
    $SyncHash.CMB_Services.Dispatcher.Invoke($Normal,[action]{$SyncHash.CMB_Services.ItemsSource = $SyncHash.ServiceList})
    $SyncHash.CMB_Services.Dispatcher.Invoke($Normal,[action]{$SyncHash.CMB_Services.SelectedIndex = 0})
    write-host "`End Update-Combobox [$(get-date)]"
    Function Update-Textbox([string]$Value){
    write-host "`nBegin Update-Textbox [$(get-date)]"
    $SyncHash.TXT_Output.Dispatcher.Invoke("Send",[action]{$SyncHash.TXT_Output.Text = $Value})
    write-host "End Update-Textbox [$(get-date)]"
    Function Read-Textbox(){
    write-host "`nBegin Read-Textbox [$(get-date)]"
    $SyncHash.TXT_Output.Dispatcher.Invoke($Normal,[action]{$Global:Return = $SyncHash.TXT_Output.Text})
    $Global:Return
    remove-variable -Name Return -scope Global
    write-host "End Read-Textbox [$(get-date)]"
    #Give the form some time to load in the other runspace
    $MaxWaitCycles = 5
    while (($SyncHash.Form.IsInitialized -eq $Null)-and ($MaxWaitCycles -gt 0)){
    Start-Sleep -Milliseconds 200
    $MaxWaitCycles--
    Update-ComboBox
    Update-Textbox -Value $("Initial Load: $(get-date)")
    Write-Host "Value Read From Textbox: $(Read-TextBox)"
    Register-ObjectEvent -InputObject $SyncHash.CMB_Services -EventName SelectionChanged -SourceIdentifier "CMB_Services.SelectionChanged" -action {Update-Textbox -Value $("From Selection Changed Event: $(get-date)")}

    Thanks again for the responses. This may not be possible, but I thought I would throw it out there. I appreciate your help in looking into this.
    To clarify the "Respond to control events in the main runspace"... I'm would like to have an event generated by a form object in the UI runspace (ex: combo box selectionchanged event) trigger a delegate within the main runspace and have that delegate in
    the main runspace update the form in the UI runspace.
    ex:
    1.) User changes selection on combo box generating form event
    2.) Event calls delegate (which I have gotten to work)
    3.) Delegate does some basic processing (works)
    4.) Delegate attempts to update form in UI runspace (hangs)
    As to the delegates / which runspace they are running in. I see the $synchash variable if I run get-var within a delegate, but I do not see the $Form variable so I am assuming that they are in the main runspace. Do you agree with that assumption?

  • How to get multiple selected fields in list

    Hello all,
    I am trying to get multiple selected value from a list but i dont know how to get multiple selected fields from a list though AS3.
    Actually i want to pass the selected fields to php, so for that i need to get the selections and send to php.
    Thankx..

    i want to put the selected fields of list in an array through AS3....
    actually......i figured it out how to do that...........
    Its simple......use
    list.selectedItems[index]
    and to get the number of items selected......
    list.selectedItems.length
    simple.....

  • Get-mailbox powershell command

    Hi,
    I am trying to to create a power shell script to display the information as per below, any help would be greatly appreciated. Also is it possible to have another column to show if user is disable in AD or not,
    regards,
    Hazey
    Get-Mailbox
    foreach
    $DisplayName
    =Select-Object
    DisplayName
    $PrimarySMTPAddress
    =Select-Object
    PrimarySMTPAddress
    $IssueWarningQuota
    =Select-Object
    IssueWarningQuota
    $ProhibitSendQuota
    =Select-Object
    ProhibitSendQuota
    $WhenCreated
    =Select-Object
    WhenCreated
    $lastlogontime
    =get-MailboxStatistics
    |
    Select-Object
    lastlogontime
    $ItemCount
    =get-MailboxStatistics
    |
    Select-Object
    ItemCount
    $TotalItemSize
    =get-MailboxStatistics
    |
    Select-Object
    TotalItemSize
    $AdGroups
    =(Get-QADUser).memberof
    | Get-QADGroup|
    select
    name
    Export-Csv
    -Path
    c\results.csv
    -NoTypeInformation
    -append

    Save the complete Script as a GetMailboxInfo.Ps1 File. Open Exchange Management Shell as administrator and run this PS1 File. Reply back in case if the you see any errors while the script execution.
    $Global:Report = @()
    Function GetMailboxDetails($List)
    Write-Host -ForeGroundColor YELLOW "Import Active Directory Module"
    Import-Module ActiveDirectory
    foreach($Line in $List)
    $GroupInfo = @()
    $CurrentMailbox = $Line.Alias
    $MailboxObj = "" | Select DisplayName,Alias,PrimarySMTPAddress,SAMACcountNAme,Database,IssueWarningQuota,ProhibitSendQuota,WhenCreated,ExchangeUserAccountControl,TotalItemSize,LastLoggedOnBy,MemberOf
    $MailboxObj.Alias = (Get-Mailbox $CurrentMailbox).Alias
    $MailboxObj.DisplayName = (Get-Mailbox $CurrentMailbox).DisplayName
    $MailboxObj.PrimarySMTPAddress = (Get-Mailbox $CurrentMailbox).PrimarySMTPAddress
    $MailboxObj.SAMACcountNAme = (Get-Mailbox $CurrentMailbox).SamAccountName
    $MailboxObj.Database = (Get-Mailbox $CurrentMailbox).Database
    $MailboxObj.IssueWarningQuota = (Get-Mailbox $CurrentMailbox).IssueWarningQuota
    $MailboxObj.ProhibitSendQuota = (Get-Mailbox $CurrentMailbox).ProhibitSendQuota
    $MailboxObj.WhenCreated = (Get-Mailbox $CurrentMailbox).WhenCreated
    [String]$AccountControl = (Get-Mailbox $CurrentMailbox).ExchangeUserAccountControl
    $MailboxObj.ExchangeUserAccountControl = "DISABLED ACCOUNT"
    If($AccountControl -eq "None")
    $MailboxObj.ExchangeUserAccountControl = "ACTIVE"
    $MailboxObj.TotalItemSize = (Get-MailboxStatistics $CurrentMailbox).TotalItemSize
    $MailboxObj.LastLoggedOnBy = (Get-MailboxStatistics $CurrentMailbox).LastLoggedOnBy
    $DLGroupMembership = (Get-ADUser $Line.SamAccountName).MemberOf
    for($i = 0;$i -lt $DLGroupMembership.Count;$i++)
    $GroupInfo += $DLGroupMembership[$i]
    $GroupInfo += ","
    $MailboxObj.MemberOf = $GroupInfo
    $Global:Report += $MailboxObj
    # MAIN #
    "`n+++Gathering Mailbox Info..."
    $MailboxList = Get-Mailbox -ResultSize Unlimited | Select DisplayName,Alias,PrimarySMTPAddress,SAMACcountNAme,Database,IssueWarningQuota,ProhibitSendQuota,WhenCreated,ExchangeUserAccountControl
    GetMailboxDetails $MailboxList
    Write-Host -ForeGroundColor GREEN "Exporting Report to CSV File..."
    $Global:Report | Export-Csv MailboxInfo.Csv -NoTypeInformation

  • Get all JNDI names - EJBLocalHome

    Hello,
    I've tried to get all JNDI names that are deployed on the J2EE Server RI Version 1.3.1. It worked fine with the JNDI names of the EJBs with Remote Client view (EJBHome), but did not work with EJBs with local Client View (EJBLocalHome).
    Does anyone knows how could work? Or wether it isn't possible.
    Thanks
    Here's my code:
    InitialContext ct = new InitialContext();
    NamingEnumeration bindings = ct.listBindings("");
    while (bindings.hasMore() ) {
    Binding b = (Binding) bindings.next() ;
    Object object = b.getObject();
    if(object instanceof Context) {
    Context aCon = (Context)object;
    NamingEnumeration n = aCon.listBindings("");
    while (n.hasMore()) {
    Binding b2 = (Binding) n.next() ;
    if (b2.getClassName().equals("javax.naming.Reference")) {
    Object objRef = ct.lookup("ejb/"+ b2.getName());
    if (objRef instanceof EJBLocalHome) {
         System.out.println("localHome");
    //here I want to access the EJBLocalHome Interface
         else if (objRef instanceof EJBHome) {
         System.out.println("Home");
         else                              System.out.println("nothing");
                        

    I use the listBindings() method in order to get all References to a JNDI name. I do not know how to get all JNDI names that are local. How can I check them?

  • PDEContentGetAttrs returns zero attributes

    Hi,
    I'm currently in the process of adjusting a plugin written with Acrobat SDK 8.0 to Acrobat SDK 10.0 (X).
    All goes well but I'm stuck on something very annoying...
    In order for the plugin to parse the contents of the current page there is the following code:
    PDEContent pdeContent= PDPageAcquirePDEContent(page, gExtensionID); //Gets the content of the page
    parsePageObjects(pdeContent); //Parse the content of the page - this caches some objects in-memory for later use (this function is recursive).
    PDPageReleasePDEContent(page, gExtensionID); //Releases the aquired contents of the page, no need for it anymore after parsing the contents
    First question:
    1) I did not find any reference to the API calls: PDPageAcquirePDEContent & PDPageReleasePDEContent. Although they are documented in the Acrobat 9.0 SDK manuals, I did not find anything mentioning these calls in the X SDK. They seem to be working (no errors, no crashes etc.). Are these function calls still relevant in SDK X? If not - maybe the next described issue is a side effect of these "old" (?) calls.
    In the parsePageObjects method the content stream of the page is being parsed. All goes well, but for some reason when the current PDEElement is a form (/Type /XObject /Subtype /Form), after extracting the form's content's stream, the call to PDEContentGetAttrs populates the attrs structure with ZEROs.
    For example:
    void parsePageObjects(const PDEContent& pdeContent) //Receives the page contents
         int numElems = PDEContentGetNumElems(pdeContent); //Get number of elements in the contents
         for (int j=0; j < numElems; j++)
          PDEElement pdeElement = PDEContentGetElem(pdeContent, j); // get the current element
          PDEType type=(PDEType)PDEObjectGetType((PDEObject) pdeElement); //Get the element type
          switch(type)
           case kPDEForm: //In case the element is a Form XObject
              PDEContent fc=PDEFormGetContent((PDEForm)pdeElement); //Get the Form's content
              PDEContentAttrs attrs; //Declare an Attrs struct to be filled by the next call to GetAttrs
              PDEContentGetAttrs(fc,&attrs,sizeof(PDEContentAttrs)); //Fills the attrs structure with the data
    After the last API call (PDEContentGetAttrs), the attrs structure is filled with ZEROs (like after memset(&attrs, 0, sizeof(attrs))). Even the forms matrix is all ZERO's.
    For example: this is the dictionary (without the content stream) of a Form XObject which it's attrs are returned as ZERO, although the matrix & bbox are non zero:
    20 0 obj
    <<
        /Type /XObject
        /BBox   [ 0.000000 110.880000 252.000000 252.000000]
        /Filter   [/FlateDecode]
        /FormType 1
        /Length 5682
        /Matrix[ 1 0 0 1 -0.000000 -110.880000]
        /Name /Frm2
        /Resources 19 0 R
        /Subtype   /Form
    >>
    stream
    endstream
    endobj
    Other questions:
    1) Why does the attrs return filled with zeros although the object is 100% valid?
    2) Why is this working perfectlly on Acrobat SDK 8.0 only (when compiling with Acrobat 9.0 SDK - the behaviour is not consistent. The attrs can retun as a valid value or zeros)?
    3) How can I make it wok with Acrobat X SDK?
    Thanks,
    Omri

    For this level of support, you REALLY need to open a formal support case
    with our Developer Support staff.

  • Need Help ::  Current row attribute value returning null

      Hi Frds,
    I am facing the problem that
    Current row attribute value returning null............ even though value is there..... plz.. he
    This is the code in PFR
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if (pageContext.getParameter("queryBtn")!= null)
        String  pPersonId = pageContext.getParameter("ctrlPersonId");
         String rowReference = pageContext.getParameter(EVENT_SOURCE_ROW_REFERENCE);
         OptionsVORowImpl curRow = (     OptionsVORowImpl) am.findRowByRef(rowReference);
        String dtlsItem =  (String)curRow.getFlexValue();   /*  this is returning null value */
    /*  here creating  the hashmap and calling the page with the hashmap*/
    Thanks & Regards,
    jaya
    Message was edited by: 9d452cf7-d17f-4d1e-8e0e-b22539ea8810

    Hi Jaya,
    You want to catch Flexfield values?
    Try below code for catch value.
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if (pageContext.getParameter("queryBtn")!= null)
    OADescriptiveFlexBean dfb = (OADescriptiveFlexBean)webBean.findChildRecursive("flexDFF"); //get the DFF bean
    OAWebBean dffbean = (OAWebBean)dfb.findChildRecursive("flexDFF0"); //get the field that applies to the attribute1 column that is being rendered
    OAMessageStyledTextBean Stylebean = (OAMessageStyledTextBean)dffbean;
    String dtlsItem  = (String)Stylebean.getText(pageContext);
    /*  here creating  the hashmap and calling the page with the hashmap*/
    Thanks,
    Dilip

  • Bug Report: ResultSet.isLast() returns false when queries return zero rows

    When calling the method isLast() on a resultset that contains zero (0) rows, false is returned. If a resultset contains no rows, isLast() should return true because returning false would indicate that there are more rows to be retrieved.
    Try the following Java source:
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import oracle.jdbc.driver.*;
    public class Test2 {
    public static void main (String [] args) throws Exception {
    Connection conn = null;
    String jdbcURL = "jdbc:oracle:thin:@" +
    "(DESCRIPTION=(ADDRESS=(HOST=<host computer>)"+
    "(PROTOCOL=tcp)(PORT=<DB port number>))"+
    "(CONNECT_DATA=(SID=<Oracle DB instance>)))";
    String userId = "userid";
    String password = "password";
    try{
    // Load the Oracle JDBC Driver and register it.
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    // *** The following statement creates a database connection object
    // using the DriverManager.getConnection method. The first parameter is
    // the database URL which is constructed based on the connection parameters
    // specified in ConnectionParams.java.
    // The URL syntax is as follows:
    // "jdbc:oracle:<driver>:@<db connection string>"
    // <driver>, can be 'thin' or 'oci8'
    // <db connect string>, is a Net8 name-value, denoting the TNSNAMES entry
    conn = DriverManager.getConnection(jdbcURL, userId, password);
    } catch(SQLException ex){ //Trap SQL errors
    // catch error
    //conn = new OracleDriver().defaultConnection(); // Connect to Oracle 8i (8.1.7), use Oracle thin client.
    PreparedStatement ps = conn.prepareStatement("select 'a' from dual where ? = ?", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); // Use any query that will return zero rows.
    ps.setInt(1, 1); // Set the params so that the query returns 0 rows.
    ps.setInt(2, 2);
    ResultSet rs = ps.executeQuery();
    System.out.println("1. Last here? " + rs.isLast());
    while (rs.next()) {
    // do whatever
    System.out.println("2. Last here? " + rs.isLast());
    ps.close();
    rs.close();
    EXPECTED RESULT -
    1. Last here? true
    2. Last here? true
    ACTUAL RESULT -
    1. Last here? false
    2. Last here? false
    This happens to me on Oracle 9.2.0.1.0.

    387561,
    For your information, I discovered this problem from
    running a query that did access an actual DB table.
    Try it and let me know.I did say I was only guessing, and yes, I did try it (after I posted my reply, and before I read yours). And I did check the query plan for the queries I tried -- to verify that they were actually doing some database "gets".
    In any case, the usual way that I determine whether a "ResultSet" is empty is when the very first invocation of method "next()" returns 'false'. Is that not sufficient for you?
    Good Luck,
    Avi.

Maybe you are looking for