General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Hi.
The cursor created with the code below, disappears when the wait window is clicked. The grid is populated as it should be, but as soon as the wait window is clicked the grid is cleared and the cursor disappears.
As I am new to CursorAdapters, any help would be apprectaited.
Sincere thanks in advance.
Mike Mayo
** code **
thisform.grid1.recordsource='0'
local locursor as cursoradapter, laerrors(1)
set multilocks on
locursor = createobject('CursorAdapter')
locursor.alias = 'pdv'
locursor.datasourcetype = 'ODBC'
locursor.datasource = sqlstringconnect(remotedsn)
locursor.selectcmd = 'select urn,podept,gst_tax_pc,addinfo,active from podept order by urn'
locursor.keyfieldlist = 'urn'
locursor.tables = 'podept'
locursor.updatablefieldlist = 'urn, podept, gst_tax_pc, addinfo, active'
locursor.updatenamelist = 'urn podept.urn, podept podept.podept, gst_tax_pc podept.gst_tax_pc, addinfo podept.addinfo, active podept.active'
if locursor.cursorfill()
thisform.grid1.recordsource='pdv'
thisform.grid1.refresh()
WAIT window
else
aerror(laerrors)
=messagebox(laerrors[2])
ENDIF
** end code **
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only