NetTalk Central

Author Topic: clarion working with sql database(Mysql)  (Read 5803 times)

olu

  • Sr. Member
  • ****
  • Posts: 352
    • View Profile
    • Email
clarion working with sql database(Mysql)
« on: January 10, 2013, 05:46:36 AM »
Hi All I know this is a bit out of the scope of nettalk, just any help will do ,trying to convert a clarion application to use sql but now the browses are not working properly some of them are showing duplicate record and some are even not showing at all

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: clarion working with sql database(Mysql)
« Reply #1 on: January 10, 2013, 07:40:46 PM »
If you are talking about Clarion browses, as opposed to Nettalk browses the you need to make the record unique when displaying in a browse. On the Actions\Browse box behaviour\additional sort fields section add a field to make the sort unique. I normally add the primary unique key.
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

olu

  • Sr. Member
  • ****
  • Posts: 352
    • View Profile
    • Email
Re: clarion working with sql database(Mysql)
« Reply #2 on: January 11, 2013, 01:54:57 AM »
hi terryd,
  Thanks for that(it is just a clarion browse), now it dose not show duplicates but instead it just shows all the records and not filtering to the file relationship table of the related record on the left hand side.

olu

  • Sr. Member
  • ****
  • Posts: 352
    • View Profile
    • Email
Re: clarion working with sql database(Mysql)
« Reply #3 on: January 11, 2013, 03:55:42 AM »
Ok thanks terryd got it to work now. But it is very slow any suggestion why?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11239
    • View Profile
Re: clarion working with sql database(Mysql)
« Reply #4 on: January 11, 2013, 04:28:13 AM »
it will be very slow if

a) the filter cannot be processed on the server side. ie if the filter cannot be processed in the SQL engine then the whole data table has to be sent to you (it's not even limited by range.) the program then applies the range, and filter, to sort out the records. So number one thing to check is that the browse filter is ok. Easiest way to check is to remove it. If the browse then goes fast then put it back slowly.

hint: clarion browses let you BIND stuff into the filter - this makes it client-side.

OR
b) the sort order you have now specified does not match a key in the server. Make it go faster by adding an appropriate key to the table.

cheers
Bruce

olu

  • Sr. Member
  • ****
  • Posts: 352
    • View Profile
    • Email
Re: clarion working with sql database(Mysql)
« Reply #5 on: January 11, 2013, 05:43:58 AM »
Thanks bruce, very new to converting tps to sql, when i did remove the filters it did work better but how do i re-apply my filter for instance i have a filter like this:
Code: [Select]
IF Loc:ClientID <> 0
 Self.Setfilter('Persons:ClientID = Loc:ClientID')
END
Self.reset()