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:blush:
Re: Passing parameter to Procedure when paremeter is type LONG
What does "I changed adchar by adLongVarChar..." mean?
How is the data that goes into adLongVarChar defined?
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
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.
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
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 (!).
Re: Passing parameter to Procedure when paremeter is type LONG
Also, I think you can only use OLEDB provider from Oracle (MS doesn't support clob types). I don't have necessary tools to test this at the moment.