System.InvalidCastException: Operator ' =' is not defined for type 'Byte()' and type 'Integer'.

I'm getting the following error
System.InvalidCastException: Operator '>=' is not defined for type 'Byte()' and type 'Integer'.
   at Microsoft.VisualBasic.CompilerServices.Operators.InvokeObjectUserDefinedOperator(UserDefinedOperator Op, Object[] Arguments)
   at Microsoft.VisualBasic.CompilerServices.Operators.InvokeUserDefinedOperator(UserDefinedOperator Op, Object[] Arguments)
   at Microsoft.VisualBasic.CompilerServices.Operators.CompareObjectGreaterEqual(Object Left, Object Right, Boolean TextCompare)
   at Customer_Fee_Calculator.Form1.GetCost2(Object dimension) in C:\Users\Chris\Documents\Visual Studio 2013\Projects\Customer Fee Calculator\Customer Fee Calculator\Form1.vb:line 259
   at Customer_Fee_Calculator.Form1.CustomerSelect_SelectedIndexChanged(Object sender, EventArgs e) in C:\Users\Chris\Documents\Visual Studio 2013\Projects\Customer Fee Calculator\Customer Fee Calculator\Form1.vb:line 72
            Dim inotes = rs1("INOTES").Value
  (Line 72)          If inotes.Length > 1 Then
                cost = GetCost2(rs1("INOTES").Value)(0)
                desc = GetCost2(rs1("INOTES").Value)(1)
            Else
                PkgType = CInt(rs1("PKGTYPE").Value)
                cost = GetCost(PkgType)(0)
                desc = GetCost(PkgType)(1)
            End If
 Function GetCost2(dimension)
        Dim tempSql1, rs1
        Dim MyResult As New ArrayList
        Select Case dimension
(line 259)            Case 1 To 24
                tempSql1 = "SELECT * FROM PRODUCT WHERE PRODUCTID = 13"
            Case 25 To 43
                tempSql1 = "SELECT * FROM PRODUCT WHERE PRODUCTID = 14"
            Case 44 To 71
                tempSql1 = "SELECT * FROM PRODUCT WHERE PRODUCTID = 16"
            Case 72 To 120
                tempSql1 = "SELECT * FROM PRODUCT WHERE PRODUCTID = 17"
            Case 121 To 499
                tempSql1 = "SELECT * FROM PRODUCT WHERE PRODUCTID = 18"
            Case 500
                tempSql1 = "SELECT * FROM PRODUCT WHERE PRODUCTID = 19"
            Case Else
                tempSql1 = "SELECT * FROM PRODUCT WHERE PRODUCTID = 14"
        End Select
        rs1 = dbconnect(tempSql1, 1)
        MyResult.Add(rs1("RETAIL1").Value)
        MyResult.Add(rs1("DESCRIPTION").Value)
        MyResult.Add(rs1("PRODUCTID").Value)
        rs1 = Nothing
        tempSql1 = Nothing
        Return MyResult
    End Function

Chris,
I'm not a database guy - so in many ways, I'm not really qualified to answer this, but I'll make a suggestion anyway:
At the very top of your code, put the following:
Option Strict On
Option Explicit On
Option Infer Off
With strict on and infer off, it will force you declare types - which I see missing in many places in the code.
It's entirely possible that by you then going through and fixing those issues, you'll have corrected the problem.
I don't know that, but it's possible -- and it should be done this way anyway, so there's certainly no harm to be done; in fact you'll actually speed up the program to a small degree because objects don't have to be inferred for the type that they actually
are.
***** EDIT *****
Also this: DON'T declare any of the types simply as "Object"; that's just trading off late binding for boxing, so you haven't really done much good. Declare them each as their correct actual type.
Still lost in code, just at a little higher level.

