Commit Graph

175 Commits

Author SHA1 Message Date
michael
71ab58a2f1 * Added ActualSQL and ParamValue log types, correct SQLConnector so it passes log options on
git-svn-id: trunk@31157 -
2015-06-26 09:00:09 +00:00
lacak
ef00cefa0a fcl-db: cleanup (remove unused parts of code)
git-svn-id: trunk@31146 -
2015-06-23 10:27:36 +00:00
lacak
242d750ef5 fcl-db: sqldb: ExecuteDirect should call StartImplicitTransaction, when Transaction.Options contains stoUseImplicit (else it leads later to AV due to nil Transaction.Handle)
git-svn-id: trunk@30920 -
2015-05-27 05:06:01 +00:00
lacak
d0b365c99a fcl-db: sqldb: fix trailing quote char
git-svn-id: trunk@30807 -
2015-05-06 07:13:04 +00:00
lacak
8b41206ffd fcl-db: sqldb:
- if there is already opened FUpdateQry, which is used for refreshing field values, we must first close it and later open again to get new values.
- if there is automatically generated UpdateSQL, then we must always call ConstructUpdateSQL to correctly get ReturningClause
(probably there is better way how to handle SQL statements with returning clause)

git-svn-id: trunk@30798 -
2015-05-04 12:43:16 +00:00
lacak
5017d1e6eb fcl-db: sqldb:
- if there is explicitly supplied RefreshSQL do not try generate returning clause.
- if there is explicitly supplied InsertSQL, UpdateSQL set ReturningClause to False as it can lead to "can not open non-select statement"

git-svn-id: trunk@30796 -
2015-05-04 08:37:44 +00:00
michael
78dda3e217 * Renamed sqoPreferRefresh to sqoRefreshUsingSelect
git-svn-id: trunk@30691 -
2015-04-21 11:11:55 +00:00
michael
3e100245e0 * Globally take into account forcedclose when committing/rollbacking, so all operations succeed
git-svn-id: trunk@30627 -
2015-04-17 19:26:36 +00:00
lacak
b8f8e61957 fcl-db: sqldb: keep in synchro Database/Transaction when changing Database/Transaction, but only when NEW Database.Transaction or Transaction.Database is assigned. After discussion in DB-Core modifies rev. 30483. Bug #27805
git-svn-id: trunk@30494 -
2015-04-08 08:06:59 +00:00
lacak
63caee1cae fcl-db: sqldb: cosmetic
git-svn-id: trunk@30493 -
2015-04-08 06:10:06 +00:00
michael
c1935de563 * Patch from Laco to fix assigning transaction/database when database/transaction does not match
git-svn-id: trunk@30483 -
2015-04-07 13:09:56 +00:00
michael
9a807bdfe3 * Implemented RETURNING clause as a way of updating fields
git-svn-id: trunk@30463 -
2015-04-06 13:20:30 +00:00
michael
1427d94933 * Check changecount before deciding to cancel updates
git-svn-id: trunk@30462 -
2015-04-06 08:10:17 +00:00
michael
5e99f7f9c1 * Implemented sqoCancelUpdatesOnRefresh, remedy bug ID #21989
git-svn-id: trunk@30437 -
2015-04-05 17:39:28 +00:00
lacak
d193c51dbd fcl-db: cosmetic
git-svn-id: trunk@30305 -
2015-03-24 12:41:54 +00:00
michael
743324f72b * Patch from Laco with minor modification from bug ID #27251
git-svn-id: trunk@30291 -
2015-03-23 16:37:51 +00:00
lacak
9fba59b3bc fcl-db:
- base: added new TDataSetState: dsRefreshFields used in refreshing field between local TBufDataSet and remote DB during process of applying updates.
- mssql: implemented RefreshLastInsertID + test

git-svn-id: trunk@29443 -
2015-01-12 09:00:37 +00:00
lacak
8ae9752530 fcl-db: cosmetic
git-svn-id: trunk@29442 -
2015-01-12 06:38:29 +00:00
michael
868ba1560f * Applied patch by Michael Van Ham (bug ID 27220)
git-svn-id: trunk@29361 -
2014-12-30 07:35:31 +00:00
lacak
e82b7a953d fcl-db: sqldb: set default return value for function StartImplicitTransaction. Can be overriden by descendants.
git-svn-id: trunk@29305 -
2014-12-19 09:33:48 +00:00
lacak
e26d106b5b fcl-db: sqldb: some databases supports inserting of explicit values into "autoincrementing" columns. So in case when ftAutoInc field has already supplied value, do not do fetch of LastID
git-svn-id: trunk@29237 -
2014-12-09 10:46:06 +00:00
lacak
e3b12486c5 fcl-db: sqldb: fix AV (uninitialized variable) in MySQL tests
rearrange ordering of methods
rename some methods as discussed in DB-Core

git-svn-id: trunk@29196 -
2014-12-03 11:54:42 +00:00
michael
6d5622aca3 * Implemented RefreshSQL and fetching value for AutoInc fields
git-svn-id: trunk@29183 -
2014-11-29 20:29:52 +00:00
lacak
c41bc63cd4 fcl-db: sqldb: Make ESQLDatabaseError.CreateFmt more safe if it is called with Args=[] (then do not try Format(Msg,Args))
git-svn-id: trunk@29169 -
2014-11-28 07:48:13 +00:00
lacak
b300241c09 fcl-db: sqldb: initialize TCustomSQLStatement.FRowsAffected to -1. Revealed by TestRowsAffected.
git-svn-id: trunk@29168 -
2014-11-28 07:43:26 +00:00
lacak
eaadd51b42 fcl-db: reverts rev.29118, because there are 3rd party libraries (like ZEOS), which define own EDatabaseError descendants, where they define members FErrorCode and/or ErrorCode.
This patch also fixes bugs #27078 and #26684, what was intention of rev.29118

