Vb code----Expected-end of statement----this is error coming when debugging.

'VERSION 5.00
'Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "Mscomm32.ocx"
Begin VB.Form FrmMain
   BackColor = &H80000002
   StartUpPosition = 3    'Windows Default
   WindowState = 2        'Maximized
   Begin VB.Timer Timer3
      Interval = 1000
      Left = 3720
      Top = 10560
   End
   Begin VB.Timer Timer2
      Interval = 1000
      Left = 4200
      Top = 10560
   End
   Begin MSCommLib.MSComm MSComm1
      Left = 5160
      Top = 10440
      _ExtentX        =   1005
      _ExtentY        =   1005
      _Version        =   393216
      DTREnable = 0           'False
   End
   Begin VB.Timer Timer1
      Interval = 1000
      Left = 4680
      Top = 10560
   End
   Begin VB.CommandButton Command2
      Caption = "Range 28-44 mm."
      BeginProperty Font
         Name = "Trebuchet MS"
         Size = 21.75
         Charset = 0
         Weight = 700
         Underline = 0           'False
         Italic = -1             'True
         Strikethrough = 0       'False
      EndProperty
      Height = 1335
      Width = 3735
   End
   Begin VB.Frame FrameDia
      Caption = "Value of Measuring"
      BeginProperty Font
         Name = "Trebuchet MS"
         Strikethrough = 0       'False
      EndProperty
      Height = 3495
      Width = 14295
      Begin VB.Label lblDataOuter
         Alignment = 2          'Center
         BackColor = &H80000009
         Caption = "1.002"
         BeginProperty Font
            Name = "Trebuchet MS"
            Strikethrough = 0       'False
         EndProperty
         Height = 1785
         Left = 4920
         TabIndex = 8
         Top = 840
         Width = 6075
      End
      Begin VB.Label Label2
         Caption = "mm."
         BeginProperty Font
            Name = "Trebuchet MS"
            Size = 72
            Charset = 0
            Weight = 700
            Underline = 0           'False
            Italic = -1             'True
            Strikethrough = 0       'False
         EndProperty
         Height = 1785
         Left = 10920
         TabIndex = 7
         Top = 840
         Width = 3075
      End
      Begin VB.Label lblDia
         BackColor = &H80000002
         Caption = "Outer Diameter"
         BeginProperty Font
            Name = "Trebuchet MS"
            Size = 36
            Charset = 0
            Weight = 700
            Underline = 0           'False
            Italic = 0              'False
            Strikethrough = 0       'False
         EndProperty
         Height = 1815
         Left = 600
         TabIndex = 6
         Top = 840
         Width = 4095
      End
   End
   Begin VB.Frame FrameHigh
      BackColor = &H80000002
      Caption = "Value of Measuring"
      BeginProperty Font
         Name = "Trebuchet MS"
         Size = 24
         Charset = 0
         Weight = 400
         Underline = 0           'False
         Italic = 0              'False
         Strikethrough = 0       'False
      EndProperty
      Height = 3495
      Left = 480
      TabIndex = 1
      Top = 5040
      Width = 14295
      Begin VB.Label lblHigh
         BackColor = &H80000002
         Caption = "Length"
         BeginProperty Font
            Name = "Trebuchet MS"
            Size = 36
            Charset = 0
            Weight = 700
            Underline = 0           'False
            Italic = 0              'False
            Strikethrough = 0       'False
         EndProperty
         Height = 975
         Left = 720
         TabIndex = 4
         Top = 1200
         Width = 2655
      End
      Begin VB.Label lblUnit
         Alignment = 2          'Center
         AutoSize = -1           'True
         BackColor = &H80000009
         Caption = "mm."
         BeginProperty Font
            Name = "Trebuchet MS"
            Size = 72
            Charset = 0
            Weight = 700
            Underline = 0           'False
            Italic = -1             'True
            Strikethrough = 0       'False
         EndProperty
         Height = 1785
         Left = 10920
         TabIndex = 3
         Top = 840
         Width = 3075
      End
      Begin VB.Label lblDataLength
         Alignment = 2          'Center
         BackColor = &H80000009
         Caption = "30.001"
         BeginProperty Font
            Name = "Trebuchet MS"
            Size = 72
            Charset = 0
            Weight = 700
            Underline = 0           'False
            Italic = -1             'True
            Strikethrough = 0       'False
         EndProperty
         Height = 1785
         Left = 4800
         TabIndex = 2
         Top = 840
         Width = 6195
      End
   End
   Begin VB.CommandButton Command1
      Caption = "Range 16-28 mm."
      BeginProperty Font
         Name = "Trebuchet MS"
         Size = 21.75
         Charset = 0
         Weight = 700
         Underline = 0           'False
         Italic = -1             'True
         Strikethrough = 0       'False
      EndProperty
      Height = 1335
      Left = 6240
      TabIndex = 9
      Top = 9600
      Width = 3735
   End
   Begin VB.Image Img2844
      Height = 900
      Left = 11760
      Picture         =   "HighCheck_01.frx":1CCA
      Stretch = -1            'True
      Top = 8640
      Width = 900
   End
   Begin VB.Image img1628
      Height = 900
      Left = 7800
      Picture         =   "HighCheck_01.frx":210C
      Stretch = -1            'True
      Top = 8640
      Width = 900
   End
   Begin VB.Label lblDate
      Alignment = 2          'Center
      BackColor = &H80000002
      Caption = "Date"
      BeginProperty Font
         Name = "Trebuchet MS"
         Size = 26.25
         Charset = 0
         Weight = 700
         Underline = 0           'False
         Italic = -1             'True
         Strikethrough = 0       'False
      EndProperty
      Height = 615
      Left = 480
      TabIndex = 12
      Top = 9240
      Width = 3375
   End
   Begin VB.Label lblTime
      Alignment = 2          'Center
      BackColor = &H80000002
      Caption = "Time"
      BeginProperty Font
         Name = "Trebuchet MS"
         Size = 26.25
         Charset = 0
         Weight = 700
         Underline = 0           'False
         Italic = -1             'True
         Strikethrough = 0       'False
      EndProperty
      Height = 615
      Left = 120
      TabIndex = 11
      Top = 9960
      Width = 3975
   End
   Begin VB.Label lblMain
      BackColor = &H80000002
      Caption = "Dimension Measurement Machine"
      BeginProperty Font
         Name = "Comic Sans MS"
         Size = 27.75
         Charset = 0
         Weight = 400
         Underline = -1          'True
         Italic = 0              'False
         Strikethrough = 0       'False
      EndProperty
      ForeColor = &H80000007
      Height = 975
      Left = 3360
      TabIndex = 0
      Top = 0
      Width = 9135
   End