Similar Messages

  • Exception '1250' is not defined for method 'CREATE' object type 'MESSAGE'

    Dear experts,
    I set up the document distribution (SWU3, backgroundjob SMTP, activated the workflows, flagged the linkages, etc). Now, I have still a error:
    Exception '1250' is not defined for method 'CREATE' object type 'MESSAGE'
    Does anyone know what the cause of exception 1250 could be?
    Thanks in advance and kind regards,
    Samuel

    hi,
    SAP ITS is SAP Internet Transaction Server which provides connection between SAP ERP system and html client.
    Check with bassis, i think TCP/IP or work station application not configured yet. i guess?
    Benakaraja
    ??P

  • Not able to create database even with a subscription. (The operation is not supported for your subscription offer type)

    Hi,
    I am trying to create a SQL server database, but are not able to. I get this message: The operation is not supported for your subscription offer type.
    I have to azure accounts and this is only happening in one of them.
    I have created a subscription, but I can see that I have 1250 NOK in credit that is expiring in 29 days.
    Regards
    Christian
    ChristianLLoyd

    Hi Christian,
    The error you saw should only occur for a subscription used with a free trial offer type. Please use the below link to open a support ticket.
    http://azure.microsoft.com/en-us/support/options/
    You can check the following links for similar issues.
    The operation is not supported for your subscription offer type
    Could not submit the request to create database
    DBNAME. The operation is not supported for your subscription offer type
    Thanks,
    Lydia Zhang
    If you have any feedback on our support, please click
    here.
    Lydia Zhang
    TechNet Community Support

  • V-41 tcode error :Table 304 is not defined for use with condition type PR00

    Hi All,
    I am trying to create a BDC using the transaction V-41. 
    The first screen has fields:
    ConditionType and Table, where I have to fill values ZPM1 and 800 respectively.
    But as soon as I enter the tcode v-41 and say enter, the above mentioned fields are already having the  values 'PR00' and ' 304'. Normally if you take an example fo t-code VA02, all fields are blank.
    Then an error message  is displayed:
    Table 304 is not defined for use with condition type PR00
    This behaviour is not allowing me to use the BDC feature.
    Please advise me on why this is happening. What are the possible solutions I can use to clear these values programmatically?
    Can anything be done via customizing?
    Regards,
    Namita.

    Dear ILHAN ,
    Well the problem you are facing is having the following solution:
    Table 304 is not defined for use with condition type PR00
    Message no. VK024
    Diagnosis
    The selected condition type does not fit in the condition table, that is the basis for the condition record. Alternatively the selected condition type is not included in the condition types that were selected on the selection screen or that are defined in the variant of the standard selection report.
    Procedure
    Úse F4 help to choose a valid condition type.
    If this does not give you the required condition type, check in Customizing for condition types and the related access sequences.
    In the condition maintenance also check Customizing for the selection report (pricing report), that you have selected in the navigation tree, using the standard condition table as a reference.
    I hope this helps.
    It has worked for me.
    I gave it a try and what I am getting using the transaction V-41 is create Price condition (PR00) : Fast Entry.
    Please award points if you find it useful.
    Regards,
    Rakesh

  • Exception '1003' is not defined for method 'SENDTASKDESCRIPTION' object type 'SELFITEM'

    Hi All,
    Please help me in this. I am trying to send a mail when user rejected the item in his inbox. I am getting error like
    Exception '1003' is not defined for method 'SENDTASKDESCRIPTION' object type 'SELFITEM'. I tried so  many ways like no attachments,send express ,siganture,encryption all disabled but still the same error from user outbox who ever rejects it.
    Regards,
    Madhu.

    Hi Madhu,
    This exception is raised means you have checked the Signature check-box  and encrypt check box.
    Now you have unchecked that the issue should be solved , but if it is still giving the same exception synchronize your run time buffer using the t-code SWU_OBUF .
    Let me know if the issue is still there.
    Regards
    Bikas

  • This operation is not available for read only field 'Type MVF'

    Hi All,
    We are using OrderToCash PIP and we are on Siebel 8.1X.
    While Synching the customer from Ebiz to Siebel facing the following issues:
    Method 'WriteRecord' of business component 'Account' (integration component 'Account') for record with search specification '[Row Id] = "2d3434313239353"' returned the following error:"This operation is not available for read only field 'Type MVF'.(SBL-DAT-00402)"(SBL-EAI-04451)
    Please suggest us what steps to be done in Siebel.
    Thanks
    Maanasa

    First check the process why this is calling Account BC WriteRecord(). The field "Type MVF" might be read only and this sync process is trying to update this field which is read only. This is the reason for the error. Check the OM log / EAI Obj Manager Comp log (set log level to 5) and check.
    Joseph Arul Dass

  • Excise modvat accounts not defined for CAPE transaction and TS excise group

    Hi Guys,
    Suddenly we are facing issue during exicse invoice capturing with MIGO
    system is giving following error
    "Excise modvat accounts not defined for CAPE transaction and TS excise group
    Message no. 8I402
    While in Excise account assignment table CAPE is Linked to Modvat Clearing Account which is further liked to correct GL
    Can any one explain the cause of this issue Points will be awarded
    Regards,
    Ashish

    Hi
    Pls maintain the following:
    1. SPRO->Logistics General -> Tax on Goods Movements -> India -> Account Determination -> Specify Excise Accounts per Excise Transaction
    Pls note the Sub Tansaction type is IP for ETT CAPE.
    ETT  <b>Sub Trn Type</b>   DC Ind                Account Name
    CAPE     IP           CR Credit     ONHOLD CENVAT on hold account
    CAPE     IP           DR Debit     ONHOLD CENVAT on hold account
    CAPE     IP           DR Debit     RG23AED RG 23 AED account
    CAPE     IP           DR Debit     RG23BED RG 23 BED account
    CAPE     IP           DR Debit     RG23SED RG 23 SED account
    CAPE       IP                   DR Debit             RG23ECS RG 23 ECS account
    2. SPRO->Logistics General -> Tax on Goods Movements -> India -> Account Determination -> Specify G/L Accounts per Excise Transaction
    Check the G/L accounts for Excise Transaction Type CAPE and maintain the same G/L accounts for ETT CAPE with <b>Sub Trn Type IP</b>.
    Hope this clarifies.
    Thanks

  • Special G/L transactions not defined for bills/exch.and down pmnts ERROR

    Dear Experts,
    I am trying to park document via F-63 - Invoice Parking - General  to park  down payments made to vendor using following details in initial screen for F-63:
    Posting Key_____29
    Account number _1000
    SGL Ind ________A
    after pressing enter key the system prompt error message that is:
    Special G/L transactions not defined for bills/exch.and down pmnts
    Message no. FP030
    Diagnosis
    You have selected a posting key with a special G/L indicator of type 'Bill of exchange', or 'Down payment'. Document parking is not defined for special G/L transactions of the type 'Bill of exchange' or 'Down payment'.
    System Response
    Document parking cannot be carried out.
    Procedure
    Select a different posting key or special G/L indicator. If the posting is a 'One-time posting' to a rent contract, select a different transaction type or post the document directly.
    HOW CAN I PARK DOWN PAYMENT DOCUMENT FOR VENDOR. KINDLY PROVIDE SUITABLE SOLUTION.
    REGARDS

    Dear,
    Your special G/L "A" is set as Down Payment/Down Payment request, this is what cause the error.
    To meet your requirement just go to FBKP select special G/L "A" enter your chart of accounts and go into properties, change
    Special G/L transaction types to Others from Payment/Down payment request.
    Advances can be created as Special G/L transaction types Others
    If parking is utmost required by you then according to me you should create two special G/L for Down Payment. New created should be used for parking and default by SAP you can use with functionality like F-47, F-48, F-54.
    System is stopping you because down payment functionality is provided exhaustively in SAP so you should follow that.
    Please analyze the process exhaustively and implement to smoothen your process.
    Regards,
    Chintan Joshi.

  • Special G/L transactions not defined for bills/exch.and down pmnts

    Dear Sapguru,
      When i am down payment parking through F-65, and giving special gl indictor.
    Error:---Special G/L transactions not defined for bills/exch.and down pmnts
    Message no. FP030
    Diagnosis
    You have selected a posting key with a special G/L indicator of type 'Bill of exchange', or 'Down payment'. Document parking is not defined for special G/L transactions of the type 'Bill of exchange' or 'Down payment'.
    System Response
    Document parking cannot be carried out.
    Procedure
    Select a different posting key or special G/L indicator. If the posting is a 'One-time posting' to a rent contract, select a different transaction type or post the document directly.
    Thanks.
    Dharma.

    Did you define spec. GL through OBXR (customers) or OBYR (vendors)?
    regards

  • Excise modvat accounts not defined for GRPO transaction and 50 excise group

    Hi Gurus,
    1.While saving an Outgoing Excise Invoice for a Factory Sale.(TAXINN)......  the system generates "Excise modvat accounts not defined for GRPO transaction and 50 excise group"
    Can someone help me in this...
    Thanks
    Sasi

    hi,
    go tax on goods movement,acc.det.,specify G/L acc.for excise transactions
    select your excise group, Excise Transaction Type (GPRO), Chart of Accounts, Company code & relevant GL Accounts & Save.
    Now you can proceed.
    Hope this helps you.
    Thanks & Regards
    Krishna Mohan

  • Excise modvat accounts not defined for GRPO transaction and 21 excise group

    Hello SD Gurus,
    I am getting Following message while process of reversing ARE1
    I have followed following step to reverse .
    1. go to transaction code J1ia101
    2. select at reversal screen
    3.give the created ARE1 doc no.
    4. given the reson for reversal
    5 go to utilization tab
    6. give the payable amount in PLA bed Account
    7. click on item display
    8 click on balances
    system gives following error message
    Excise modvat accounts not defined for GRPO transaction and 21 excise group
    Message no. 8I402
    I have checked in SPRO for acount assignment in following path
    Tax on Goods Movements --> Account Determination --> Specify G/L Accounts per Excise Transaction
    Thanks for promt reply

    Go to IMG --> Logistics General --> Tax on Goods Movements --> India --> Account Determination --> Specify Excise Accounts per Excise Transaction.
    Here maintain Excise Transaction Type GRPO with respective G/L accounts
    thanks
    G. Lakshmipathi

  • Error : Excise modvat accounts not defined for GRPO transaction and U1 exci

    I have Created Impot PO, After Planned Delivery cost MIRO I am trying to Perform GR then its giving Error "Excise modvat accounts not defined for GRPO transaction and U1 excise group
    Message no. 8I402"
          I have already maintained GL account in "Specify G/L Accounts per Excise Transaction" for Excise group U1
          This problem is coming when Additional Duty on custom condition type JADC is maintained in "Maintain Excise Defaults" node in the column "ADC Cond" . If I remove JADC condition type from this place the this error is not coming but AED column is not fetching any value while doing GR.
    Please help me in this issue , still No answer
    Edited by: shiwanshu singh on Jan 28, 2009 10:26 AM

    Dear sir
    For GRPO have you maintained sub transaction Type IP for your excise group U1. If you not maintained pl maintain . and assign G/L account to modvat clearing account , the G/l account should be same as company code CVD account.
    Regards
    jrp

  • Excise modvat accounts not defined for DLFC transaction and excise group

    Dear Experts,
    Iam raising this question after checking all the contents related to Sub Transaction type in SDN.
    My prob is: for raw material sales scenario i have created order delivery and invoice. For Invoice i have done account determination with a different G/L in VKOA. Now i have to create an excise invoice and the accounting entry for central ED on sales should go to different G/L account. for account determination i have done the following settings:
    Maintained Sub transaction type in
    IMG -> Logistics - General -> Tax on Goods movement -> India -> Basic Settings
    ->Maintain Sub Transaction types
    IMG -> Logistics - General -> Tax on Goods movement -> India ->
    Account determination -> Specify Excise Accounts per Excise Transaction.
    Here against DLFC sub transaction Type is maintained..
    Also
    IMG -> Logistics - General -> Tax on Goods movement -> India -> Account determination -> Specify G/L Accounts per Excise Transaction
    Here maintained Excise group with DLFC Company Code subtransaction type, chart of accounts and all required GL Account .
    But when the iam creating Excise Invoice in J1IIN and clicking on Subtransaction type-F4, no entries are shown. No values found is the message in green. Message no. DH801
    If i use subtransaction type and enter billing document and enter, the following error message comes:
    "Excise modvat accounts not defined for DLFC transaction and excise group"
    Iam unable to understand why the subtransaction type maintained is not showing in TCODE J1IIN?
    Regards

    For the error message DH801, please check note 840911
    Excise modvat accounts not defined for
           DLFC transaction and excise group"
    Please check  your G/L assignments "Specify G/L Accounts per Excise Transaction"
    thanks
    G. Lakshmipathi

  • Error - Excise modvat accounts not defined for DLFC transaction and 01 exci

    Dear All,
    Getting below error while  doing J1IIN - Posting Excise invoice for Sale.
    "Excise modvat accounts not defined for DLFC transaction and 01 excise group"
    I checked with the settings GL are assigned to for DLFC and 01 excise group.
    Is anywhere else I need to mantain the modvat GL
    Regards,
    Rakesh

    Check if you are using any subtransaction type along with excise transaction type.
    Excise group, ETT, company code, sub transaction type (if any), Chart of account, Modvat account (pls maintain all the entries over here) search for modavat clearing field and maintain it.
    BR
    Edited by: Sujoy on Jan 15, 2010 9:45 AM

  • Excise modvat accounts not defined for DLFC transaction and 01 excise group

    Dear All,
    While creating excise invoice through i am getting the error Excise modvat accounts not defined for DLFC transaction and 01 excise group. So i am not able to save that excise invoice. we have used the TAXINJ procedure. 
    I had already maintained the settings SPRO > Logistics general > Tax on
    goods mvmt > India > Business trasacttion > Outgoing excis einvoice >
    Maintain default excise series group
    and also maintained settings, SPRO > Logistics general > Tax on goods
    mvmt > India > Account Determination > Maintain Subtransaction Types
    Please help me inthis aspect to come out of this problem
    Regards,
    Suresh Yadav.

    Hi Suresh,
    Maintain G/L accounts for DLFC transaction under SPRO > Logistics general > Tax on goods
    mvmt > India > Account Determination > Specify G/L accounts per Excise Transaction.
    Regards,
    Rajesh

