Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing a large string to a procedure

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,
I am passing a long string from Vb to this stored proc ..

defn:
Create Or Replace Procedure saveTaxFormInDB(intFormUID IN number,
intCLUID IN number,
PDFdata IN varchar2,
Status IN OUT Varchar2) AS
...

Problem lies with the string pdfdata. I am sending it from VB as:

Set cmdParamStr = cmdAdoCmd.CreateParameter("Data", adVarChar,
adParamInput, 32767, strData)

I have checked the parameters in VB while sending and I have the
correct string argument to be passed to "PDFData", But i am not
sure if it is getting the value correctly.
Because I know that the code is raising exception while
accessing PDFData. (eg. in places like insert ..(pdfdata) and
length(pdfdata)...)

Please advise how i can solve this problem.

Please Note that the string is not VERY large. This string I am passing has a length of around 5000 (by len(PDFdata)) . Please advise what data type to use in both sides.

Many thanks
 

VARCHAR2 has a limit of 4000 bytes maximum, why not use LONG instead. I haven't tried this one but I don't think it will hurt if you give it a try.. Robbie

"The rule is, not to besiege walled cities if it can possibly be avoided" -- Art of War
 
please note the pl/sql will accept varchar2 variable to hold values of 32767 bytes but the tables with columns defined as varchar2 will nto be able to hold values more than 4000 bytes.

so there is a difference. u can use something like abc := def where def can be more than 4000 bytes and less then 32767 and both abc and def are varchar2 but if u do something like insert into a table then it'll raise an exception because a table columsdefined a varchar2 will not like the data width be more than 4000 bytes.

hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top