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!

sql oledb, wrong field length, stored proc

Status
Not open for further replies.

pelajhia

Programmer
May 19, 1999
592
US
I have some crystal developers who have created reports using a sql server stored procedure which returns various fields at certain lengths, however when used in a crystal report (v.xi) these come into the report with different, shorter lengths. Example: field1 returns length30 when the stored procedure is run outside of the report, but shows as length [7] within cr.

I saw this old thread which hinted at this problem in previous versions: thread766-583253 however it's a closed thread. Has anyone seen this recently in the newest versions of CR? I am assuming it's driver related but other than that unsure of a first step. Thanks for any help.
 
If you think it driver related, then test by using a different connectivity, ushc as ODBC.

Also make sure that the SP does return data at the required length, since the final statement is likely a select in the SP, it may not be returning the length you expect.

In general, we can't see your SP code so it's hard to diagnose, I would suggest forcing the length in the SP by padding or some such, perhaps even try a CAST on it to a standard varchar(30) within the SP. Not stating the data type doesn't help either.

-k
 
Thanks so much for the prompt reply, sorry for my vague info...turns out that I did need to get more info in general on the problem. The report developer first described this as though this had been ongoing, but after further discussion I found out the dbas increased the size of the column recently (string, for the record) and of course I then realized this was probably just needing a simple 'verify database'. Sure enough this worked fine.

I do appreciate the trouble shooting tips for future reference, thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top