This is a migrated thread and some comments may be shown as answers.

Database for testing - problems with updates

3 Answers 71 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Software
Top achievements
Rank 1
Software asked on 19 Jul 2017, 11:19 AM

Hello

we try to use a database for a test. We write into a table the date of two days ago and of three days ago. These dates are our variables in the test.

 

The problem: The dates are not updated (example: variables two days ago 14/7 and 15/7, variables of today 14/7 and 15/7, but it should be 16/7 and 17/7)

 

Our stored procedure:

USE [DATABASE]
GO
/****** Object:  StoredProcedure [dbo].[Listsearch_Report_Dates_Procedure]    Script Date: 19.07.2017 12:25:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[Listsearch_Report_Dates_Procedure]
AS
BEGIN

Update dbo.Listsearch_Report_Dates

Set Vorgestern = CONVERT(VARCHAR(6), getdate()-2, 4), 
Vorvorgestern = CONVERT(VARCHAR(6), getdate()-3, 4) 

select * from Listsearch_Report_Dates
END

 

 

3 Answers, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 24 Jul 2017, 08:08 AM
Hi Matthias,

Thanks for the shared details. 

Please let me know if you have clicked on the Update button (please see screenshot) and what the result was. Also did you run the test? Was it taking the correct values in runtime? 

Please also let me know what type is the database you have decided to use in case none of the above works as expected. 

Thanks in advance! 

Regards,
Elena Tsvetkova
Progress Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Software
Top achievements
Rank 1
answered on 24 Jul 2017, 08:34 AM
Now we use another database and it works. It is quite difficult to explain, because our settings are the same and we didn't change something in our configuration.
0
Elena
Telerik team
answered on 27 Jul 2017, 07:38 AM
Hi Matthias,

Thanks for the feedback. I am glad to know the issue was resolved somehow although it is not quite clear. Though I suspect it might something related to the initial database if it was corrupted somehow. 

Anyways, I hope you will not face that inconsistent behavior again! 

Regards,
Elena Tsvetkova
Progress Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Software
Top achievements
Rank 1
Answers by
Elena
Telerik team
Software
Top achievements
Rank 1
Share this question
or