Results 1 to 7 of 7

Thread: Passing parameter to Procedure when paremeter is type LONG

  1. #1

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Passing parameter to Procedure when paremeter is type LONG

    Hi
    I must to do a procedure in the vb that call a Stored procedure in Oracle, but inside oracle a of the parameters is type LONG and can not to change type of procedure.
    I must do send a HTML code in the parameter , I tried code below

    Code:
    ...
    ...
    Set param3 = cmd.CreateParameter("P_DS_CORPO", adChar, adParamInput, 10000)
      cmd.Parameters.Append param3
      param3.Value = mensagem
    ...
    ..
    When parameter mensagem is only text work fine. The Stored Procedure work fine with other applications, other stored procedures or applications (no vb) call and work fine, I changed adchar by adLongVarChar and too no worked

  2. #2

  3. #3

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Re: Passing parameter to Procedure when paremeter is type LONG

    Hi thank you

    Code:
    Set param3 = cmd.CreateParameter("P_DS_CORPO", adChar, adParamInput, 10000)
    by

    Code:
     Set param3 = cmd.CreateParameter("P_DS_CORPO", adLongVarChar, adParamInput, 10000)
      cmd.Parameters.Append param3
      param3.Value = mensagem

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Passing parameter to Procedure when paremeter is type LONG

    You got an error because adLongVarChar is used for long strings. It is not a numeric constant.

    Here is a list of acceptable parameter contants. Perhaps adVarNumeric would work for you...I don't know.

    Play around with what is available. I'm sure you will find the right thing.

    Post what you come up with as your solution might help others in the future.

  5. #5
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: Passing parameter to Procedure when paremeter is type LONG

    adInteger is Long.

    adSmallInt is Integer.

    Both right in the MSDN Library docs that came with VB6. DataTypeEnum

  6. #6
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Passing parameter to Procedure when paremeter is type LONG

    Oracle's LONG data type has nothing to do with numeric values - it was designed to accept large strings (up to 2GB) but it's depricated since 9i release and is provided for backward compatibility only.
    CLOB should really be used instead - 9i and 10g support up to 8TB, Oracle 11g supprts 8 to 128 TB (!).

  7. #7

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