Thread: Update MS SQL table from DBGRID not working
 |
This question is not answered.
Helpful answers available: 2.
Correct answers available: 1.
|
|
Replies:
6
-
Last Post:
Aug 16, 2017 6:33 PM
Last Post By: Jan Erik Roed
|
|
|
Posts:
10
Registered:
12/10/12
|
|
I am on Delphi 10.2
Using Microsoft SQL Server 2014 (SP1-CU13) (KB4019099) - 12.0.4522.0 (X64)
Jun 28 2017 17:36:31
Copyright (c) Microsoft Corporation
Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.3 <X64> (Build 15063: )
I have a select statement : Select * from manufacturers order by name
The DBGRID is linked to a Datasource and datasource linked to a FDQuery - FDQuery linked to a FDConnection.
When I try to update a column in the DBGRID the application and post, it gives me this error message:
[firedac][phys][odbc][microsoft][SQL server Native Client 11.0][SQL server] Transaction (Process ID 51) was deadlocked on lock | generic waitable object resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
When I remove the "order by name" from the select it happily updates the table.
I have not changed any defaults anywhere.
Hope somebody can help out.
Thanks in advance.
Best regards
Jan Erik Roed
|
|
|
Posts:
801
Registered:
3/14/14
|
|
Jan-Erik Roed wrote:
I am on Delphi 10.2
Using Microsoft SQL Server 2014 (SP1-CU13) (KB4019099) - 12.0.4522.0
(X64) Jun 28 2017 17:36:31
Copyright (c) Microsoft Corporation
Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.3
<X64> (Build 15063: ) I have a select statement : Select * from
manufacturers order by name The DBGRID is linked to a Datasource and
datasource linked to a FDQuery - FDQuery linked to a FDConnection.
When I try to update a column in the DBGRID the application and post,
it gives me this error message: [firedac][phys][odbc][microsoft][SQL
server Native Client 11.0][SQL server] Transaction (Process ID 51)
was deadlocked on lock | generic waitable object resources with
another process and has been chosen as the deadlock victim. Rerun the
transaction.
When I remove the "order by name" from the select it happily updates
the table. I have not changed any defaults anywhere.
Hope somebody can help out.
Thanks in advance.
Best regards
Jan Erik Roed
This question has nothing to do with the Delphi IDE and should be
posted in Embarcadero.public.delphi.database.firedac
|
|
|
|
Posts:
10
Registered:
12/10/12
|
|
Jan-Erik Roed wrote:
I am on Delphi 10.2
Using Microsoft SQL Server 2014 (SP1-CU13) (KB4019099) - 12.0.4522.0
(X64) Jun 28 2017 17:36:31
Copyright (c) Microsoft Corporation
Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.3
<X64> (Build 15063: ) I have a select statement : Select * from
manufacturers order by name The DBGRID is linked to a Datasource and
datasource linked to a FDQuery - FDQuery linked to a FDConnection.
When I try to update a column in the DBGRID the application and post,
it gives me this error message: [firedac][phys][odbc][microsoft][SQL
server Native Client 11.0][SQL server] Transaction (Process ID 51)
was deadlocked on lock | generic waitable object resources with
another process and has been chosen as the deadlock victim. Rerun the
transaction.
When I remove the "order by name" from the select it happily updates
the table. I have not changed any defaults anywhere.
Hope somebody can help out.
Thanks in advance.
Best regards
Jan Erik Roed
This question has nothing to do with the Delphi IDE and should be
posted in Embarcadero.public.delphi.database.firedac
Please - I do not understand this answer/comment???
I have gone to Embarcadero.public.delphi.database.firedac as it says and my question comes up!!
So then what?
|
|
|
|
Posts:
801
Registered:
3/14/14
|
|
Jan-Erik Roed wrote:
Please - I do not understand this answer/comment???
I have gone to Embarcadero.public.delphi.database.firedac as it says
and my question comes up!! So then what?
This post is in embarcadero.public.delphi.ide. To check out I've tested
with globe button in the XanaNews it takes to the
https://forums.embarcadero.com/thread.jspa?messageID=896117&tstart=0#896
117 - according to the web interface the question is in: Embarcadero
Discussion Forums » Delphi » IDE.
I doubt that Dmitry Arefiev will find this question here.
|
|
|
|
Posts:
7,731
Registered:
9/22/99
|
|
Jan-Erik Roed wrote:
Please - I do not understand this answer/comment???
I have gone to Embarcadero.public.delphi.database.firedac as it says
and my question comes up!! So then what?
It shows up there too indeed, but it also appears in .ide, so something
is wrong.
--
Rudy Velthuis http://www.rvelthuis.de
"The multitude of books is a great evil. There is no limit to
this fever for writing."
-- Martin Luther
|
|
|
|
Posts:
801
Registered:
3/14/14
|
|
Rudy Velthuis (TeamB, MVP) wrote:
Jan-Erik Roed wrote:
Please - I do not understand this answer/comment???
I have gone to Embarcadero.public.delphi.database.firedac as it
says and my question comes up!! So then what?
It shows up there too indeed, but it also appears in .ide, so
something is wrong.
Not here in XN the post shows only here in the IDE group.
|
|
|
|
Posts:
2
Registered:
8/18/16
|
|
Rudy Velthuis (TeamB, MVP) wrote:
Jan-Erik Roed wrote:
Please - I do not understand this answer/comment???
I have gone to Embarcadero.public.delphi.database.firedac as it
says and my question comes up!! So then what?
It shows up there too indeed, but it also appears in .ide, so
something is wrong.
Not here in XN the post shows only here in the IDE group.
Hopefully I have now managed to post it in the Firedac Forum.
Thank you guys for making me aware 
|
|
|
|
Legend
|
|
Helpful Answer
(5 pts)
|
|
Correct Answer
(10 pts)
|
|
Connect with Us