git-svn-id: trunk@29163 -
2014-11-27 13:43:44 +00:00
lacak
9f730c9831 fcl-db: sqldb: rename some of new types as discussed in DB-Core
git-svn-id: trunk@29143 -
2014-11-24 13:13:47 +00:00
michael
411e798495 * AutoCommit option
git-svn-id: trunk@29121 -
2014-11-23 14:58:26 +00:00
michael
2134e3aaac * Promoted errorcode to the EDatabaseError level, unified all error codes
git-svn-id: trunk@29118 -
2014-11-23 12:46:53 +00:00
michael
f00212c993 * Fix+Test for bug #27068 : coCheckRowsAffected
git-svn-id: trunk@29113 -
2014-11-22 19:40:11 +00:00
michael
6b32a6e0e5 * Transaction options and connection options
git-svn-id: trunk@29109 -
2014-11-22 16:28:09 +00:00
michael
a53fca1b67 * QueryOptions for disconnected mode and autoapplyupdates
git-svn-id: trunk@29088 -
2014-11-17 12:24:46 +00:00
lacak
041b4681e9 fcl-db: sqldb: cosmetic
git-svn-id: trunk@27920 -
2014-06-10 08:45:53 +00:00
lacak
5c936f0ecf fcl-db: sqldb: always call in TSQLQuery.InternalOpen BindFields so all private variables are calculated properly (f.e. FBlobFieldCount)
git-svn-id: trunk@27919 -
2014-06-10 08:41:06 +00:00
lacak
feff396633 fcl-db: sqldb: simplify code, remove unused field (FSQLBuf)
git-svn-id: trunk@27858 -
2014-06-05 10:42:23 +00:00
lacak
375eab52c7 fcl-db: sqldb: add PROCEDURE_NAME column as alias to ROUTINE_NAME column in schema view ROUTINES query. GetProcedureNames method expects column named PROCEDURE_NAME, which is not a part of SQL standard INFORMATION_SCHEMA.ROUTINES view.
git-svn-id: trunk@27783 -
2014-05-14 12:44:42 +00:00
lacak
7de12fb703 fcl-db: sqldb: align column naming (PROCEDURE_NAME) for stProcedures schema query with ODBC standard (SQLProcedures) and also with Delphi naming used in ADO OpenSchema for siProcedures (and partial also with DBX).
Damage is that SQL standard uses different naming (ROUTINE_NAME) in INFORMATION_SCHEMA.ROUTINES view :-(
Bug #26145

git-svn-id: trunk@27780 -
2014-05-13 09:07:02 +00:00
lacak
aa62089fb3 fcl-db: sqldb: TSQLTransaction.EndTransaction should end transaction (a do not leave it active). So caCommitRetaining and caRollbackRetaining are only aliases of caCommit, caRollback in this case. Bug #26068
git-svn-id: trunk@27738 -
2014-05-05 10:36:22 +00:00
reiniero
b2813cc627 fcl-db: cosmetic:
* Rename deceptively named GetLogEvent
* Typos

git-svn-id: trunk@27407 -
2014-03-31 09:54:46 +00:00
lacak
37e0aa202c fcl-db: sqldb: propagate LogEvents from TSQLConnector to proxy TSQLConnection
git-svn-id: trunk@27293 -
2014-03-27 07:26:51 +00:00
reiniero
f005a65ce4 fcl-db:
* add logging support for TSQLConnection.ExecuteDirect

git-svn-id: trunk@27258 -
2014-03-24 12:10:15 +00:00
lacak
285d459801 fcl-db: sqldb: cosmetic
git-svn-id: trunk@27257 -
2014-03-24 10:57:36 +00:00
reiniero
420e0165a2 fcl-db: sqlconnection:
* actually follow default property for Property LogEvents..Default LogAllEvents in constructor
* addresses issue #25867

git-svn-id: trunk@27170 -
2014-03-17 08:01:36 +00:00
lacak
cf42b3bdc0 fcl-db: cosmetic
git-svn-id: trunk@27127 -
2014-03-13 13:41:29 +00:00
lacak
607369f830 fcl-db: sqldb: add PSGetTableName; addition to rev.27074
git-svn-id: trunk@27114 -
2014-03-12 10:56:49 +00:00
michael
3c015a3ab1 * Made property TableName protected (as suggested in 20395)
git-svn-id: trunk@27074 -
2014-03-10 12:44:04 +00:00
lacak
2c0bd0fe59 fcl-db: sqldb: when TSQLQuery.FieldDefs.Update is called (is used by IDE Field editor for "Add fields ...") for closed (never prepared) dataset then Cursor is nil, and is passed to TSQLConnection.AddFieldDefs where AV can occurs.
So call Prepare before ...
Bug #25829

git-svn-id: trunk@27021 -
2014-03-07 11:22:28 +00:00
lacak
277c3fb00a fcl-db: sqldb: cosmetic (reorder methods)
git-svn-id: trunk@26962 -
2014-03-05 14:40:43 +00:00
lacak
3765b74ecd fcl-db: sqldb: simplify GetStatementInfo method signature
(it was protected and now is 3 weeks public in TSQLConnection)

git-svn-id: trunk@26961 -
2014-03-05 11:20:21 +00:00
lacak
e5850015d9 fcl-db: cosmetic
git-svn-id: trunk@26947 -
2014-03-04 12:10:33 +00:00