Watch, Follow, &
Connect with Us

Please visit our new home

Public Report
Report From: Delphi-BCB/Database/DBExpress/TSQLQuery    [ Add a report in this area ]  
Report #:  33778   Status: Reported
Can't get space values in varchar fields
Project:  C++Builder Build #:  update 2
Version:    6.0 Submitted By:   zahm vincent
Report Type:  Basic functionality failure Date Reported:  9/11/2006 5:43:08 AM
Severity:    Serious / Highly visible problem Last Updated: 9/19/2006 12:36:32 AM
Platform:    All platforms Internal Tracking #:  
Resolution: None  Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (1 Total Rating)
4.00 out of 5
Total Votes: None
I try to get my value ( 3 spaces character)  in a varchar field the result is always empty instead of '   '

Same behaviour with TSimpleDataSet ant TSQLQuery component.
Steps to Reproduce:
Create a varchar or string field in a database (SYBASE) try to read it with FieldByName("Name of the field")->AsString  property the result is always empty. I don't see in documentation if it's a standard behaviour or not or how to modify it.

To reproduce the problem you don't need to create a project. Create a database with SYBASE then create a table with a varchar field. Insert in this table a record with 3 or more spaces in the varchar field (i think it's the same if you set only spaces characters).

Look at this field with a BDE database explorer (like dbexplorer.exe of BCB6) then if you put the cursor in the field you will see  the spaces highlighting.
Now look at this field with the dbexpress explorer of BDS6 put the cursor in the field there's no spaces the field is empty.
The behaviour is the same if you select the field in a application (difference between BDE and DBEXPRESS).

David Dean at 9/18/2006 10:35:55 AM -
Please attach a sample project or more precise steps to duplicate this report.

zahm vincent at 9/19/2006 12:36:32 AM -
I update steps to reproduce the problem

Server Response from: ETNACODE01