ADO RDD xHarbour

AHF
Posts: 837
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Post by AHF »

Enrico,

Does it means we could addnew specifying others columns except the calculated column or not even that.
Regards
Antonio H Ferreira
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: ADO RDD xHarbour

Post by Enrico Maria Giordano »

Antonio,
AHF wrote:Enrico,

Does it means we could addnew specifying others columns except the calculated column or not even that.
I think that the entire recordset is readonly, but I'm not sure. Please try.

EMG
AHF
Posts: 837
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Post by AHF »

Enrico,

Thanks. Its read only.

Do you know what can cause this?
I cannot find the cause of this error:

Quote:
argumentos <nenhuma>
descrição Workarea not in use
ficheiro <nenhuma>
genCode 35: EG_NOTABLE
operação ORDSETFOCUS
osCode (Não é erro do sistema operativo)
severity 2
subCode 2001
subSystem DBCMD
tries 0
Stack Calls
Procedimentos / Metodos (linha)
===============================
Chamado de TDMDICHILD:FECHAMDI(558)
Chamado de (b)ENCOMCLIENTES(207) //ACTIVATE WINDOW ... VALID owmdi1:FechaMdi(obrowse)
Chamado de TDMDICHILD:END(0)
Chamado de TDMDICHILD:SYSCOMMAND(0)
Chamado de TWINDOW:HANDLEEVENT(0)
Chamado de TDMDICHILD:HANDLEEVENT(0)
Chamado de _FWH(0)
Chamado de WINRUN(0)
Chamado de TMDIFRAME:ACTIVATE(0)
Chamado de MAIN(74)


The FechaMdi(obrowse) only closes tables nothing else.
When I close the table = oBrw:calias immediately error.
This code works many years ok with other rdds.

Do you have any idea what can cause this error?
Regards
Antonio H Ferreira
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: ADO RDD xHarbour

Post by Antonio Linares »

AHF wrote:Antonio,

I cannot find the cause of this error:
argumentos <nenhuma>
descrição Workarea not in use
ficheiro <nenhuma>
genCode 35: EG_NOTABLE
operação ORDSETFOCUS
osCode (Não é erro do sistema operativo)
severity 2
subCode 2001
subSystem DBCMD
tries 0
Stack Calls
Procedimentos / Metodos (linha)
===============================
Chamado de TDMDICHILD:FECHAMDI(558)
Chamado de (b)ENCOMCLIENTES(207) //ACTIVATE WINDOW ... VALID owmdi1:FechaMdi(obrowse)
Chamado de TDMDICHILD:END(0)
Chamado de TDMDICHILD:SYSCOMMAND(0)
Chamado de TWINDOW:HANDLEEVENT(0)
Chamado de TDMDICHILD:HANDLEEVENT(0)
Chamado de _FWH(0)
Chamado de WINRUN(0)
Chamado de TMDIFRAME:ACTIVATE(0)
Chamado de MAIN(74)
The FechaMdi(obrowse) only closes tables nothing else.
When I close the table = oBrw:calias immediately error.
This code works many years ok with other rdds.

Do you have any idea what can cause this error?
It seems as the workarea was already closed and after OrdSetFocus() was called
regards, saludos

Antonio Linares
www.fivetechsoft.com
hmpaquito
Posts: 1200
Joined: Thu Oct 30, 2008 2:37 pm

Re: ADO RDD xHarbour

Post by hmpaquito »

ahf,

You need to tracer where close nenhuma. Exit procedures, perhaps... timers...

BTW, <nenhuma>, is bad filename, perhaps a sample...


regards
AHF
Posts: 837
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Post by AHF »

Antonio,

Why is subSystem DBCMD ? shouldnt be adordd?

Ive tested with msginfo in place I catch the exact point where error occurs and there is nothing there only close table saved in a var of an object.

close(::encomendas)
::encomendas := nil

Immediately get error. rdd Dbf or ADS ok for many years.

Ill try with debugger.








<nenhuma> means none (no file).
Regards
Antonio H Ferreira
AHF
Posts: 837
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Post by AHF »

Dear all,

The adordd its running quite well in the real world, but I'm still finding many bugs.

The main problem is accurate record positioning.
The only solution I could find is the table with a field AUTOINC HBRECNO.
I cant find another solution. Any ideas?

The code its already prepared to both situations but be advise that without this new field can't run exactly the same app code. The adordd can work also with bookmarks if supported otherwise absoluteposition.

Please remember that changing index order and seeking more than one field in the expression will build a new recordset thus situations like described below are probably impossible without field HBRECNO.

ex1

nrec := recno() //actual recordset
set order to anther order //new recordset
go to nrec // only by pure luck it results because nrec refers to previous recordset.

ex2

nrec := recno() //actual recordset
seek " 123" // index expression filed1 len(3) field2 len(5) 2 field in seek exp means new recordset with
where clause.
do while ....
....
skip
enddo
resetseek() //returning to previous recordset

go to nreg //it might work if we save and restore previous set otherwise it not guaranteed.

Besides this it seems that all navigation,relations, seek, find,adding records and updating through the recordset its close to an end. :D

Now my main problem its translate locate expressions like year(field->datedoc) > year(date()).

Ill post last version today.
Regards
Antonio H Ferreira
AHF
Posts: 837
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Post by AHF »

Regards
Antonio H Ferreira
AHF
Posts: 837
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Post by AHF »

lucasdebeltran wrote:Antonio,

Does append blank and replace work?.

In my tests from last week once the aplication was closed, data were lost.

Antonio L., please wait to the announcment.

Thank you.
Lucas,

dbappend work and Replaces work ate least here.
Regards
Antonio H Ferreira
AHF
Posts: 837
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Post by AHF »

Antonio,

[quote="AHF"]Antonio,

Why is subSystem DBCMD ? shouldnt be adordd?[/code]

Can you check is this correct?
Regards
Antonio H Ferreira
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: ADO RDD xHarbour

Post by Enrico Maria Giordano »

Antonio,
AHF wrote:The main problem is accurate record positioning.
The only solution I could find is the table with a field AUTOINC HBRECNO.
I cant find another solution. Any ideas?
Yes, the only solution is adding an autoincrement field (for record identity). And by the way, it's good practice (if not mandatory) to have it in a SQL table.

EMG
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: ADO RDD xHarbour

Post by Enrico Maria Giordano »

Antonio,
AHF wrote:Why is subSystem DBCMD ? shouldnt be adordd?
No, DBCMD is for generic database error.

EMG
AHF
Posts: 837
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Post by AHF »

Enrico Maria Giordano wrote:
And by the way, it's good practice (if not mandatory) to have it in a SQL table.
Enrico,

What do you mean ?
Regards
Antonio H Ferreira
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: ADO RDD xHarbour

Post by Enrico Maria Giordano »

Antonio,
AHF wrote:
Enrico Maria Giordano wrote:
And by the way, it's good practice (if not mandatory) to have it in a SQL table.
Enrico,

What do you mean ?
You should have an autoincrement field in each table in a SQL database. It's required for record identity.

EMG
AHF
Posts: 837
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Post by AHF »

Enrico,

Ok thats what adordd expects.

Do you have the same field name in every table?
Regards
Antonio H Ferreira
Post Reply