Recent

Author Topic: interested one error  (Read 7767 times)

ahmetnurideniz

  • Full Member
  • ***
  • Posts: 110
  • As you sow, you shall reap.
    • Big Student Web Site
interested one error
« on: December 01, 2011, 02:23:30 pm »
Hi,
I am useing Firebird 2.5, Lazarus 0.9.30  and SQLQuery
I can connect db. I can do everything first.
But there is one problem.
if my record counts small 10 then there is no problem
if my record counts big 10 then I see every record duble.
for example my table inculde
1
2
3
4
5
6
7
8
9
there is no problem but if my table inculue 10 recourd it seems like that

1
2
3
4
5
6
7
8
9
10
0
1
2
3
4
5
6
7
8
9
0

but when I look the flame robin every thing is ok. I see one data.
where is the problem?
« Last Edit: December 01, 2011, 02:48:29 pm by ahmetnurideniz »

Lacak2

  • Guest
Re: interested one error
« Reply #1 on: December 02, 2011, 08:31:04 am »
Can you post here sample source code which we can use to reproduce your problem ?

ahmetnurideniz

  • Full Member
  • ***
  • Posts: 110
  • As you sow, you shall reap.
    • Big Student Web Site
Re: interested one error
« Reply #2 on: December 06, 2011, 02:19:42 pm »
Can you post here sample source code which we can use to reproduce your problem ?
I add small exmple file but it example file is working normal.
now I am searching my mistakes.

ahmetnurideniz

  • Full Member
  • ***
  • Posts: 110
  • As you sow, you shall reap.
    • Big Student Web Site
Re: interested one error
« Reply #3 on: December 08, 2011, 12:30:27 pm »
there is example file in the attach.
This file has a problem. But I can not find why ?
I backupup and restore my db without libo transection. But I can not solve my problem.
When you open the file click firs record button from the navi.
and you can see real records. If you add new recourd you will see every records are double
please help me solve for this problem.

is anyone can chek is my insert sql  true?

Code: [Select]
INSERT INTO Lists(LISTS_ID, LISTS_FINDS, LISTS_REPLACE, LISTS_COMMENT) VALUES(:LISTS_ID, :LISTS_FINDS, :LISTS_REPLACE, :LISTS_COMMENT)   

is anyone can chek is my delete sql  true?

[code ]
DELETE FROM LISTS
        WHERE LISTS_ID = :OLD_LISTS_ID ;     
[/code]


« Last Edit: December 08, 2011, 01:12:42 pm by ahmetnurideniz »

Lacak2

  • Guest
Re: interested one error
« Reply #4 on: December 08, 2011, 01:09:20 pm »
When you open the file click firs record button from the navi.
and you can see real records. If you add new recourd you will see every records are double
I do not see any records doubled  :o
Can you try current snapshot with FPC 2.7.1 ? at ftp://ftp.freepascal.org/pub/lazarus/snapshots/

ahmetnurideniz

  • Full Member
  • ***
  • Posts: 110
  • As you sow, you shall reap.
    • Big Student Web Site
Re: interested one error
« Reply #5 on: December 08, 2011, 01:14:50 pm »

I do not see any records doubled  :o
Can you try current snapshot with FPC 2.7.1 ? at ftp://ftp.freepascal.org/pub/lazarus/snapshots/
when you post data is everything ok?

Lacak2

  • Guest
Re: interested one error
« Reply #6 on: December 08, 2011, 02:06:49 pm »
Yes, I append row (with + in DBNavigator on first tab "Variables"), and then Post and all is as expected (new record appears at end of DBGrid).

ahmetnurideniz

  • Full Member
  • ***
  • Posts: 110
  • As you sow, you shall reap.
    • Big Student Web Site
Re: interested one error
« Reply #7 on: December 08, 2011, 02:10:59 pm »
is anyone can chek is my insert sql  true?
Code: [Select]
INSERT INTO Lists(LISTS_ID, LISTS_FINDS, LISTS_REPLACE, LISTS_COMMENT) VALUES(:LISTS_ID, :LISTS_FINDS, :LISTS_REPLACE, :LISTS_COMMENT)   
is anyone can chek is my delete sql  true?

Code: [Select]
DELETE FROM LISTS
        WHERE LISTS_ID = :OLD_LISTS_ID ;     
« Last Edit: December 08, 2011, 02:15:07 pm by ahmetnurideniz »

ahmetnurideniz

  • Full Member
  • ***
  • Posts: 110
  • As you sow, you shall reap.
    • Big Student Web Site
Re: interested one error
« Reply #8 on: December 08, 2011, 02:46:41 pm »
Yes, I append row (with + in DBNavigator on first tab "Variables"), and then Post and all is as expected (new record appears at end of DBGrid).
I install last version lazarus and free pascal but every ting is same.
are you use firebird 2.5.1 ?

ahmetnurideniz

  • Full Member
  • ***
  • Posts: 110
  • As you sow, you shall reap.
    • Big Student Web Site
Re: interested one error
« Reply #9 on: December 08, 2011, 02:52:21 pm »
I take a picture my program
List Id field is unic and there is no 0 number.
but you can see two 0 number in this picture.

ludob

  • Hero Member
  • *****
  • Posts: 1173
Re: interested one error
« Reply #10 on: December 08, 2011, 03:01:02 pm »
From what I can see this is bug: http://bugs.freepascal.org/view.php?id=20514
I'm also getting weird entries after adding a new line.
Solution is to remove IndexName from the TSQLQuery and change SQL to 'select * from lists  order by lists_id'  and 'select datas_id , datas_name, DATAS_ORJ  from datas ORDER BY datas_id'.
Tested with firebird 2.5.1 embedded.
Insert and Delete work fine.

Lacak2

  • Guest
Re: interested one error
« Reply #11 on: December 08, 2011, 03:22:26 pm »
When I open your program, I see there 3 times "0"
When I click First button "0"s disappears
As Ludo wrote it seems be TBufDataSet bug.
(I tested with FB 2.5.0)

ahmetnurideniz

  • Full Member
  • ***
  • Posts: 110
  • As you sow, you shall reap.
    • Big Student Web Site
Re: interested one error
« Reply #12 on: December 08, 2011, 03:28:30 pm »
From what I can see this is bug: http://bugs.freepascal.org/view.php?id=20514
I'm also getting weird entries after adding a new line.
Solution is to remove IndexName from the TSQLQuery and change SQL to 'select * from lists  order by lists_id'  and 'select datas_id , datas_name, DATAS_ORJ  from datas ORDER BY datas_id'.
Tested with firebird 2.5.1 embedded.
Insert and Delete work fine.
it is working now.
thanks

 

TinyPortal © 2005-2018