Won't Fix TD-16046: Problem reading VARCHAR out of MySql-Database

General discussion forum about all databases other than SqlBase.
Welskop

TD-16046: Problem reading VARCHAR out of MySql-Database

Post by Welskop » 10 Aug 2011, 13:16

Hello,

I have a problem with reading VARCHAR data out of a MySql database over ODBC. The datatype of the field is VARCHAR(255). When I read the data and put it in a grid coloumn (data type: long string) everything is fine. But when I try to put the same data into a combobox (data type: long string) nothing is displayed in the combobox.

Does anybody has an idea if this is a bug?

Kind regards,
Frank

Jeff Luther

Re: Problem reading VARCHAR out of MySql-Database

Post by Jeff Luther » 10 Aug 2011, 19:27

Yes, a bug. Combobox can be set for Long String, but it seems v6 is ignoring that and assuming String. Workaround for the moment is to first fetch into a var. of type Long String, then assign that to the combobox, like:

Code: Select all

If NOT SqlPrepareAndExecute( hSql,
         'SELECT TXT INTO :lsForComboBox FROM TEST_COMBO where id = :df1' )
   Return FALSE
If SqlFetchNext( hSql, nInd )
   Call SalListAdd( cmbLongString, lsForComboBox )
   Call SalListSetSelect( cmbLongString, 0 ), '', 0 )
I've added TD-16046 for this defect. I'll attach the SQLBase ISLAND test case for this, FYI.
You do not have the required permissions to view the files attached to this post.

Jeff Luther

Re: Problem reading VARCHAR out of MySql-Database

Post by Jeff Luther » 23 Mar 2012, 18:04

Frank -- development had a chance to look at this issue and cannot reproduce a problem. I should have asked you for a test case, but I had put one together and between dev. and I we tested with MS SS/SQLBase (me) MySQL/Oracle (developer) with no problems.

I'll attach the TD v6 SP5 defect's test case; you need to set login params. on form's SAM_Create to test.

TD-16046 is currently 'resolved' as "Cannot reproduce" pending you providing us a test case + details that do fail for you. The test case attached does not fail for us.
You do not have the required permissions to view the files attached to this post.

Welskop

Re: Problem reading VARCHAR out of MySql-Database

Post by Welskop » 30 Mar 2012, 06:29

Hi Jeff,

thank you for your reply! I will create a test database on my webserver and send you a small program showing you the problem! But please give me a few days as I am very buisy in the moment!

As far as I can see the difference between your test case and the way I try to fill the combo box is that I would like to use the function "SalListPopulate" for that. And this is not working with combo boxes.

Regards,
Frank

Jeff Luther

Re: Problem reading VARCHAR out of MySql-Database

Post by Jeff Luther » 03 Apr 2012, 00:11

I mod'd the test and this line works OK to populate the combobox:

Call SalListPopulate( cmbLongString, hSql, 'SELECT TXT FROM TEST_COMBO where id = :df1' )

Check to make sure your combo is Long String type.

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests