close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 19 years ago

Closed 17 years ago

#363 closed defect (fixed)

Problem with DBSeries

Reported by: Christian Paz Owned by: danirus
Priority: normal Milestone:
Component: DataBase Version: head
Severity: normal Keywords:
Cc:

Description

I have found a sort of strange error that causes me problems when retrieving
queries from Database. For this test I suposse you have a SQL Server connection
called TestDB with user TestUser and password TestPwd

It is expected that these both methods guide me to the same results:

1st Way:

DBSeries gets a set and after that I get the Serie as the first element of the

resultant set:

Here the code starts
Real DBOpen("TestDB", "TestUser", "TestPwd");
Set setTest=DBSeries("select cast('Dic 25 2005 12:01AM' as smalldatetime),0.1237
union select cast('Dic 25 2005 12:02AM' as smalldatetime),0.1237", S(0),
SetOfText("serTest_"));
Serie serTest = setTest[1];
Here the code finishes

Now, running $DUMP -> Serie it gives a list of the series created and it looks
to be correct, I can make SerDat, etc.

2nd Way:
A Serie variable gets directly the value from DBSeries(params...)[1]... it does
not sound so correct, but it should still be possible in case I am sure it is
always going to return at least one element, and in this case it really returns:

Here the code starts
Real DBOpen("TestDB", "TestUser", "TestPwd");
Serie serTest=DBSeries("select cast('Dic 25 2005 12:01AM' as
smalldatetime),0.1237 union select cast('Dic 25 2005 12:02AM' as
smalldatetime),0.1237", S(0), SetOfText("serTest_"))[1];

Here the code finishes

Now, running $DUMP -> Serie tol.exe makes a crash. Also when I do a

Real val6=SerDat(serTest, First(serTest));

It gives another different crash but Tol also closes.

I do not know if it is strictly associated to Minute - To - Minute and Hourly
Timesets, but I have tested with Daily and had no problems. If it is
informative, a month ago the same code worked fine.

Saludos,
Christian

Change History (1)

comment:1 Changed 17 years ago by Víctor de Buen Remiro

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.