NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: olu on January 10, 2013, 05:46:36 AM

Title: clarion working with sql database(Mysql)
Post by: olu 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
Title: Re: clarion working with sql database(Mysql)
Post by: terryd 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.
Title: Re: clarion working with sql database(Mysql)
Post by: olu 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.
Title: Re: clarion working with sql database(Mysql)
Post by: olu on January 11, 2013, 03:55:42 AM
Ok thanks terryd got it to work now. But it is very slow any suggestion why?
Title: Re: clarion working with sql database(Mysql)
Post by: Bruce 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
Title: Re: clarion working with sql database(Mysql)
Post by: olu 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()