TXbrowse vacio con ADO

Post Reply
User avatar
Armando
Posts: 2479
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México
Contact:

TXbrowse vacio con ADO

Post by Armando »

Buenas tardes al foro:

Amigos, necesito crear un browse usando TXBrowse y ADO pero cuando el RECORDSET esta vacio, truena :cry:

Me interesa crear el browse a pesar de que el RS este vacio, como hacerlo ?.

Gracias, saludos
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Biel EA6DD
Posts: 680
Joined: Tue Feb 14, 2006 9:48 am
Location: Mallorca
Contact:

Post by Biel EA6DD »

Que error te da?.
No se si esto te servira, prueba a comentar la linea RETURN NIL de la clase txBrowse, metodo Paint, en el apartado Paint cols data.

Code: Select all

/*
   Paint cols data
   */

   ::lRefreshOnlyData := .f.

   if ::nLen == 0
      ::EraseData( nFirstRow  )
      //return nil    //Marcado por Biel, asi visualiza correctamente Browses sobre ficheros vacios o scopes vacios sin registros
   endif
Saludos desde Mallorca
Biel Maimó
http://bielsys.blogspot.com/
User avatar
Armando
Posts: 2479
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México
Contact:

Post by Armando »

Biel:

Gracias por tu interes, el error que tira es:

Error Base/1111 Argument error: LEN from Errorsys, Line: 0

Te reproduzco un poco del Error.Log por si ayuda en algo

Code: Select all

Application
===========
   Path and name: C:\SapWinAdo\SapWin.Exe (32 bits)
   Size:   626,176 bytes
   Time from start: 0 hours 0 mins 2 secs 
   Error occurred at: 26/10/2007, 07:49:11
   Error description: Error adodb.recordset:FIELDS/16389  E_FAIL: VALUE
   Args:

Stack Calls
===========
   Called from: win32ole.prg => TOLEAUTO:VALUE(0)
   Called from: XBROWSE.PRG => (b)ADOGENFLDBLK(3041)
   Called from: XBROWSE.PRG => TXBRWCOLUMN:DATAWIDTH(3488)
   Called from: XBROWSE.PRG => TXBRWCOLUMN:ADJUST(3334)
   Called from: XBROWSE.PRG => TXBROWSE:ADJUST(584)
   Called from: XBROWSE.PRG => TXBROWSE:INITIATE(568)
   Called from: XBROWSE.PRG => TXBROWSE:CREATEFROMCODE(506)
   Called from: sapwin6a.prg => SAPWIN6A(132)
   Called from: sapwin.prg => (b)HAZMENU(309)
   Called from: MENU.PRG => TMENU:COMMAND(0)
   Called from: WINDOW.PRG => TWINDOW:COMMAND(0)
   Called from: MDIFRAME.PRG => TMDIFRAME:COMMAND(0)
   Called from:  => TMDIFRAME:HANDLEEVENT(0)
   Called from: WINDOW.PRG => _FWH(0)
   Called from:  => WINRUN(0)
   Called from: WINDOW.PRG => TMDIFRAME:ACTIVATE(0)
   Called from: sapwin.prg => MAIN(129)

System
======
   CPU type:               Intel(R) Pentium(R) 4 CPU 3.00GHz 3000 Mhz
   Hardware memory: 503 megs

   Free System resources: 90 %
        GDI    resources: 90 %
        User   resources: 90 %

   Compiler version: xHarbour build 0.99.71 Intl. (SimpLex)
   Windows version: 5.1, Build 2600 Service Pack 2
Saludos
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
sysctrl2
Posts: 833
Joined: Mon Feb 05, 2007 7:15 pm
Contact:

Post by sysctrl2 »

Armando,

lo mas facil creo es poner un array en caso de que el recorset

este vacio, pero desconozco el como hacerlo

con xbrowse, algun guro que nos pueda hechar un hilo,

saludos..
Cesar Cortes Cruz
SysCtrl Software
Mexico

' Sin +- FWH es mejor "
User avatar
sjingo
Posts: 229
Joined: Sat Mar 18, 2006 3:42 pm
Location: Ibarra-Ecuador

Post by sjingo »

Armando

No uso xbrowse, yo uso wbrowse, y lo que hago es controlar si el recordset NO está vacio muestro _ contrario no , así:

@ 1, 1 LISTBOX oBrw FIELDS if(!ors:EOF .and. !oRs:BOF, oRs:Fields(0):value, )

El principio es el mismo, así que no creo que tengas problemas en aplicarlo en el xbrowse.

Espero te ayude,

Un Saludo

Marcelo Jingo
Last edited by sjingo on Sun Oct 28, 2007 12:59 am, edited 2 times in total.
User avatar
Armando
Posts: 2479
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México
Contact:

Post by Armando »

Marcelo:

Gracias por la idea, voy a tirarle por ahí.

Saludos
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Post Reply