Results 1 to 8 of 8

Thread: Type incompatible error

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2017
    Posts
    4

    Type incompatible error

    Hi everyone,
    i'm new on V.B. I have a little issue

    V_Rate = SystemScript.GetDatabaseValue(V_SQL & "", "NVL(COLUMN A,0)", "TABLE C")
    V_LoadingAmount = SystemScript.GetDatabaseValue(V_SQL & "", "NVL(COLUMN B,0)", "TABLE C")

    COLUMN A and COLUMN B type's are number on table C

    where i try this formula

    V_Premium = (V_Valeur_Venale * V_Rate / 1000) + V_LoadingAmount

    an error message is displayed Type incompatible: 'V_RATE'

    can somebody advise?

  2. #2
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,526

    Re: Type incompatible error

    What Type of variable did you define V_Rate as in your program?

  3. #3
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,624

    Re: Type incompatible error

    Are you using Excel?

    Appears this belongs in the Office Forum (for things like Word/Excel/VBA (Visual Basic for Applications)).

  4. #4

    Thread Starter
    New Member
    Join Date
    Mar 2017
    Posts
    4

    Re: Type incompatible error

    jdc i have declared v_rate without type

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2017
    Posts
    4

    Re: Type incompatible error

    no its not excel.lt s a develpment module for an application that uses vb

  6. #6
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: Type incompatible error

    Quote Originally Posted by ns-moez View Post
    no its not excel.lt s a develpment module for an application that uses vb
    What do you mean by application that uses VB
    Either it is written in VB or is is VBA or VBScript. This section is for VB.
    The message you mention does not seem like a VB message at all so am thinking you are using VBA or some flavor of it within some other application.

    The Classic VB message would be Type Mismatch if the wrong type is used and Overflow if the resulting number is to large.


    so V_Rate is a Variant then?
    what about loading amount?

    You really should determine what type you need and specify it with dimming your vars

  7. #7

    Thread Starter
    New Member
    Join Date
    Mar 2017
    Posts
    4

    Re: Type incompatible error

    DATAMISER
    Type incompatible is the french translation of typemismatch, sorry i had to mention that. i m beginner on vb,tomorrow i will determine the type of my vars and i will check. thanks for the advice

  8. #8
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,229

    Re: Type incompatible error

    It's .NET

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width