
cOmo conectar grid con cursor
Publicado por berni (4 intervenciones) el 16/10/2008 02:45:36
Del siguiente codigo :
ofrm = CREATEOBJECT("form")
ofrm.Show
ofrm.AddObject('Grid1','Grid' )
ofrm.grid1.Visible= .T.
xconec=""
xconec = Sqlstringconnect("Driver={SQL Server};Server=MRPC;Database=pubs;Uid=sa;Pwd=sa;")
xselect=""
xselect = "SELECT * from authors"
t = SQLSETPROP(xconec, 'asynchronous', .F.)
xenvio = SQLExec(xconec, xselect, "Micursor")
SELECT Micursor
ofrm.grid1.RecordSourceType = 4
ofrm.grid1.RecordSource=Micursor
xdesconec=SQLDisconnect(xconec)
donde dice
ofrm.grid1.RecordSource=Micursor
Tiene problema.
Mi intencion es conectar el cursor al grid.
Alguien me puede ayudar ?
Gracias x leer mi inquietud.
ofrm = CREATEOBJECT("form")
ofrm.Show
ofrm.AddObject('Grid1','Grid' )
ofrm.grid1.Visible= .T.
xconec=""
xconec = Sqlstringconnect("Driver={SQL Server};Server=MRPC;Database=pubs;Uid=sa;Pwd=sa;")
xselect=""
xselect = "SELECT * from authors"
t = SQLSETPROP(xconec, 'asynchronous', .F.)
xenvio = SQLExec(xconec, xselect, "Micursor")
SELECT Micursor
ofrm.grid1.RecordSourceType = 4
ofrm.grid1.RecordSource=Micursor
xdesconec=SQLDisconnect(xconec)
donde dice
ofrm.grid1.RecordSource=Micursor
Tiene problema.
Mi intencion es conectar el cursor al grid.
Alguien me puede ayudar ?
Gracias x leer mi inquietud.
Valora esta pregunta


0