Maybe you are looking for

  • Where are the update files located?

    Hi. We have five Macs around here: two Tigers, two Panthers, and a Jaguar. It's a royal pain to have to download the update files individually for each machine. Can somebody tell me where the update files are stored, so we can save time and bandwidth

  • 16x DVD's not useable on a G5?

    Hey all, I bought some 16x DVD's to backup my music collection, but I can't get them to burn. I tried blowing out the drive bay (to the best of my ability) and still nothing. It will see that there's a DVD in there, but not every time. Does this soun

  • IPhoto to IDVD Slideshow problem

    I made a slideshow ( 2900) photos from IPHOTO to IDVD ( used SEND TO IDVD for IPHOTO menu ) it took 6hrs.+ to complete the DVD, i did not save the project in IDVD but thhe system used 30 gig of hard disc space anyone known how i can recover the ( LOS

  • "local area network" adapter

    Sometimes this adapter stops working, spontanuely, and I have to reset it, to fix connection. Wonder if I have latest driver. Could you specify link with appropriate driver. m/b  760gm-e51

  • Customizable folder-layout (Settings)

    Hi All, I have searched for posts, that could belong to my use case, but I couldnt find some. Use Case: I want an option, so that all portal users could chnage their own folder layout - that is no problem (Details--> presentation). But in the present