[RESOLVED]Strange problem when saving records
hi to all:
This code i had use for create a field in DB Access 2003:
Code:
SQL = "ALTER TABLE plano_contas ADD declperiodica06A char(40) WITH COMPRESSION NULL)"
Dim command1 As New OleDb.OleDbCommand(SQL, con1)
con1.Open()
command1.ExecuteNonQuery()
con1.Close()
like you see the code create a Text field with 40 lenght...
Well the problem is:
When i save a new record the record it's save in this mode:
"100..................................." - the points means spaces
and should be:
"100"
After try a lot of things i'm without more solutions in find why this happen!
Someone can give me some help here?
Thanks
Re: Strange problem when saving records
Try using varchar instead of char. char is a fixed-width data-type, so all values are padded out to the specified width if they are not that size to begin with.
Re: Strange problem when saving records
hi jmcilhinney:
Yes...you are right...varchar resolve the problem
Thanks a lot