Page 1 of 2
new bug FW 13.05:can´t append records to ACCESS and TDatarow
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Wed Jun 12, 2013 8:05 am
by lucasdebeltran
Hello,
With this simple, I can´t append records, the xBrowse at Edit() does not allow to change values:
![Image](http://i42.tinypic.com/fd4mly.png)
- Code: Select all Expand view
#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.htmlThank you. Best regards
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Wed Jun 12, 2013 9:04 am
by lucasdebeltran
Hello,
With this Little sample I get this error:
no data type mismatch in criteria expression.
- Code: Select all Expand view
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.
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Wed Jun 12, 2013 9:27 am
by lucasdebeltran
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,
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Jun 13, 2013 11:39 am
by lucasdebeltran
Hello,
Any update, please?.
Thanks
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Jun 13, 2013 12:22 pm
by nageswaragunupudi
Please wait Mr Lucas
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Tue Jun 18, 2013 2:44 pm
by elvira
Friends,
Is there any fix for the bug?.
Thank you very much
![Wink ;)](./images/smilies/icon_wink.gif)
.
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Jun 20, 2013 8:58 am
by lucasdebeltran
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: Select all Expand view
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:
![Image](http://i44.tinypic.com/2pyb8f8.png)
Thank you very much. We are stopped for more than a week with this.
Best regards
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Jun 20, 2013 9:15 am
by nageswaragunupudi
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.
![Image](http://img259.imageshack.us/img259/9195/qrai.jpg)
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.
![Image](http://img203.imageshack.us/img203/8146/hb9d.jpg)
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Jun 20, 2013 11:13 am
by lucasdebeltran
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
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Jun 20, 2013 12:22 pm
by nageswaragunupudi
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?
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Jun 20, 2013 12:51 pm
by nageswaragunupudi
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.
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Jun 20, 2013 1:19 pm
by nageswaragunupudi
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.
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Jun 20, 2013 6:05 pm
by lucasdebeltran
Mr Ngaes,
Thank you, it is quite strange.
Please, could you try ONLY addmanual with this database?
http://www.gigasize.com/get/ng8p95xvkndor this other link:
http://demo.ovh.co.uk/en/489fbd23a5ce10 ... 19a811e44/Thank you very much.
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Jun 20, 2013 6:26 pm
by nageswaragunupudi
Mr Lucas
Dowloaded and tested.
Working fine.
Re: new bug FW 13.05:can´t append records to ACCESS and TDatarow
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Thu Jun 20, 2013 8:11 pm
by lucasdebeltran
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:
![Image](http://i42.tinypic.com/2w74dq1.jpg)
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