Problem with RefreshRecord and column called "[_004]"

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
dupe
Posts: 20
Joined: Wed 15 Jun 2016 13:37

Problem with RefreshRecord and column called "[_004]"

Post by dupe » Thu 13 Oct 2016 07:54

Hello,

we have a column called "[_004]" in our table.

Now we want to get a value from this query:

Code: Select all

query.SQL.Add('SELECT * FROM TABLE');
query.Open;
query.SQLRefresh.Text := 'SELECT * FROM TABLE WHERE ID = :ID';
query.RefreshRecord;
The value we retrieve from the table depends on the execution.
Sometimes we get a value and sometimes we only get a NULL value.
When we delete "[_004]" from the query we get a value for each column.
Additionally when we skip the line "query.SQLRefresh.Text" we get a value even with the column "[_004]".
We guess the problem lies in setting the value for query.SQLRefresh.Text.
But we can't delete this line. We've a more complex code in production where we need it.

Do you have any suggestions?

Best regards

azyk
Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: Problem with RefreshRecord and column called "[_004]"

Post by azyk » Mon 17 Oct 2016 10:36

Please compose a small sample reproducing the issue and send it using the contact form https://www.devart.com/company/contactform.html . Include CREATE scripts for test tables in the sample.

dupe
Posts: 20
Joined: Wed 15 Jun 2016 13:37

Re: Problem with RefreshRecord and column called "[_004]"

Post by dupe » Wed 19 Oct 2016 14:22

I still got no answer from my contact request.

Here is the requested script.

Code: Select all

CREATE TABLE [dbo].[TABLE](
	[TABLE_ID] [int] IDENTITY(1,1) NOT NULL,
	[ID] [int] NOT NULL,
	[_004] [nvarchar](40) NULL,
	[TS] [timestamp] NOT NULL,
 CONSTRAINT [PK_TABLE] PRIMARY KEY CLUSTERED 
(
	[TABLE_ID] ASC
))

azyk
Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: Problem with RefreshRecord and column called "[_004]"

Post by azyk » Tue 25 Oct 2016 13:40

We have already fixed this problem. This fix will be included in the next SDAC build.

dupe
Posts: 20
Joined: Wed 15 Jun 2016 13:37

Re: Problem with RefreshRecord and column called "[_004]"

Post by dupe » Tue 25 Oct 2016 16:20

I'm glad to read that.
When is it planned to release the next version?

azyk
Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: Problem with RefreshRecord and column called "[_004]"

Post by azyk » Fri 28 Oct 2016 07:17

SDAC release is planned for the next week.

Post Reply