Error al leer dbf con FW_OpenRecordSet

Error al leer dbf con FW_OpenRecordSet

Postby jpcavagnaro » Thu Nov 02, 2023 7:27 pm

Hola gente, tengo una dbf generada con la estructura así:
dbcreate( ".\auditado", { { "id" , "n", 8, 0 }, ;
{ "Cliente " , "n", 6, 0 }, ;
{ "Nro_Audit" , "n", 6, 0 }, ;
{ "Numero " , "n", 6, 0 }, ;
{ "Lider " , "n", 6, 0 }, ;
{ "Norma " , "n", 8, 0 }, ;
{ "apartado " , "c", 10, 0 }, ;
{ "Fecha " , "d", 8, 0 }, ;
{ "Hora " , "c", 5, 0 }, ;
{ "Proceso " , "c", 10, 0 }, ;
{ "Resultado" , "m", 10, 0 }, ;
{ "Clasifica" , "c", 10, 0 }, ;
{ "Hecho " , "m", 10, 0 }, ;
{ "Evidencia" , "m", 10, 0 }, ;
{ "ReqNorma " , "m", 10, 0 }, ;
{ "Finalizada " , "D", 8, 0 } ;
} )
clos data

cuando intento leerla :
xdrive := curdrive() + ":\" + curdir()
oCnM := FW_OpenAdoConnection( { "FOXPRO", xdrive }, .T.)
cSQLa := "SELECT * FROM Auditado where cliente = 5 order by numero "
oRSa := FW_OpenRecordSet( ocnm, cSQLa ) ACA SE CIERRA EL PROGRAMA
? oRSa:RecordCount
xbrowse(orsa)
orsa:close()

Alguna idea de porque se cierra y no da ningún error?
Jorge
Saludos.
jpcavagnaro
 
Posts: 155
Joined: Tue Oct 11, 2016 1:02 pm
Location: Luján, bs. as.

Re: Error al leer dbf con FW_OpenRecordSet

Postby Jimmy » Thu Nov 02, 2023 10:13 pm

hi,

have you try your CODE without "last line" ?
where is you ACTIVATE ?

---

XBROWSE does NOT work "modal"
it will pass that line and "close" Recordset

you need a DIALOG as Parent for XBROWSE
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Error al leer dbf con FW_OpenRecordSet

Postby jpcavagnaro » Fri Nov 03, 2023 1:33 pm

Hola, gracias por responder.

Acabo de encontrar el problema, los campos memo se guardaban con nil eso afectaba, ahora si viene nil los dejo en blanco y funciono perfecto.
Jorge
Saludos.
jpcavagnaro
 
Posts: 155
Joined: Tue Oct 11, 2016 1:02 pm
Location: Luján, bs. as.


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 102 guests