Hi Bruce,
Yep I made a little template to add to the browse window for mysql files. It is a hack of a free clarion template for mysql limits on a browse. A bit rough and ready but it does the job. It Improved the browse speed by about 1000 times on the mysql data. I will post it below in case it is useful to someone else that has to access mysql files.
#!
#!
#EXTENSION(MySQLWEBBBrowseSupport,'Activate NetTalk MySQL page load support'), APPLICATION
#PROMPT('Enable NetTalk MySQL Page Loaded Browse Support', CHECK), %MySQLWEBPageLoadEnabled, AT(10,10)
#!
#!
#EMBED(%MySQLWEBHiddenEmbed), HIDE
#EXTENSION(MySQLwebBrowse,'Nettalk MySQL Page Load Browse Extension'),Procedure
#RESTRICT
#IF(%MySQLWEBPageLoadEnabled)
#ACCEPT
#ELSE
#REJECT
#ENDIF
#ENDRESTRICT
#DISPLAY('Be sure to use the global extension ''MySQLWEBBrowseSupport''')
#DISPLAY('and enable it for this to work!')
#ATSTART
#ENDAT
#AT(%ModuleDataSection)
#IF(%MySQLWEBPageLoadEnabled)
INCLUDE('FILECB.INC'), ONCE
#ENDIF
#ENDAT
#AT(%DataSection)
#IF(%MySQLWEBPageLoadEnabled)
MySQLWEBcb class, implements(sqlcallbackinterface)
wHandle long
Flag long
File &FILE
SetCallbackOn procedure()
SetCallbackOff procedure
end
#ENDIF
#ENDAT
#AT(%BrowseFilter)
#IF(%MySQLWEBPageLoadEnabled)
MySQLWEBcb.wHandle = 0{prop:handle}
MySQLWEBcb.File &= %PRIMARY
MySQLWEBcb.SetCallbackOn()
FLUSH(THISVIEW)
#ENDIF
#ENDAT
#AT(%Validaterecord)
#IF(%MySQLWEBPageLoadEnabled)
MySQLWEBcb.SetCallbackOff()
#ENDIF
#ENDAT
#AT(%LocalProcedures)
#IF(%MySQLWEBPageLoadEnabled)
MySQLWEBcb.sqlcallbackinterface.ExecutingCode PROCEDURE(CONST *CSTRING inStr, *BYTE Err, *CSTRING ErrCode, *CSTRING ErrMsg)
l:orderby CSTRING(1025)
l:sqlstatement CSTRING(8193)
l:limit cstring(33)
code
l:limit = ''
l:sqlstatement = instr
#EMBED(%MySQLWEBcbStart,'mysqlweb call back start')
!putini('mysqlweblimit','start-' & format(today(),@D10) & '-' & format(clock(),@t5),instr,'.\mysqlweblimit.ini')
loop
#IF(NOT %MySQLWEBPageLoadEnabled)
BREAK ! Page loading not enabled
#ENDIF
if upper(sub(InStr,1,7)) = 'SELECT ' and self.wHandle = 0{prop:handle}
if instring(' LIMIT ',instr,1,1) ! added to stop limit being added twice if same file on same window twice
BREAK
end
l:limit = ' LIMIT ' & %nRecs * 2
end
break
end
!putini('mysqlweblimit','end-limit' & format(today(),@D10) & '-' & format(clock(),@t5),l:limit,'.\mysqlweblimit.ini')
return l:sqlstatement & l:limit
MySQLWEBcb.SetCallbackOn procedure()
code
self.Flag += 1
if self.Flag
SQLCallback(self.File, self.SQLCallbackInterface)
end
MySQLWEBcb.SetCallbackOff procedure()
code
self.Flag -= 1
if self.Flag = 0
SQLCallback(self.File, self.SQLCallbackInterface, 1)
end
#ENDIF
#ENDAT