field1 Varchar(10) - if you insert "xyz" charaters, it will be automatically trimmed, ie "xyz" field1 Char(10) - whatever you insert which is <= 10 chars the field will have the value and spaces. ie xyz and 7 spaces. for binary type data object, this will padded with "0" Well this can also be set at Database level: If you using SqlSever SET ANSI_PADDING ON | OFF ------------------------------------------------------------ --- Original Message --- "Johan Coens" <[EMAIL PROTECTED]> Wrote on Tue, 1 Aug 2000 09:14:52 +0200 ------------------ Hello, I allways use varchar. Not because of better performance but because of the following: If I insert into the database the value 'xyz' in a char(5) field, the value of it in the dBase will be 'xyz '. It automaticly puts spaces behind to fill up the empty space. This means you always have to trim you're values before u use them ... Maybe there's a setting in the dbServer, but i'm not such a dbWizard. Best Regards, Johan Coens -----Original Message----- From: Art Broussard [mailto:[EMAIL PROTECTED]] Sent: maandag 31 juli 2000 20:52 To: cf-talk Subject: OT: what is better varchar or char This is a multi-part message in MIME format. ------=_NextPart_000_001B_01BFFAF6.7FFB2ED0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I was told that char is better than varchar. Is this right? =20 I am going to have fields that are set to be either 25 50 100 or 150 = characters long. Is there a reason any of these fields should be char or = varchar? I have allways used varchar but I would like to know what is = best. =20 Feel free to respond directly to me since it is OT ;-) Art =20 =20 ------=_NextPart_000_001B_01BFFAF6.7FFB2ED0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 5.50.3825.1300" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>I was told that char is better than = varchar. Is=20 this right?<BR> <BR>I am going to have fields that are set to be = either=20 25 50 100 or 150 characters long. Is there a reason any of these = fields=20 should be char or varchar? I have allways used varchar but I would like = to know=20 what is best.<BR> <BR>Feel free to respond directly to me since it = is OT=20 ;-)</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Art</FONT><BR><FONT face=3DArial=20 size=3D2> <BR> </FONT></DIV></BODY></HTML> ------=_NextPart_000_001B_01BFFAF6.7FFB2ED0-- ---------------------------------------------------------------------------- -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. ------------------------------------------------------------------------------ Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. ----- Sent using MailStart.com ( http://MailStart.Com/welcome.html ) The FREE way to access your mailbox via any web browser, anywhere! ------------------------------------------------------------------------------ Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.