End
Option Explicit
Public DataOuter As String, DataLength As String, RecData As String, Model As String
Private Sub Form_Load()
    img1628.Visible = False
    Img2844.Visible = False
End Sub
Private Sub Command1_Click()
    MSComm1.Output = "@00WR0200000146*" & vbCr
    Delay
End Sub
Private Sub Command2_Click()
    Delay
End Sub
Private Sub Delay()
Dim a As Single
End Sub
Private Sub Image1_Click()
End Sub
Private Sub Timer1_Timer()
    lblTime.Caption = Format(Now, "HH:MM:SS AmPm")
    lblDate.Caption = Format(Now, "DD/MM/YY")
End Sub
Private Sub Timer2_Timer()
    MSComm1.Output = "@00RD0040000654*" & vbCr
    Delay
        End If
End Sub
Private Sub Timer3_Timer()
 If Model = "1" Then
       img1628.Visible = True
    Else
       img1628.Visible = False
    End If
    If Model = "2" Then
       Img2844.Visible = True
    Else
       Img2844.Visible = False
    End If
End Sub

'VERSION 5.00
'Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "Mscomm32.ocx"
Begin VB.Form FrmMain
Your code is not VB .Net.  You may be able to find some assistance with your problem from the resources listed here: 
VB6 and older

Similar Messages

  • Vb code----Expected-end of statement

    'VERSION 5.00
    'Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "Mscomm32.ocx"
    Begin VB.Form FrmMain
       BackColor = &H80000002
       StartUpPosition = 3    'Windows Default
       WindowState = 2        'Maximized
       Begin VB.Timer Timer3
          Interval = 1000
          Left = 3720
          Top = 10560
       End
       Begin VB.Timer Timer2
          Interval = 1000
          Left = 4200
          Top = 10560
       End
       Begin MSCommLib.MSComm MSComm1
          Left = 5160
          Top = 10440
          _ExtentX        =   1005
          _ExtentY        =   1005
          _Version        =   393216
          DTREnable = 0           'False
       End
       Begin VB.Timer Timer1
          Interval = 1000
          Left = 4680
          Top = 10560
       End
       Begin VB.CommandButton Command2
          Caption = "Range 28-44 mm."
          BeginProperty Font
             Name = "Trebuchet MS"
             Size = 21.75
             Charset = 0
             Weight = 700
             Underline = 0           'False
             Italic = -1             'True
             Strikethrough = 0       'False
          EndProperty
          Height = 1335
          Width = 3735
       End
       Begin VB.Frame FrameDia
          Caption = "Value of Measuring"
          BeginProperty Font
             Name = "Trebuchet MS"
             Strikethrough = 0       'False
          EndProperty
          Height = 3495
          Width = 14295
          Begin VB.Label lblDataOuter
             Alignment = 2          'Center
             BackColor = &H80000009
             Caption = "1.002"
             BeginProperty Font
                Name = "Trebuchet MS"
                Strikethrough = 0       'False
             EndProperty
             Height = 1785
             Left = 4920
             TabIndex = 8
             Top = 840
             Width = 6075
          End
          Begin VB.Label Label2
             Caption = "mm."
             BeginProperty Font
                Name = "Trebuchet MS"
                Size = 72
                Charset = 0
                Weight = 700
                Underline = 0           'False
                Italic = -1             'True
                Strikethrough = 0       'False
             EndProperty
             Height = 1785
             Left = 10920
             TabIndex = 7
             Top = 840
             Width = 3075
          End
          Begin VB.Label lblDia
             BackColor = &H80000002
             Caption = "Outer Diameter"
             BeginProperty Font
                Name = "Trebuchet MS"
                Size = 36
                Charset = 0
                Weight = 700
                Underline = 0           'False
                Italic = 0              'False
                Strikethrough = 0       'False
             EndProperty
             Height = 1815
             Left = 600
             TabIndex = 6
             Top = 840
             Width = 4095
          End
       End
       Begin VB.Frame FrameHigh
          BackColor = &H80000002
          Caption = "Value of Measuring"
          BeginProperty Font
             Name = "Trebuchet MS"
             Size = 24
             Charset = 0
             Weight = 400
             Underline = 0           'False
             Italic = 0              'False
             Strikethrough = 0       'False
          EndProperty
          Height = 3495
          Left = 480
          TabIndex = 1
          Top = 5040
          Width = 14295
          Begin VB.Label lblHigh
             BackColor = &H80000002
             Caption = "Length"
             BeginProperty Font
                Name = "Trebuchet MS"
                Size = 36
                Charset = 0
                Weight = 700
                Underline = 0           'False
                Italic = 0              'False
                Strikethrough = 0       'False
             EndProperty
             Height = 975
             Left = 720
             TabIndex = 4
             Top = 1200
             Width = 2655
          End
          Begin VB.Label lblUnit
             Alignment = 2          'Center
             AutoSize = -1           'True
             BackColor = &H80000009
             Caption = "mm."
             BeginProperty Font
                Name = "Trebuchet MS"
                Size = 72
                Charset = 0
                Weight = 700
                Underline = 0           'False
                Italic = -1             'True
                Strikethrough = 0       'False
             EndProperty
             Height = 1785
             Left = 10920
             TabIndex = 3
             Top = 840
             Width = 3075
          End
          Begin VB.Label lblDataLength
             Alignment = 2          'Center
             BackColor = &H80000009
             Caption = "30.001"
             BeginProperty Font
                Name = "Trebuchet MS"
                Size = 72
                Charset = 0
                Weight = 700
                Underline = 0           'False
                Italic = -1             'True
                Strikethrough = 0       'False
             EndProperty
             Height = 1785
             Left = 4800
             TabIndex = 2
             Top = 840
             Width = 6195
          End
       End
       Begin VB.CommandButton Command1
          Caption = "Range 16-28 mm."
          BeginProperty Font
             Name = "Trebuchet MS"
             Size = 21.75
             Charset = 0
             Weight = 700
             Underline = 0           'False
             Italic = -1             'True
             Strikethrough = 0       'False
          EndProperty
          Height = 1335
          Left = 6240
          TabIndex = 9
          Top = 9600
          Width = 3735
       End
       Begin VB.Image Img2844
          Height = 900
          Left = 11760
          Picture         =   "HighCheck_01.frx":1CCA
          Stretch = -1            'True
          Top = 8640
          Width = 900
       End
       Begin VB.Image img1628
          Height = 900
          Left = 7800
          Picture         =   "HighCheck_01.frx":210C
          Stretch = -1            'True
          Top = 8640
          Width = 900
       End
       Begin VB.Label lblDate
          Alignment = 2          'Center
          BackColor = &H80000002
          Caption = "Date"
          BeginProperty Font
             Name = "Trebuchet MS"
             Size = 26.25
             Charset = 0
             Weight = 700
             Underline = 0           'False
             Italic = -1             'True
             Strikethrough = 0       'False
          EndProperty
          Height = 615
          Left = 480
          TabIndex = 12
          Top = 9240
          Width = 3375
       End
       Begin VB.Label lblTime
          Alignment = 2          'Center
          BackColor = &H80000002
          Caption = "Time"
          BeginProperty Font
             Name = "Trebuchet MS"
             Size = 26.25
             Charset = 0
             Weight = 700
             Underline = 0           'False
             Italic = -1             'True
             Strikethrough = 0       'False
          EndProperty
          Height = 615
          Left = 120
          TabIndex = 11
          Top = 9960
          Width = 3975
       End
       Begin VB.Label lblMain
          BackColor = &H80000002
          Caption = "Dimension Measurement Machine"
          BeginProperty Font
             Name = "Comic Sans MS"
             Size = 27.75
             Charset = 0
             Weight = 400
             Underline = -1          'True
             Italic = 0              'False
             Strikethrough = 0       'False
          EndProperty
          ForeColor = &H80000007
          Height = 975
          Left = 3360
          TabIndex = 0
          Top = 0
          Width = 9135
       End
    End
    Option Explicit
    Public DataOuter As String, DataLength As String, RecData As String, Model As String
    Private Sub Form_Load()
        img1628.Visible = False
        Img2844.Visible = False
    End Sub
    Private Sub Command1_Click()
        MSComm1.Output = "@00WR0200000146*" & vbCr
        Delay
    End Sub
    Private Sub Command2_Click()
        Delay
    End Sub
    Private Sub Delay()
    Dim a As Single
    End Sub
    Private Sub Image1_Click()
    End Sub
    Private Sub Timer1_Timer()
        lblTime.Caption = Format(Now, "HH:MM:SS AmPm")
        lblDate.Caption = Format(Now, "DD/MM/YY")
    End Sub
    Private Sub Timer2_Timer()
        MSComm1.Output = "@00RD0040000654*" & vbCr
        Delay
            End If
    End Sub
    Private Sub Timer3_Timer()
     If Model = "1" Then
           img1628.Visible = True
        Else
           img1628.Visible = False
        End If
        If Model = "2" Then
           Img2844.Visible = True
        Else
           Img2844.Visible = False
        End If
    End Sub

    Hello,
    VB 6 is no longer supported by Microsoft. I’d suggest asking in one of the following third-party forums which support Visual Basic 6.
    VB forums
    VB City
    For further information, see:
    Where to post your VB 6 questions
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

  • Expected End Of Statement Error

    I created an SQL statement which runs fine in MS-SQL2000. I
    paste the code in a DW 8 recordset that I create and run a test to
    make sure it works. No problem. Returns resutls as expected. I can
    also access the fields in the recordset. When I test the Web page I
    get:
    Error Type:
    Microsoft VBScript compilation (0x800A0401)
    Expected end of statement
    /cssmetrics/dallas/scorecard.asp, line 10, column 2647
    See Attachment. I am baffled to what it is looking forward.
    Your help is greatly appreciated.

    'VERSION 5.00
    'Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "Mscomm32.ocx"
    Begin VB.Form FrmMain
    Your code is not VB .Net.  You may be able to find some assistance with your problem from the resources listed here: 
    VB6 and older

  • Expected End Of Statement

    RETURN=Text"Compatibility Troubleshooter" ;
    RETURN=Text"Please Don't Close"
    Line:1
    char:12
    Error:Expected End Of Statement
    Code:800A0401
    Source:Microsoft VBScript compailation error

    Error:Expected End Of Statement
    Code:800A0401
    Source:Microsoft VBScript compailation error
    Questions relating to versions of Basic other than .Net should asked here:
    VBScript
    Visual Basic for Applications 
    (VBA)

  • SSRS Custom Code Error There is an error on line 0 of custom code: [BC30205] End of statement expected.

    I am receiving this error with the following code, which counts the number of work days between two parameters and I don't see the problem. Please help.
    Public Function GetDateCount(ByVal StartDate AS DateTime, ByVal EndDate AS DateTime) AS Integer
    Dim TempVal AS Integer
    DimTotalDays AS Integer
    TotalDays = 0
    TempVal = DateDiff(DateInterval.Day, StartDate, EndDate) + 1
    for I as Integer = 1 to TempVal
    If(StartDate.DayOfWeek.ToString() <> "Sunday" AND StartDate.DayOfWeek.ToString() <> "Saturday") Then
    TotalDays = TotalDays +1
    End If
    StartDate = DateAdd(DateInterval.day, 1, StartDate)
    Next
    Return TotalDays
    End Function

    Hi CNet Vase,
    According to your description, you want to use custom code to count the number of work days between two parameters in the report, but when you run the report, an error occurs.
    I reproduced the issue in my environment, the error message: ‘DimTotalDays’ is not declared. The error is caused by there is no space between Dim and variable TotalDays, so the system regards it as a unit. To fix this issue, please type
    space behind the word Dim like below:
    Dim TotalDays AS Integer
    If there is any misunderstanding , please feel free to let me know.
    Best Regards, 
    Wendy Fu

  • "uses a file type that is blocked from opening in this version" error message when opening a *.doc file with Word already running

    Several customers running different versions of Office 2011 (14.4.1-14.4.5) on OSX varying from 10.7.5 to 10.9.5, running on various kinds of hardware (iMac/MacBook Pro/MacBook Air) of various ages are having issues opening *.doc files if the Word is already open. The error message that gets displayed is, "XXXX.doc uses a file type that is blocked from opening in this version"
    When the customer tries to open the same file via File-Open, she gets "The file is locked for editing. you can open the file as read-only".
    When trying to do so, she gets "Word cannot open this document. The document might be in use, the document might not be a valid Word document, or the file name might contain invalid characters".
    If Word gets Force-quit, the same document opens without any problems.
    1. Repairing Disk permissions was ran several times. and the volume was found to be OK.
    2. I have noticed that in this scenario either deleting the normal.dotm or com.microsoft.word.plist (~/Library/Preferences) sometimes resolves the issue, sometimes it doesn’t. There is no pattern to follow. All versions of Office are affected, the fully updated and the non-updated ones.
    3. I have tried completely removing the suite using Office 2011 Uninstall.app and/or Remove Office 2011 Uninstaller.pkg, then going through customer's library and manually removing all the Office references.
    4. None of these systems had Office 2008 in the past.
    Any help will be greatly appreciated.

    Reboot both the Mac and the server. Word opens .DOC files and Excel opens .XLS files. As you have found out by copying the files to the computer. It is the connection between the 2 computer that is causing the error.

  • "not compatible with this architecture" error message when trying to download and instal Firefox on older computer

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [[/questions/912921]]</blockquote>
    Helping a friend with older computer. Windows based. Used IE to find Firefox website. Hit download button. Chose to run. About two minutes later received the message, not compatible with this architecture.

    Which Firefox version are you trying to download?
    You can find the latest Firefox releases here:
    *Firefox 9.0.x: http://www.mozilla.org/en-US/firefox/all.html
    *Firefox 3.6.x: http://www.mozilla.org/en-US/firefox/all-older.html

  • I'm getting this communication error "HTTP"  when I try to move to preview mode.

    I just intall adobe muse in my computer.  I trying to use it.  There's an error that comes up " not able to communicate "HTTP" I have disable the fire wall and still get the error..

    OK, I tried a few things, and I do not understand the results.
    1) I opened the document in Preview, and it would only recognize the three initial pages which I typed using the Pages App. It did not recognize the bulk of the text which I copied from Appleworks 6. It also did not recognize any of the scans.
    2) I tried opening a pdf in Preview, and it would only recognize the scans. (No Text!)
    3) I tried copying everything (select all, and command-c) in Pages, and then opened a blank Pages doc, and typed Command-v. This got me all of the text, but none of the scans!
    4) I was worried that my Pages app might be corrupted, but I successfully converted a similar 78-page document with copied materials from Appleworks 6 and similar scans, ant this worked perfectly.
    My conclusion is that my file must be corrupted. Is there any way to check this? shabda88

  • Why would I repeatedly receive an "unable to download at this time " error message when memory and signal do not seem to be a problem?

    Why would I repeatedly receive a download error message when memory is sufficient?

    Uh, maybe it's a server problem, and unrelated to you or your device?

  • End of Statement error

    I have the a query that keeps coming up with an error when I try to place in in a form as VBA. The following is the code:
    txtOperationID = "SELECT TOP 1 [idsOpSymbolID] & " " & Format([txtOperationSub#]+1,"0000") AS NewOpID " & _
    "FROM tblOperations LEFT JOIN tblOperationsSUB ON tblOperations.idsOpSymbolID = tblOperationsSUB.idrOpSymbolID " & _
    "WHERE (((tblOperations.idsOpSymbolID) = [Forms]![frmNewProjectOperationTrackingNumber]![Combo91])) " & _
    "ORDER BY tblOperationsSUB.[txtOperationSub#] DESC"
    I am given the following error:  Compile Error, Expected end of statement.  Any suggestions?

    Yes,
    You have to neutralize " in string:
    txtOperationID = "SELECT TOP 1 [idsOpSymbolID] & "" "" & Format([txtOperationSub#]+1,""0000"") AS NewOpID " & _
    "FROM tblOperations LEFT JOIN tblOperationsSUB ON tblOperations.idsOpSymbolID = tblOperationsSUB.idrOpSymbolID " & _
    "WHERE (((tblOperations.idsOpSymbolID) = [Forms]![frmNewProjectOperationTrackingNumber]![Combo91])) " & _
    "ORDER BY tblOperationsSUB.[txtOperationSub#] DESC"
    Michał

  • Invalid Code (Customer Equipment Card - State)

    Hi ,
          I am facing problem when i am creating a delivery for a particular customer "Invalid Code[Customer Equipment Card - State] Message 173-36".But when i create delivery for some other customer which state is same it will not give error.
    Regards

    Dear Sandeep,
    This issue mihgt be a DB corruption issue. I would recommend you to please login a message with SAP regarding this issue.
    There could be another reason for this that the SBO_SP_Transactionnotifcation could have been modified. If so, please reset the sbo_sp_transactionnotification to the original code. For more information on sbo_sp_transactionnotification, please have a look at the following link :
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e991e2b9-0901-0010-0395-ef5268b00aaf]
    Hope it helps.
    Regards
    Arshdeep

  • Please! shed light on this one error

    Can someone please help me with this one error. When I compile and for the life of me can't figure out why the readInput is wrong.
    My program is to read using vector pulling up PetRecords by name and sorting.
    The following is my code
    <import java.util.*;
    public class PetRecordsSortedByName
    public static void main(String[] args)
    Vector pet = new Vector();
    char repeat = 'y';
    String pause = null;
    while(repeat == 'y' || repeat == 'Y')
    PetRecord nextPet = new PetRecord();
    nextPet.readInput();
    pet.addElement(nextPet);
    System.out.println();
    System.out.println("Enter another pet record: (y for yes): ");
    repeat = SavitchIn.readLineNonwhiteChar();
    boolean sorted = false;
    int iterations = pet.size() - 1;
    while(!sorted && iterations > 0)
    sorted = true;
    for (int i = 0; i < iterations; ++i)
    if((((PetRecord)pet.elementAt(i)).getName()).compareTo(
    ((PetRecord)pet.elementAt(i + 1)).getName()) > 0 )
    PetRecord temp = new PetRecord();
    temp = (PetRecord)pet.elementAt(i);
    pet.setElementAt((PetRecord)(pet.elementAt(i + 1)), i);
    pet.setElementAt(temp, i + 1);
    sorted = false;
    --iterations;
    for(int i = 0; i < pet.size(); ++i)
    System.out.println();
    System.out.println((PetRecord)pet.elementAt(i));
    System.out.println();
    System.out.println("Hit enter to continue.");
    pause = SavitchIn.readLine();
    <<<<<THIS IS THE COMPILING ERROR>>>>>>>>
    C:\My Documents\Java Homework\ch10\PetRecordsSortedByName.java:13:
    cannot resolve symbol symbol : method readInput ()
    location: class PetRecord nextPet.readInput();
    ^
    1 error
    Tool completed with exit code 1

    OOPS SORRY
    HERE IT IS
    Class for basic pet records: name, age, and weight.
    public class PetRecord
    private String name;
    private int age;//in years
    private double weight;//in pounds
    public void writeOutput( )
    System.out.println("Name: " + name);
    System.out.println("Age: " + age + " years");
    System.out.println("Weight: " + weight + " pounds");
    public PetRecord(String initialName, int initialAge,
    double initialWeight)
    name = initialName;
    if ((initialAge < 0) || (initialWeight < 0))
    System.out.println("Error: Negative age or weight.");
    System.exit(0);
    else
    age = initialAge;
    weight = initialWeight;
    public void set(String newName, int newAge, double newWeight)
    name = newName;
    if ((newAge < 0) || (newWeight < 0))
    System.out.println("Error: Negative age or weight.");
    System.exit(0);
    else
    age = newAge;
    weight = newWeight;
    public PetRecord(String initialName)
    name = initialName;
    age = 0;
    weight = 0;
    public void set(String newName)
    name = newName; //age and weight are unchanged.
    public PetRecord(int initialAge)
    name = "No name yet.";
    weight = 0;
    if (initialAge < 0)
    System.out.println("Error: Negative age.");
    System.exit(0);
    else
    age = initialAge;
    public void set(int newAge)
    if (newAge < 0)
    System.out.println("Error: Negative age.");
    System.exit(0);
    else
    age = newAge;
    //name and weight are unchanged.
    public PetRecord(double initialWeight)
    name = "No name yet";
    age = 0;
    if (initialWeight < 0)
    System.out.println("Error: Negative weight.");
    System.exit(0);
    else
    weight = initialWeight;
    public void set(double newWeight)
    if (newWeight < 0)
    System.out.println("Error: Negative weight.");
    System.exit(0);
    else
    weight = newWeight; //name and age are unchanged.
    public PetRecord( )
    name = "No name yet.";
    age = 0;
    weight = 0;
    public String getName( )
    return name;
    public int getAge( )
    return age;
    public double getWeight( )
    return weight;

  • Purchased Light Room 5, installed, registered .. but keep getting this screen "An error occurred when attempting to change modules. ... OK" ?? WTF? ?

    Installed Light Room 5.2 from Disc on my mac os x (latest, updated version)
    But keep getting this "An error occurred when attempting to change modules.. OK" no other options/selection and of course if I click OK ... it crashed out ...
    Can anyone help?
    For such a big company .. there isn't any chat option to get to someone to talk to  !!!

    Just because you are the only user on the computer doesn't mean you are the administrator.
    Also, the fact that you are being asked to re-enter your serial number each time you start means that it is not being remembered because something is either preventing it from being written to you disk or (less likely) something is erasing it. This does suggest that you lack certain permissions to make changes to your computer. Not only to save your serial number, but to have access to the Lightroom files needed to change modules (they are just plug-ins within Lightroom).
    Try creating a new user account and run Lightroom from there (making sure that it is part of the Administrator group).
    To get to chat support, you have to choose the options:

  • Error: unexpected XML reader state. expected: END but found: START:

    I am getting following error while invoking method 'GetVersionInfo' (.net web service over dll) which takes one input parameter(string) and gives two output parameters(both short):
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception: deserialization
    error: unexpected XML reader state. expected: END but found: START:
    {UPPLink}pnVersionMajor
    ORA-06512: at "SYS.UTL_DBWS", line 388
    ORA-06512: at "SYS.UTL_DBWS", line 385
    ORA-06512: at line 40
    Expected Request is as follows:
    POST /UPPLink/UPPLink.asmx HTTP/1.1
    Host: 172.16.1.38
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    SOAPAction: "UPPLink/GetVersionInfo"
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <GetVersionInfo xmlns="UPPLink">
    <ignore>string</ignore>
    </GetVersionInfo>
    </soap:Body>
    </soap:Envelope>
    EXpected Response is as follows:
    HTTP/1.1 200 OK
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <GetVersionInfoResponse xmlns="UPPLink">
    <GetVersionInfoResult>
    <pnVersionMajor>short</pnVersionMajor>
    <pnVersionMinor>short</pnVersionMinor>
    </GetVersionInfoResult>
    </GetVersionInfoResponse>
    </soap:Body>
    </soap:Envelope>
    The PL/SQL code I am using is as follows:
    DECLARE
    service_ sys.utl_dbws.SERVICE;
    call_ sys.UTL_DBWS.call;
    service_qname sys.utl_dbws.QNAME;
    port_qname sys.utl_dbws.QNAME;
    operation_qname sys.utl_dbws.QNAME;
    string_type_qname sys.utl_dbws.QNAME;
    number_type_qname sys.utl_dbws.QNAME;
    retx ANYDATA;
    strEntry VARCHAR2(100);
    retx_string VARCHAR2(100);
    majorVersion NUMBER;
    minorVersion NUMBER;
    params sys.utl_dbws.ANYDATA_LIST;
    v_outputs sys.utl_dbws.anydata_list;
    BEGIN
    dbms_output.put_line('Starting Function');
    service_qname := sys.utl_dbws.to_qname(null, 'UPPLink');
    strEntry := 'vab';
    dbms_output.put_line('Creating Service');
    service_ := sys.utl_dbws.create_service(HTTPURITYPE('http://172.16.1.38/UPPLink/UPPLink.asmx?WSDL'), service_qname);
    dbms_output.put_line('Creating Operation');
    operation_qname := sys.utl_dbws.to_qname(null, 'GetVersionInfo');
    dbms_output.put_line('Calling Service');
    call_ := sys.utl_dbws.create_call(service_, null, operation_qname);
    sys.utl_dbws.set_property(call_, 'SOAPACTION_USE', 'true');
    sys.utl_dbws.set_property(call_, 'SOAPACTION_URI', 'UPPLink/GetVersionInfo');
    sys.utl_dbws.set_property(call_, 'OPERATION_STYLE', 'rpc');
    string_type_qname := sys.utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'string');
    number_type_qname := sys.utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'short');
    sys.utl_dbws.add_parameter(call_, 'ignore', string_type_qname, 'ParameterMode.IN');
    sys.utl_dbws.add_parameter(call_, 'pnVersionMinor', number_type_qname, 'ParameterMode.OUT');
    sys.utl_dbws.set_return_type(call_, number_type_qname);
    params(0) := ANYDATA.convertvarchar2(strEntry);
    dbms_output.put('Invoking with Input Parameter: ');
    dbms_output.put_line(ANYDATA.ACCESSVARCHAR2(params(0)));
    retx := sys.utl_dbws.invoke(call_, params);
    dbms_output.put_line('Invoke complete');
    majorVersion := retx.accessnumber;
    dbms_output.put_line('Major Version ' || majorVersion);
    v_outputs := SYS.utl_dbws.get_output_values(call_);
    minorVersion := ANYDATA.AccessNumber(v_outputs(1));
    dbms_output.put_line('Minor Version ' || minorVersion);
    sys.utl_dbws.release_service(service_);
    END;
    /

    Actually, the name needs to match what is specified in the WSDL file.

  • Deserialization error: unexpected XML reader state. expected: END but found

    I have a JWSDP (on weblogic 8.1 SP2) web service that is supposed to return a string that contains a small XML file. The client can call and invoke the service just fine and the service runs. When the client reads the response it blows up with the error below, what is causing this? The response looks okay to me.
    ====================================
    ERROR FROM THE CLIENT
    ====================================
    [java] java.rmi.RemoteException: Runtime exception; nested exception is:
    [java] deserialization error: unexpected XML reader state. expected: END but found: START: exchangeDataResult
    [java] at com.sun.xml.rpc.client.StreamingSender._handleRuntimeExceptionInSend(Ljava.lang.RuntimeExceptionV(StreamingSender.java:248)
    [java] at com.sun.xml.rpc.client.StreamingSender._send(Ljava.lang.String;Lcom.sun.xml.rpc.client.StreamingSenderStateV(StreamingSender.java:230)
    [java] at com.mcdata.websvc.riverbed.server.DataExchangerSoap_Stub.exchangeData(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.StringLjava.lang.String;(DataExchangerSoap_Stub.java:70)
    [java] at jsp_compiled.__index._jspService(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponseV(__index.java:141)
    [java] at weblogic.servlet.jsp.JspBase.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponseV(JspBase.java:33)
    [java] at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava.lang.Object;(ServletStubImpl.java:971)
    [java] at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.FilterChainImplV(ServletStubImpl.java:402)
    [java] at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponseV(ServletStubImpl.java:305)
    [java] at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava.lang.Object;(WebAppServletContext.java:6350)
    [java] at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedActionLjava.lang.Object;(AuthenticatedSubject.java:317)
    [java] at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedActionLjava.lang.Object;(SecurityManager.java:118)
    [java] at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletResponseImplV(WebAppServletContext.java:3635)
    [java] at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic.kernel.ExecuteThreadV(ServletRequestImpl.java:2585)
    [java] at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequestV(ExecuteThread.java:197)
    [java] at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:170)
    [java] at java.lang.Thread.startThreadFromVM(Ljava.lang.ThreadV(Unknown Source)
    [java] Caused by: deserialization error: unexpected XML reader state. expected: END but found: START: exchangeDataResult
    [java] at com.sun.xml.rpc.encoding.literal.LiteralSimpleTypeSerializer.deserialize(Ljavax.xml.namespace.QName;Lcom.sun.xml.rpc.streaming.XMLReader;Lcom.sun.xml.rpc.encoding.SOAPDeserializationContextLjava.lang.Object;(LiteralSimpleTypeSeri
    alizer.java:133)
    [java] at com.mcdata.websvc.riverbed.server.DataExchangerSoap_Stub._deserialize_exchangeData(Lcom.sun.xml.rpc.streaming.XMLReader;Lcom.sun.xml.rpc.encoding.SOAPDeserializationContext;Lcom.sun.xml.rpc.client.StreamingSenderStateV(DataExchan
    gerSoap_Stub.java:117)
    [java] at com.mcdata.websvc.riverbed.server.DataExchangerSoap_Stub._readFirstBodyElement(Lcom.sun.xml.rpc.streaming.XMLReader;Lcom.sun.xml.rpc.encoding.SOAPDeserializationContext;Lcom.sun.xml.rpc.client.StreamingSenderStateV(DataExchangerS
    oap_Stub.java:104)
    [java] at com.sun.xml.rpc.client.StreamingSender._send(Ljava.lang.String;Lcom.sun.xml.rpc.client.StreamingSenderStateV(StreamingSender.java:158)
    [java] ... 14 more
    ====================================
    SOAP RESPONSE
    ====================================
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <env:Header>
    </env:Header>
    <env:Body env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <m:exchangeDataResponse xmlns:m="https://partners.mcdata.com">
    <exchangeDataResult xsi:type="xsd:string"><status>OK</status>
    <message>Transaction accepted.</message></exchangeDataResult>
    </m:exchangeDataResponse>
    </env:Body>
    </env:Envelope>
    ====================================
    WSDL
    ====================================
    <?xml version="1.0" encoding="utf-8"?>
    <wsdl:definitions
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:tns="https://partners.mcdata.com"
    xmlns:s="http://www.w3.org/2001/XMLSchema"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    targetNamespace="https://partners.mcdata.com"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    name="">
    <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="https://partners.mcdata.com">
    <s:element name="exchangeData">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="sender" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="transactionType" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="data" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="exchangeDataResponse" type="s:string" />
    </s:schema>
    </wsdl:types>
    <wsdl:message name="exchangeDataSoapIn">
    <wsdl:part name="parameters" element="tns:exchangeData" />
    </wsdl:message>
    <wsdl:message name="exchangeDataSoapOut">
    <wsdl:part name="parameters" element="tns:exchangeDataResponse" />
    </wsdl:message>
    <wsdl:portType name="DataExchangerSoap">
    <wsdl:operation name="exchangeData">
    <wsdl:input message="tns:exchangeDataSoapIn" />
    <wsdl:output message="tns:exchangeDataSoapOut" />
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="DataExchangerSoap" type="tns:DataExchangerSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="exchangeData">
    <soap:operation soapAction="https://208.47.133.243/riverbedshipserver/exchangeData" style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="DataExchanger">
    <wsdl:port name="DataExchangerSoap" binding="tns:DataExchangerSoap">
    <soap:address location="https://208.47.133.243/riverbedshipserver/exchangeData" />
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    ====================================
    web-services.xml
    ====================================
    <web-services>
    <web-service
    name="riverbedshipserver"
    targetNamespace="https://partners.mcdata.com"
    uri="exchangeData"
    >
    <components>
    <java-class name="DataExchanger" class-name="com.mcdata.websvc.riverbed.server.DataExchangerImpl"/>
    </components>
    <operations xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <operation name="exchangeData" component="DataExchanger" method="exchangeData">
    <params>
    <param name="sender" style="in" type="xsd:string" location="header"/>
    <param name="password" style="in" type="xsd:string" location="header"/>
    <param name="transactionType" style="in" type="xsd:string" location="header"/>
    <param name="data" style="in" type="xsd:string" location="header"/>
    <return-param name="exchangeDataResult" type="xsd:string"/>
    </params>
    </operation>
    </operations>
    </web-service>
    </web-services>

    This is caused by the response xml parameter is greater than the response parameter you have specified in your wsdl. Try to use packet monitoring to monitor all the process, you will notice that problems.

Maybe you are looking for

  • Error G/L Account is not defined in Chart of Account INT

    Hi, I have create a company code by doing copy of SG01 in transaction EC01. I have also create a vendor under the newly created company code. When i try to do a testing in FB60 transaction it prompt me an error : G/L Account is not defined in Chart o

  • OAS in Unix: URL not found when run report from Form???? please help

    Hi, We have succesfully install OAS with Form Server and Report Server in Unix. We able to run Form and Report direct from browser. But we having problem to run Report from direct Form within the browser. The message from the browser was 'The request

  • Aperture seems to apply a color profile to raw by itself

    When I open up a image in aperture, it shows the image as shot for a second and then disorts the colors for some reason, applying some kind of preset profile to every raw I open. Below, it shows "processing" for the second before changing the colors.

  • TDS Calculation in SAP Business One 8.8

    Hi Experts ,                         I am making  a service invoice in which i have to calculate the TDS on Base Amount + Service Tax Amount . But it is calculating TDS only on  base amount . Kindly Suggest any solution . Regards

  • Reopen the order from completed status

    Hi All, I am witnessing a wierd behaviour for which I need your help. Following is my status sequencing in SPRO. NO.   STATUS.            LOWEST   HIGHEST   TRANSACTION 10      OPEN                10             50                INPR 20      DISPATC