error C2026: string too big, trailing characters truncated
-
Hello all, Please help me... I am creating Stored Procedure programmatically using db_command code is some thing like [ db_command(".. very long SQL stored procedure string....") ] my stored procedure command string is too long.. while compiling I am getting this "error C2026: string too big, trailing characters truncated" error. Thanks in advance.. :(
-
Hello all, Please help me... I am creating Stored Procedure programmatically using db_command code is some thing like [ db_command(".. very long SQL stored procedure string....") ] my stored procedure command string is too long.. while compiling I am getting this "error C2026: string too big, trailing characters truncated" error. Thanks in advance.. :(
According to this page [^] you may try to split it into two adjacent string literals. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Hello all, Please help me... I am creating Stored Procedure programmatically using db_command code is some thing like [ db_command(".. very long SQL stored procedure string....") ] my stored procedure command string is too long.. while compiling I am getting this "error C2026: string too big, trailing characters truncated" error. Thanks in advance.. :(
-
According to this page [^] you may try to split it into two adjacent string literals. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]Thanks you for reply.. I had already visited this link .. I have tried this but still I am getting same error. :confused:
-
Hello all, Please help me... I am creating Stored Procedure programmatically using db_command code is some thing like [ db_command(".. very long SQL stored procedure string....") ] my stored procedure command string is too long.. while compiling I am getting this "error C2026: string too big, trailing characters truncated" error. Thanks in advance.. :(
Instead of doing something like:
str = "very long SQL stored procedure string";
try this instead:
str = "very long "
str += "SQL stored ";
str += "procedure string";Strings can be as long as you have enough memory for. The compiler is simply complaining about your string literals.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne