>How do I dump all my data in my cursor to my grid? Please help.
>
>
>LOCAL lcSQL
>
>lcSQL = "SELECT * FROM MyTable INTO CURSOR crsGrid1"
>
>EXECSCRIPT(m.lcSQL)
>
>THISFORM.grid1.RecordSource = "crsGrid1"
>THISFORM.grid1.Refresh
>THISFORM.txtSqlWindow.SetFocus
>
Sam,
If the query worked and EXECSCRIPT() returned .T. you should have a cursor by the name of crsGrid1 open and selected. Therefore it should work. Does your query return a cursor? Is it open? Check it in the debugger step-by-step.
One caveat is that whenever you change a RecordSource in an existing grid (that is if it had any recordSource and was showing data before) it will clear the grid which is unsightly. Turn screen changes off beforehand while you do the switch.