ruvik
asked on
Sql Server Odbc truncate strings
Hi,
I have a stored procedure in Sql Server returning varchar with maximum length of 50.
I define an OdbcParameter with direction equals to returnValue, and after executing the stored procedure, the value shows only the first character, which was truncated.
Im using Microsoft SQL Server ODBC Driver Version 03.85.1025.
When i use the same code with an equivalent Oracle stored procedure it works fine.
Any help is appreciated.
I have a stored procedure in Sql Server returning varchar with maximum length of 50.
I define an OdbcParameter with direction equals to returnValue, and after executing the stored procedure, the value shows only the first character, which was truncated.
Im using Microsoft SQL Server ODBC Driver Version 03.85.1025.
When i use the same code with an equivalent Oracle stored procedure it works fine.
Any help is appreciated.
ASKER
Yes I know that and Ive already tried all the text like types (just in case), but none did the trick.
No matter the parameter type, it always truncates the entire string but the first character.
No matter the parameter type, it always truncates the entire string but the first character.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
stupied me! since im new to sql server i returned type varchar instead of varchar(50).
Otana, i will accept your answer only because you made me look again in the query analyzer and discover my stupidity.
Otana, i will accept your answer only because you made me look again in the query analyzer and discover my stupidity.
Thnx. That's what I thought might have happened. Happens to me all the time :o)
yourcommand.Parameters.Add
OdbcType.VarChar,50,Parame