Re: [fpc-devel] MS SQL tests: fix for string settings invalid dates

2014-11-18 Thread JP Stolk
Hello,

I am struggeling with Lazarus and a connection to MSSQL server 2005.
I get the data, but when i change a fieldvalue, then apply updates, I get the 
error 20019 like you listed: 
http://lists.freepascal.org/fpc-devel/2014-March/033494.html
When ik hit OK the update is not applied, when i apply updates again 
immediately, then the updates apply correctly, but the connection or the query 
closes.
Is there a solution?
[cid:image001.png@01D00295.ED0CB500]

Thanks in advance,

Jan-Pieter Stolk
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] MS SQL tests: fix for string settings invalid dates

2014-11-18 Thread Marcos Douglas
On Mon, Nov 17, 2014 at 6:50 PM, JP Stolk jpst...@stolkbv.nl wrote:

 Hello,



 I am struggeling with Lazarus and a connection to MSSQL server 2005.

 I get the data, but when i change a fieldvalue, then apply updates, I get
 the error 20019 like you listed: 
 http://lists.freepascal.org/fpc-devel/2014-March/033494.html

 When ik hit OK the update is not applied, when i apply updates again 
 immediately, then
 the updates apply correctly, but the connection or the query closes.

 Is there a solution?

Could you send an example of your code?
The problem could be transaction, PK do not exists or other thing.

I work with MSSQL 2005~2008 without these problems. But, I have
problems with Transactions because SQLdb works little different to
Delphi so, I create a project, the Greyhound*, that works better for
me. Maybe you shoud try.

* https://github.com/mdbs99/Greyhound

Regards,
Marcos Douglas
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] MS SQL tests: fix for string settings invalid dates

2014-11-18 Thread Marcos Douglas
On Tue, Nov 18, 2014 at 8:56 AM, Marcos Douglas m...@delfire.net wrote:
 On Mon, Nov 17, 2014 at 6:50 PM, JP Stolk jpst...@stolkbv.nl wrote:

 Hello,



 I am struggeling with Lazarus and a connection to MSSQL server 2005.

 I get the data, but when i change a fieldvalue, then apply updates, I get
 the error 20019 like you listed: 
 http://lists.freepascal.org/fpc-devel/2014-March/033494.html

 When ik hit OK the update is not applied, when i apply updates again 
 immediately, then
 the updates apply correctly, but the connection or the query closes.

 Is there a solution?

 Could you send an example of your code?
 The problem could be transaction, PK do not exists or other thing.

 I work with MSSQL 2005~2008 without these problems. But, I have
 problems with Transactions because SQLdb works little different to
 Delphi so, I create a project, the Greyhound*, that works better for
 me. Maybe you shoud try.

 * https://github.com/mdbs99/Greyhound

 Regards,
 Marcos Douglas

I mean: I *had* problems.

Marcos Douglas
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] MS SQL tests: fix for string settings invalid dates

2014-11-18 Thread LacaK

Hi,
try set PacketRecords=-1 in your TSQLQuery
-Laco.


Hello,

 


I am struggeling with Lazarus and a connection to MSSQL server 2005.

I get the data, but when i change a fieldvalue, then apply updates, I 
get the error 20019 like you listed: 
http://lists.freepascal.org/fpc-devel/2014-March/033494.html


When ik hit OK the update is not applied, when i apply updates again 
immediately, then the updates apply correctly, but the connection or 
the query closes.


Is there a solution?

 


Thanks in advance,

 


Jan-Pieter Stolk



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
  


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] MS SQL tests: fix for string settings invalid dates

2014-03-07 Thread 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
 N:275 E:7 F:12 I:12
  TTestBasics N:9 E:0 F:0 I:0
TestParseSQL
TestInitFielddefsFromFields
TestDoubleFieldDef
TestFieldDefWithoutDS
TestGetParamList
TestGetFieldList
TestExtractFieldName
TestCheckFieldNames
TestFindField
  TTestDBBasics N:33 E:0 F:3 I:2
TestSetFieldValues
TestGetFieldValues
TestSupportIntegerFields
TestSupportSmallIntFields
TestSupportWordFields  Ignored test: Fields of the type Word are not 
supported by this type of dataset
TestSupportStringFields  Failed: DataSize expected: 11 but was: 41
TestSupportBooleanFields
TestSupportFloatFields
TestSupportLargeIntFields
TestSupportDateFields  Failed: DataType expected: 9 but was: 11
TestSupportTimeFields  Ignored test: Fields of the type Time are not 
supported by this type of dataset
TestSupportCurrencyFields
TestSupportBCDFields
TestSupportfmtBCDFields
TestSupportFixedStringFields  Failed: DataSize expected: 11 but was: 41
TestSupportBlobFields
TestSupportMemoFields
TestDoubleClose
TestCalculatedField
TestAssignFieldftString
TestAssignFieldftFixedChar
TestSelectQueryBasics
TestPostOnlyInEditState
TestMove
TestActiveBufferWhenClosed
TestEOFBOFClosedDataset
TestLayoutChangedEvents
TestDataEventsResync
TestRecordcountAfterReopen
TestdeFieldListChange
TestExceptionLocateClosed
TestCanModifySpecialFields
TestDetectionNonMatchingDataset
  TTestCursorDBBasics N:29 E:0 F:0 I:0
TestCancelUpdDelete1
TestCancelUpdDelete2
TestAppendInsertRecord
TestBookmarks
TestBookmarkValid
TestDelete1
TestDelete2
TestLocate
TestLocateCaseIns
TestLocateCaseInsInts
TestLookup
TestOnFilter
TestIntFilter
TestNegativeIntFilter
TestStringFilter
TestNullAtOpen
TestAppendOnEmptyDataset
TestInsertOnEmptyDataset
TestFirst
TestEofAfterFirst
TestLastAppendCancel
TestRecNo
TestSetRecNo
TestBug7007
TestBug6893
TestRequired
TestOldValueObsolete
TestOldValue
TestModified
  TTestBufDatasetDBBasics N:31 E:0 F:0 I:0
TestClosedIndexFieldNames
TestFileNameProperty
TestClientDatasetAsMemDataset
TestSaveAsXML
TestIsEmpty
TestBufDatasetCancelUpd
TestBufDatasetCancelUpd1
TestMultipleDeleteUpdateBuffer
TestDoubleDelete
TestReadOnly
TestMergeChangeLog
TestAddIndexInteger
TestAddIndexSmallInt
TestAddIndexBoolean
TestAddIndexFloat
TestAddIndexLargeInt
TestAddIndexDateTime
TestAddIndexCurrency
TestAddIndexBCD
TestAddIndex
TestAddDescIndex
TestAddCaseInsIndex
TestInactSwitchIndex
TestAddIndexActiveDS
TestAddIndexEditDS
TestIndexFieldNames
TestIndexFieldNamesAct
TestIndexCurRecord
TestAddDblIndex
TestIndexEditRecord
TestIndexAppendRecord
  TTestUniDirectionalDBBasics N:33 E:1 F:3 I:2
TestSetFieldValues
TestGetFieldValues
TestSupportIntegerFields
TestSupportSmallIntFields
TestSupportWordFields  Ignored test: Fields of the type Word are not 
supported by this type of dataset
TestSupportStringFields  Failed: DataSize expected: 11 but was: 41
TestSupportBooleanFields
TestSupportFloatFields
TestSupportLargeIntFields
TestSupportDateFields  Failed: DataType expected: 9 but was: 11

Re: [fpc-devel] MS SQL tests: fix for string settings invalid dates

2014-03-07 Thread Reinier Olislagers
On 07/03/2014 11:38, 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...
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel