FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour new bug FW 13.05:can´t append records to ACCESS and TDatarow
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
new bug FW 13.05:can´t append records to ACCESS and TDatarow
Posted: Wed Jun 12, 2013 08:05 AM
Hello,

With this simple, I can´t append records, the xBrowse at Edit() does not allow to change values:



Code (fw): Select all Collapse
#include "fivewin.ch"
#include "xbrowse.ch"

#include "dbstruct.ch"
#include "adodef.ch"

REQUEST DBFCDX

//----------------------------------------------------------------------------//

function Main()

   local oCn
   local nChoice, uDataSource

   SET DATE ITALIAN
   SET CENTURY ON
   SET DELETED ON
   FWNumFormat( "A", .t. )

   oCn         := FW_OpenAdoConnection( "ACCESS.mdb" )
   uDataSource := FW_OpenRecordSet( oCn, "CUENTAS" )


   BrowseData( uDataSource )

   uDataSource:Close()
   if oCn != nil
      oCn:Close()
   endif


return nil

//----------------------------------------------------------------------------//
// TESTING XBROWSE WITH TDATAROW
// Both XBrowse and TDataRow Code is the same for all Data Sources
//----------------------------------------------------------------------------//

static function BrowseData( uData )

   local oDlg, oBrw, oFont, oRec

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
   DEFINE DIALOG oDlg SIZE 900,400 PIXEL FONT oFont ;
      TITLE "TDataRow test : " + FWVERSION

   @ 30,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg ;
      DATASOURCE uData AUTOCOLS AUTOSORT ;
      FOOTERS CELL LINES NOBORDER

   WITH OBJECT oBrw
      //
      :CreateFromCode()
   END



   @ 10,10 BUTTON "Edit" SIZE 40,12 PIXEL OF oDlg ;
      ACTION ( oRec := TDataRow():New( uData ), oRec:Edit(), oBrw:Refresh(), oBrw:SetFocus() )
   @ 10,60 BUTTON "Append" SIZE 40,12 PIXEL OF oDlg ;
      ACTION ( oRec := TDataRow():New( uData, nil, .t. ), oRec:Edit(), oBrw:Refresh(), oBrw:SetFocus() )

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil

//----------------------------------------------------------------------------//




And Access.mdb:
http://rapidgator.net/file/3435501255cc ... S.MDB.html


Thank you. Best regards
Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
Posted: Wed Jun 12, 2013 09:04 AM
Hello,

With this Little sample I get this error:

no data type mismatch in criteria expression.

Code (fw): Select all Collapse
static function addManual( uData )

local oRec

oRec := TDataRow():New( uData, nil, .t. )

oRec:Codigo := 2
oRec:Nombre := "ACCOUNT two"

oRec:Save()

xbrowser uData

return nil
//----------------------------------------------------------------------------//



Thank you.
Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
Posted: Wed Jun 12, 2013 09:27 AM

Hello,

The problem does not occur with MySQL.

It has to be with numeric fields with decimals (in my table sample, NINGRESO AND NGASTO).

TDatarow do not manage them fine under Access.

Hope it helps.

Best regards,

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
Posted: Thu Jun 13, 2013 11:39 AM

Hello,

Any update, please?.

Thanks

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
Posted: Thu Jun 13, 2013 12:22 PM

Please wait Mr Lucas

Regards



G. N. Rao.

Hyderabad, India
Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
Posted: Tue Jun 18, 2013 02:44 PM

Friends,

Is there any fix for the bug?.

Thank you very much ;).

Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
Posted: Thu Jun 20, 2013 08:58 AM
Hello,

I would appreciate any fix for this bug please, as we need to work with Access.

This is a very easy s ample:

Code (fw): Select all Collapse
static function addManual( uData )
//----------------------------------------------------------------------------//

 local oRec := TDataRow():New( uData, nil, .t. )

 oRec:Fecha    := date()
 oRec:Apunte   := "NAME OF THE CONCEPT"
 oRec:Cuenta   := 21
 oRec:Notas    := "notas random by Lucas now "+cvaltochar(nrandom(3))
 oRec:nIngreso := 100.21


 oRec:Save()




 xbrowser uData



return nil
//----------------------------------------------------------------------------//



And the error:




Thank you very much. We are stopped for more than a week with this.

Best regards
Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
Posted: Thu Jun 20, 2013 09:15 AM
This was the sample program you sent me.
When I compiled and run the program as it is, it was running as expected without any run-time errors.
After running several times without any errors, this is the screen shot.



I was wondering what was the bug you were referring to because I did not get any errors here.

Ran once again and this time I adjusted the column sizes to get a full view of the table.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
Posted: Thu Jun 20, 2013 11:13 AM

Mr Nages,

Maybe I don´t have latest TDatarow class, can you please sent it to my email to test it and recompile?.

Do you use harbour or xHarbour?.

thank you, I await your answer.

best regards

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
Posted: Thu Jun 20, 2013 12:22 PM

Mr Lucas

I compiled the program sent by you as it is. You have included the entire source of TDataRow inside this program. So, we both are using the same class code. I used Harbour because I knonw you are using Harbour.

Actually for the last few days I was searching for a bug because I did not find any.

While it is true that it is running fine here, you are getting runtime error. Then there should be some difference.
This program uses FW_OpenAdoConnection("ACCESS.MDB")
On my computer this function uses the first preferred provder OLE.12.0 and in your case it may be falling back to JET OLEDB.
Let me force JET and try again.

Also can you please translate the error message to English?

Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
Posted: Thu Jun 20, 2013 12:51 PM

I tried with Jet oledb.
I am not getting any errors.
Both addManual() and the buttons Add and Edit in BrowseData are working perfectly as they should.

Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
Posted: Thu Jun 20, 2013 01:19 PM

Mr Lucas

I tested with FWH 1305, BCC 5,82 and Harbour 3.2.0 (18881)
I advise using FWH1305 in full without mixing 1304 and 1305 codes for testing
After the fix in tmsgitem.prg, FWH1305 is quite stable.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
Posted: Thu Jun 20, 2013 06:05 PM

Mr Ngaes,

Thank you, it is quite strange.

Please, could you try ONLY addmanual with this database?

http://www.gigasize.com/get/ng8p95xvknd

or this other link:

http://demo.ovh.co.uk/en/489fbd23a5ce10 ... 19a811e44/

Thank you very much.

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
Posted: Thu Jun 20, 2013 06:26 PM

Mr Lucas
Dowloaded and tested.
Working fine.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
Posted: Thu Jun 20, 2013 08:11 PM
Mr. Nages,

Thank you.

Did you use the empty Access.mbd in the link or you use previous database?. You have to use blank database.

This is the error I get on a different XP machine, in English SO this one:



And this is an .exe to test please.
http://demo.ovh.es/en/fbc228b82ac18e37418802dc26f0f7e6/

In my exe, do you get any error please?. I attach the .prg too.

Thank you very much. The key is to use the empty Access database.

Best regards
Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.