Topic: I can insert but not update records?!
|
|
frla
User
 Junior Boarder
| Posts: 12 |   | Karma: 0 |
|
I can insert but not update records?!
|
|
Posted: 2007/09/01 12:39 |
|
|
|
|
|
A really odd error. I can insert new records but I can't update them! What am I missing?
|
|
Diman
Admin
 Admin
| Posts: 1509 |  | Karma: 20 |
|
Re:I can insert but not update records?!
|
|
Posted: 2007/09/02 23:35 |
|
|
|
|
Hello
1) What ThinDAC server do you use ? 2) What error message do you get or how else you see, that records are not updated in DB ? 3) Will be good also, if you will give yours: - CREATE TABLE - SELECT ... FROM ... - small code snipet showing how you are updating data
Regards, Dmitry
|
|
frla
User
 Junior Boarder
| Posts: 12 |   | Karma: 0 |
|
Re:I can insert but not update records?!
|
|
Posted: 2007/09/03 06:15 |
|
|
|
|
|
I have tested with both IBX and IBO as servers. Same results. From my debugging I can see that the update-sql is generated properly but I am not quite sure where it's called. I am using Delphi 5 and it might be some of the IFDEF that is faulty and causes this weird behaviour. And like I said, inserts works but not updates... I just tested to delete and it can delete as well. Just the update command that doesn't work. Any clue in which procedure I should check?
|
|
frla
User
 Junior Boarder
| Posts: 12 |   | Karma: 0 |
|
Re:I can insert but not update records?!
|
|
Posted: 2007/09/03 06:16 |
|
|
|
|
Just replied so I can tick that I get notified when an answer is made to this topic.
|
|
Diman
Admin
 Admin
| Posts: 1509 |  | Karma: 20 |
|
Re:I can insert but not update records?!
|
|
Posted: 2007/09/03 06:56 |
|
|
|
|
Hello
Try to post updates, then close server. If after server restart you will see your latest changes, then there is issue with transaction control.
Regards, Dmitry
|
|
frla
User
 Junior Boarder
| Posts: 12 |   | Karma: 0 |
|
Re:I can insert but not update records?!
|
|
Posted: 2007/09/03 07:02 |
|
|
|
|
|
Yeah, I thought so to but it's not. I just verified it so there is something else. I don't get any error either. Can you tell me where the update gets called? I saw that it used dataset.open in some place but shouldn't it use execsql?
|
|
frla
User
 Junior Boarder
| Posts: 12 |   | Karma: 0 |
|
Re:I can insert but not update records?!
|
|
Posted: 2007/09/03 07:07 |
|
|
|
|
|
Just tried dataset.open with an update statement using IBQuery component and it seem to work ok.
|
|
Diman
Admin
 Admin
| Posts: 1509 |  | Karma: 20 |
|
Re:I can insert but not update records?!
|
|
Posted: 2007/09/04 01:19 |
|
|
|
|
Ok, thank you for info. If this solution is working, then stay with it. And I will try to develop more generic (if exists) solution for v 2.0.
Regards, Dmitry
|
|
frla
User
 Junior Boarder
| Posts: 12 |   | Karma: 0 |
|
Re:I can insert but not update records?!
|
|
Posted: 2007/09/04 01:41 |
|
|
|
|
Sorry, I wasn't quite clear. I just tested the underlaying IBX components if they accept updates on the open command. Which they seem to do.
So it's still not working in Delphi 5.
I decided to compile the server in Delphi 2006 and a 2006-server with a D5 client seem to work. No extensive tests has been made but the update works now. So it can only be a faulty IFDEF somewhere, or?
Regards, Fredrik.
|
|
Diman
Admin
 Admin
| Posts: 1509 |  | Karma: 20 |
|
Re:I can insert but not update records?!
|
|
Posted: 2007/09/04 02:10 |
|
|
|
|
It is rather issue of IBX, which comes with Delphi 5. If you need to stay with D5 compiled server, let me know. I will try to find workaround.
Regards, Dmitry
|
|
|