214 Commits

Author SHA1 Message Date
c1b1a5f52e Unescape default text value for a column when inserting a new grid row, so \r and \n and whatever does not get into a cell as a literal. Fixes issue #3283. 2013-09-14 15:27:44 +00:00
fc68ab5cae Revert r4357 (add database name in GetCreateViewCode), to fix issue #3329 (view export includes superfluous database name). Issue #3098 is still fixed, by the later r4479 (get view columns from IS.COLUMNS). 2013-09-11 04:26:35 +00:00
0759ea2f8c Code cosmetic for getting server version:
* Remove properties ServerVersionInt and ServerVersionStr from TDBConnection
* Instead, move private GetServerVersionInt() and GetServerVersionStr() to public scope, named like the previously used properties now
* Remove overridden methods in descendants of TDBConnection, do it with a version conditional in the upper class
* Finally, remove ConvertServerVersion() and merge code into ServerVersionStr()
* We have 7 declarations and 3 implementations less than before
2013-08-28 04:41:58 +00:00
fddad4669f TOP(x) clause for UPDATES + DELETES introduced in MSSQL 2005. Do not use that on older servers. See http://www.heidisql.com/forum.php?t=13289 2013-08-28 03:52:34 +00:00
c7373e92db Don't know when exactly but in some cases VirtualTree.FocusedColumn seems to have the InvalidColumn (-2) index. Do not pass such negative indexes to a TStringList in TDBQuery.ColAttributes. See http://www.heidisql.com/forum.php?t=13245 2013-08-22 04:34:30 +00:00
a4b6855420 Fix regex in TDBConnection.ParseViewStructure which matches on IS.COLUMNS.COLUMN_TYPE but just finds empty matches, because all expression groups are optionally. Also, ZEROFILL attribute for numeric columns never gets detected. Fixes issue #3311. 2013-08-17 05:25:51 +00:00
721df2da37 Make regex in ParseViewStructure even more loose, this time due to dots in the view's name. See http://www.heidisql.com/forum.php?t=13191 2013-08-16 04:37:00 +00:00
4628fac73d Fetch column names from IS.COLUMNS only, without joining IS.VIEWS from which we anyway don't read something. Fixes issue #3305. 2013-08-06 18:15:58 +00:00
58b2a66800 Get column names from VIEW per IS.COLUMNS, not per SHOW COLUMNS, to support MSSQL here. Fixes empty grid results for MSSQL VIEWs. See comment #46 of issue #3212. 2013-08-05 04:15:01 +00:00
e509ea5437 Include application name in login prompt. Fixes issue #3180. 2013-07-25 03:59:42 +00:00
ccc6e0b26a Use table name from helper TDBObject in TDBQuery.PrepareEditing, as TMySQLQuery.TableName does not return the VIEW's name when the VIEW contains aggregated columns. Fixes issue #3284. 2013-07-22 04:36:17 +00:00
51c27f7a27 * Silence various compiler warnings about non initialized variables.
* Globally turn off platform warnings
2013-07-16 04:45:28 +00:00
3007a5e860 Send column default value through UnescapeString and then to EscapeString, and let UnescapeString remove double backslashes. Fixes issue #3283. 2013-07-15 05:00:07 +00:00
2d27ac46f7 Make charset query compatible to MSSQL 2000. Fixes issue #3269. 2013-07-07 05:51:49 +00:00
f4a82f4ec0 Use TDBQuery.DBObject.Database in TDBQuery.DatabaseName(), so for VIEWs we do not get the db from the table which is selected. Fixes issue #3266. 2013-07-05 04:37:06 +00:00
05a48a3cb3 Issue #3212: Fall back to db..table if schema is unknown or server has no schema support. 2013-07-01 16:41:56 +00:00
1660104d4d Support length of "max" in data types. Used in MSSQL. 2013-07-01 04:23:06 +00:00
ca655582bd Issue #3212: Introduce TDBQuery.DBObject, to which we assign the selected object when getting the result for the data grid. Use that DBObject in TDBQuery.QuotedDbAndTableName and TDBQuery.PrepareEditing, where we need to know the schema of the object. 2013-06-30 14:10:51 +00:00
63bd7947a5 Consider schema name when focusing tree node in TMainForm.SetActiveDBObject > TMainForm.FindDBObjectNode > TDBObject.IsSameAs 2013-06-30 14:05:33 +00:00
4909931f83 Issue #3212: TDBQuery.SaveModifications makes use of TDBQuery.QuotedDbAndTableName, not TDBConnection.QuotedDbAndTableName. Make first one internally call the second one, so both do the same thing. 2013-06-29 04:28:37 +00:00
c3d0932196 Do not always display NULL in a MSSQL grid field when value was edited. 2013-06-29 04:22:05 +00:00
2ff588b233 "WITH .. CHECK OPTION" is already contained in the "source" value of a .frm file. Don't include it a second time in TMySQLConnection.GetCreateViewCode. Fixes issue #3258. 2013-06-29 04:03:07 +00:00
5865716090 Support brackets in routine parameters. Fixes issue #3255. 2013-06-28 04:39:01 +00:00
4dc4c22257 Documentation 2013-06-27 17:36:18 +00:00
a047f4998a Issue #3212: Reestablish MSSQL 2000 compatibility by removing SCHEMA_NAME(schema_id) from TAdoDBConnection.FetchDbObjects. 2013-06-27 17:35:48 +00:00
8326e0de2e Issue #3212: Inject XY_SCHEMA=xy clause into all other IS queries in TAdoDBConnection.GetCreateCode. 2013-06-27 04:46:00 +00:00
9acc474e9a Issue #3212: Consider schema name in default objects sorting, so the tree displays the same order as we have in the database tab when sorted by "Name" column. 2013-06-26 04:24:51 +00:00
b77b990714 Issue #3212: Filter objects by schemata when gathering columns from IS.COLUMNS in TDBConnection.GetCreateCode, so we don't get columns from objects with the same name in another schema. 2013-06-26 04:11:46 +00:00
8e02fa9fee Move helpers:GetIndexIcon to TTableKey.GetImageIndex 2013-06-25 04:15:11 +00:00
e5486ebc5e * Avoid calling TDBConnection.ClearDbObjects() on active database after copying table. Instead, call actRefresh which takes care of a probably opened table object in the table editor.
* Check for table existence via SELECT on IS.TABLES, avoid usage and refresh of db objects here also.
* Fixes issue #3250.
2013-06-24 04:56:24 +00:00
5ed52a851a Inject default schema between db and table in TDBConnection.QuotedDbAndTableName if target object does not exist. See issue #3212. 2013-06-22 05:52:30 +00:00
56b6e103a0 Introduce TDBConnection.FindObject(db, obj). Use that in TDBConnection.QuotedDbAndTableName() and for checks for table existence. 2013-06-22 05:35:36 +00:00
6371ff5557 Issue #3212: Introduce TDBConnection.QuotedDbAndTableName(), callable with a db and table string. Internally calls TDBObject.QuotedDbAndTableName(), so we get the schema between db and table if required. 2013-06-22 04:45:53 +00:00
9b7393ee56 Issue #3212: Add basic support for schemas in MSSQL. 2013-06-21 04:52:25 +00:00
d9a5cfab41 Add overlay icons for table engines Blackhole and MergeMyISAM. 2013-06-17 21:12:21 +00:00
574498f955 Fix detection of text column types in MSSQL, so TEXT and NTEXT do not appear as numbers in query results. 2013-06-03 04:47:45 +00:00
976881c748 Join the two error message snippets with a linefeed, not a space, so that gets more readable. See http://www.heidisql.com/forum.php?t=12758 2013-05-30 08:48:57 +00:00
ed4f197f3f Use additional EOleException message in GetLastError. See http://www.heidisql.com/forum.php?t=12758 2013-05-30 06:08:36 +00:00
b359c9df88 MSSQL: Escape joker chars in conjunction with an "ESCAPE" appendix after the LIKE clause. See http://www.heidisql.com/forum.php?t=12747 . 2013-05-28 17:48:55 +00:00
c4f0b2798b MSSQL wants single quotes escaped with a second single quote, not with a backslash. No clue how to escape joker chars in a WHERE clause. 2013-05-28 04:54:08 +00:00
9cf6634426 Insert/update NVARCHAR/NTEXT/NCHAR contents with preceding "N", as MSSQL wants Unicode strings handled this way. See issue #2873. 2013-05-27 04:32:01 +00:00
8c711d3e56 Put session name into caption of login-on-demand dialog, so applications like Keepass can identify it. Fixes issue #3180. 2013-05-25 06:15:17 +00:00
8dd4399395 Introduce server specific quote characters, so ParseTableStructure() and DeQuoteIdent() do not remove too much.
* bug report: http://www.heidisql.com/forum.php?t=12685
* broken in r4364, for fixing issue #2496
2013-05-23 17:37:01 +00:00
550a139dac Support default values of BIT columns in table editor and SQL export. Fixes issue #2544. 2013-05-19 04:30:14 +00:00
108c5037aa Turn column default text memo into a TButtonedEdit, and use a right button drop down menu which displays ENUM and SET values. Fixes the ENUM+SET part of issue #1160. 2013-05-10 05:12:41 +00:00
b04fac85cc Add "Global" column to ListVariables, and highlight values different to their session pendant. 2013-04-17 05:02:36 +00:00
7f87bc7eb2 Try a new approach in TDBConnection.ParseRoutineStructure(). Should fix stripped backslashes from routine body, issue #3107.
* Use SHOW CREATE PROCEDURE/FUNCTION result again, instead of code from IS.ROUTINES
* Remove every known CREATE PROCEDURE/FUNCTION clause and use remaining text as routine body.
* Respect MS SQL function options, taken from http://msdn.microsoft.com/en-us/library/ms186755.aspx
* Introduce helpers.ExtractComment() for usage in ParseRoutineStructure() and ParseTableStructure()
2013-04-11 21:29:44 +00:00
a68c51154c MSSQL stored routine editor:
* Extend TAdoDBConnection.GetCreateCode for stored routines
* Extract the relevant routine code in TDBConnection.ParseRoutineStructure
* Match database name against ROUTINES.ROUTINE_CATALOG (not ROUTINE_SCHEMA). See http://www.heidisql.com/forum.php?t=12435 .
2013-04-04 06:40:25 +00:00
1bd28f43e6 Ignore errors due to non existent columns in IS.ROUTINES on MSSQL. See http://www.heidisql.com/forum.php?t=12435 2013-03-31 06:19:57 +00:00
46ce43da24 Issue #2496: Revert r4366, do not trim definition of MS SQL views. Instead, let the regex in ParseViewStructure() expect CREATE at any point instead of the very beginning of the code. That way the view definition may contain a BOM or any space at the start. 2013-03-17 06:50:16 +00:00