varchar not var'ing

  • Thread starter Thread starter Charlie Williams
  • Start date Start date
C

Charlie Williams

I have a routine to update my SQL Server database where I
call a stored procedure and pass it the appropriate
parameters. Everything works ok, except that the fields
that I have defined in my DB as varchar are being padded
with whitespace, as if they were char fields. I even
tried calling Trim() on the strings before assigning them
to the value of the parameters in question, but it did not
help.

What am I missing?

Charlie (SQL newbie, in case it wasn't obvious)
 
This sounds strange, have you spefiied the right datatype
for your parameter?

/Fredrik Normén NSQUARED
 
Please withhold your ridicule and mockery, for I feel
sufficiently stupid.

I changed the data type of the column from char to varchar
after I wrote the stored procedure and I neglected to
update the sp after the change. I realized the problem at
5:30 this morning while I was taking a shower.

I apologize if anyone spent their valuable time on my
question.

Charlie
 
Only 12,345 people spent 3 hours on each.

So, at $100.00 per hour your bill will be a paltry $3,703,500.00.
 
Back
Top