Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2014-03

MS SQL tests: fix for string settings & invalid dates

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Reinier Olislagers

Ran dbtestframework on trunk, Windows x86 against MS SQL Server 2008R2 (also earlier revision Linux x64 against MS SQL Server 2005)

1) Committed adding
SET ANSI_PADDING
to test setup
http://msdn.microsoft.com/en-us/library/ms187403%28v=sql.105%29.aspx In fact, MS recommends this be always on and the OFF option is deprecated. this fixed:
TestInactSwitchIndex Failed: expected: < 'quotes' > but was: < 'quotes'> TestIndexFieldNamesAct Failed: expected: < 'quotes' > but was: < 'quotes'> TestStringParamQuery Failed: expected: < 'quotes' > but was: < 'quotes'> TestFixedStringParamQuery Failed: expected: < > but was: < >

No new errors/failures introduced.

BTW, perhaps a good idea to set ansi padding to on in the mssqlconn code, or perhaps even ansi defaults?

2) noticed date values were often off by one:
e.g.
TestDateTime Failed: expected: <1899-12-29> but was: <1899-12-30> TestDateParamQuery Failed: expected: <1899-12-29> but was: <1899-12-30> TestCrossStringDateParam Failed: expected: <1899-12-29> but was: <1899-12-30>
TestStreamingDataFieldsXML Failed: FDate expected: <31/03/1800> but was: <01/04/1800>

Similar in my earlier Linux run,
aptitude show freetds-devPackage: freetds-dev
State: installed
Automatically installed: no
Version: 0.91-5

Is this a new thing in FPC trunk or perhaps an error in freetds? Even before introduction of new date/time types in v 2008, SQL Server docs indicate date should work from about 1753:
http://msdn.microsoft.com/en-us/library/ms187819%28v=sql.90%29.aspx

Anyway, I think I'm off to looking again at using csvdocument for sdfdataset...

Thanks,
Reinier

Reply by email

Reinier Olislagers
to Reinier Olislagers
Reinier Olislagers wrote
Ran dbtestframework on trunk, Windows x86 against MS SQL Server 2008R2 (also earlier revision Linux x64 against MS SQL Server 2005)

<snip>

Sorry for the noise, yet another mail destined for the fpc db list...

Reply by email