I would like to ask a big favor and see if there can be a fix to xBrowse when using ADO and field names that have spaces.
The problem comes in when you have a field name such as "User Name" defined as a column. When you chose to autosort the column you get a 'naughty' error.
I do have a work around by adding the column manually and creating a new column name but this is a nagging problem that could probably be fixed by inserting "[User Name]" in the xBrowse code for fields that use ADO.
Here is my code and the error..
Thanks
Rick Lipkin
- Code: Select all Expand view
REDEFINE xBROWSE oLBX ;
RECORDSET oRsEmp ;
COLUMNS "EMPLOYEE NUMBER", ;
"USER NAME", ;
"FIRST NAME", ;
"LAST NAME", ;
"ADDRESS1", ;
"CITY", ;
"STATE", ;
"ZIP CODE", ;
"HOME PHONE", ;
"OTHER PHONE" ;
COLSIZES 50,80,80,80,80,80,30,50,50,50 ;
HEADERS "EmpNum", ;
"UserId", ;
"First Name", ;
"Last Name", ;
"Address", ;
"City", ;
"St", ;
"Zip", ;
"Home Ph", ;
"Other Ph" ;
ID 111 of oDlg ;
AUTOSORT AUTOCOLS LINES CELL
- Code: Select all Expand view
Application
===========
Path and name: C:\Fox\Sa\Saw32.Exe (32 bits)
Size: 4,201,984 bytes
Compiler version: xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 9444)
FiveWin Version: FWHX 12.03
Windows version: 5.1, Build 2600 Service Pack 3
Time from start: 0 hours 0 mins 52 secs
Error occurred at: 12/14/2012, 17:43:06
Error description: Error ADODB.Recordset/6 DISP_E_UNKNOWNNAME: _SORT
Args:
[ 1] = C USER NAME
Stack Calls
===========
Called from: => TOLEAUTO:_SORT( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:SETORDER( 11249 )
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:HEADERLBUTTONUP( 10184 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:LBUTTONUP( 3303 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1690 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 11630 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3159 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 980 )
Called from: Main.prg => MAIN( 239 )