Your Rank: 93
I already added the project for you. But here you go again.
File Attachment:File Name: TestFDQuery_2018-08-31-2.zip
File Size: 55 KB
I'm having trouble getting TFDQuery to behave. In my example project, I have a simple SQL database, with a single table called Trans. This table has 2 columns, TransId and Msg. We add two records to this table, where Msg is NULL in the first record. TransId is an autoinc int column.
qrySelect selects the two records ordered by TransId, so that the record with Msg = null is the first record. We then use qryUpdate to update the two records in Trans with the same values as they already have. When this is done, Msg in my second record is nulled! Why is that?
The database is created with the query below.
CREATE DATABASE [Test]
CREATE TABLE [dbo].[Trans](
[TransId] [int] IDENTITY(1,1) NOT NULL,
[Msg] [text] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
insert into Trans(Msg) values(NULL)
insert into Trans(Msg) values('This is a text')