SalListPopulate with Oracle: Tab positions
SalListPopulate with Oracle: Tab positions
I have encountered a problem using SQLWindows 5.2 SP3. I am using the function SalListPopulate to populate a List Box using a SQL query that selects two columns from an Oracle 10 database. The data is not displayed correctly - the data from the second column is far to the right. The behaviour is different if I use SQLBase. It is also different if I use SalListAdd to add two string values that are separated by a tab character. It seems that the tab positions for the List Box are being set incorrectly when the data is coming from Oracle. I have attached a small application to demonstrate the behaviour - the Oracle database name, user name and password will need to be modified.
You do not have the required permissions to view the files attached to this post.
Re: SalListPopulate with Oracle: Tab positions
I don't think the listbox, per se, knows about Oracle and how to set its tab positions. It seems as if Oracle might be setting "COLUMNx" to a fixed width by padding spaces (?) to the end of the value before returning. If that string coming back is"It seems that the tab positions for the List Box are being set incorrectly when the data is coming from Oracle.
Code: Select all
"COLUMNx "
I see the same thing if the Oracle query is: "SELECT dummy, dummy FROM DUAL"
That is, I get X with lots of spaces and another X.
One other way to test, is do SalListPopulate the 'long way' - something like:
Code: Select all
SqlPrepareAndExecute
While SqlFetchNext into 2 string vars
SalListAdd( hWndListBox, s1 || sTabChar|| s2 )
Re: SalListPopulate with Oracle: Tab positions
Thank you for your response. There is no issue with the tab stops in TD4.2. Can you please explain why I am seeing this behaviour with TD5.2 SP3 but not with TD4.2? Thank you.
Re: SalListPopulate with Oracle: Tab positions
Hello,
have the same problem also on TD 6.0 SP8.
Workaround: Calculate tab stop positions for count of columns and call manually SalListSetTabs every time after populating the list box
Hope there will be a solution in future TD versions!
have the same problem also on TD 6.0 SP8.
Workaround: Calculate tab stop positions for count of columns and call manually SalListSetTabs every time after populating the list box

Hope there will be a solution in future TD versions!
Who is online
Users browsing this forum: [Ccbot] and 0 guests