|
-
Jan 17th, 2005, 06:27 AM
#1
Thread Starter
Addicted Member
alternative to TRIM?? help needed.....
Hey guys
my field is set up in sql as char 100
although when i pass in a string of say 10 charcters, this is stored in the field as 10 characters followed by 90 spaces, does anyone know why this is??
I suppose a way of fixing it is by using TRIM but surely there must be an option to sotp this form happening???
-
Jan 17th, 2005, 07:50 AM
#2
PowerPoster
Re: alternative to TRIM?? help needed.....
Hi,
If you have set up your database field to reserve spaces for 100 characters then that is what it will do. Why do you object to using the Trim function when obtaining the data from the database?
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Jan 17th, 2005, 09:29 AM
#3
Re: alternative to TRIM?? help needed.....
use varchar or nvarchar, instead of char, as your datatype in your SQL table and it will not use all 100 spaces
-
Jan 17th, 2005, 09:44 AM
#4
Thread Starter
Addicted Member
Re: alternative to TRIM?? help needed.....
yea thats it working...
many thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|