Results 1 to 4 of 4

Thread: HELPPPPPPP!!!!

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2000
    Posts
    32

    Angry

    Does anyone know what the constant adNumeric is equal to in Visual Basic?

  2. #2
    Fanatic Member Gaffer's Avatar
    Join Date
    Nov 2000
    Location
    London
    Posts
    828
    Is this to identify if an items is numeric or not?

    If so,

    Code:
    If IsNumeric(Text1.text) Then
    	MsgBox “Numeric”
    Else
    	Msgbox “Not Numeric”
    End If
    Hope this is of use…

  3. #3
    Hyperactive Member
    Join Date
    Oct 2000
    Posts
    400
    It's easy to find out what any constant is:

    Open up the debug window (Ctrl+G)
    type the following:

    ? adNumeric

    or any other constant. If you need the data type of a constant, type:

    ? VarType(adNumeric)

    Most of them are, obviously, long, but it doesn't hurt to check.
    (btw: look up VarType in the help file to see what the number it returns means. I think 3 means long but not sure...)


  4. #4

    Thread Starter
    Member
    Join Date
    Jan 2000
    Posts
    32

    jmcswain??? Sound right to you???

    Actually the reason I needed to know that was a function I am debugging is passing a parameter as a double into a method then calling a function that makes the parameter list for a store procedure passing the double.

    Example:
    mp(ByVal PName As String, ByVal PType As ADODB.DataTypeEnum, ByVal PSize As Integer, ByVal PValue As Variant)

    The type specified for ADODB.DataTypeEnum was adNumeric which is giving a Type Mismatch error.

    I changed it to adDouble and that appears to be working.

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