sqlcon 2.3.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package sqlcon --version 2.3.0
NuGet\Install-Package sqlcon -Version 2.3.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="sqlcon" Version="2.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add sqlcon --version 2.3.0
#r "nuget: sqlcon, 2.3.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install sqlcon as a Cake Addin
#addin nuget:?package=sqlcon&version=2.3.0

// Install sqlcon as a Cake Tool
#tool nuget:?package=sqlcon&version=2.3.0

Operate databases(servers) like file system on the disk
     sqlcon command: dir,cd,md,rd,del,type,ren,copy,comp,xcopy,cls,ver,echo,rem,set,import,export,mount,umount,open,save,edit,clean,execute,attrib
     Support SQL Server, LocalDB, SQL Azure, SQL Server Express
     Support Xml database on disk or web/ftp site which is used to compare database on 2 differnet networks.
     Support unlimited database server connections
     Compare data/schema between 2+ databases or database servers, and generate SQL script
     Copy data/schema between 2+ databases or database servers
     Search data rows, column, table, view, proc and database name by wildcard(*,?)
     Edit data on GUI or console
     Clean redundant rows
     Delete rows with constraints
     Generate data in format of json, CSV, and SQL script
     Generate C# class: data contract, Linq to SQL, and entity framework
     Execute SQL Script file
     Support all SQL statements

Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.5

    • Tie (>= 2.0.7)

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.6.1 1,194 1/24/2022
2.4.3 921 6/17/2021
2.4.0 977 4/9/2021
2.3.0 1,317 10/25/2020
2.2.3 1,216 8/22/2019
2.1.0 1,202 4/19/2019
1.8.3 1,507 9/21/2017
1.7.10 1,535 3/30/2017
1.7.9 1,512 3/30/2017

sqlcon release notes

10/24/2020 v2.3.0.0
Improvements/Enhancements:
1. Implemented Sys.Data.Linq API which is similar to System.Data.Linq. See the tese cases on the unit test

9/25/2020 v2.2.14.0
Improvements/Enhancements:
1. New command "path" It is similar with Windows environment variable "PATH"
   path c:\bin;c:\program files\sqlcon
   path {path};d:\bin
2. command "run" supports searching paths

9/23/2020 v2.2.13.0
Improvements/Enhancements:
1. command "export /l2s" support code-style: pascal|camel|original
2. class Configuration is exposed which can be used as API in syscore.dll

8/19/2020 v2.2.12.0
Improvements/Enhancements:
1. command "execute" support batch-size to improve performace in very large Sql script file
   use command:
   execute file-name.sql /batch-size:1000 /verbose

7/19/2020 v2.2.11.0
Improvements/Enhancements:
1. Improve table schema, change column property to NOT NULL, INT, BIT or shrink column size with string type if it is possible.
   use command:
   attrib /refine

4/21/2020 v2.2.10.0
Improvements/Enhancements:
1. Generate method like public static bool Keyxxxx(bool value = default(bool)) in command export .cfg to C# class
2. Generate JSON array without table-name wrapped when option /exclude-name is used.

Bug Fixes:
1. Cannot redirect console into stream when 3rd party software accesses sqlcon.exe
2. Cannot generate CRUD SQL clauses when database provider is XML file.


4/4/2020 v2.2.9.0
Bug Fixes:
1. Cannot export data contract class correctly when column contains invalid letters

3/15/2020 v2.2.8.0
Improvements/Enhancements:
1. command: export /json [/ds-name:DataSetName] [/dt-names:DataTableName1,DataTableName2,...] [/out:directroy]|[/out:filename]

1/21/2019 v2.2.7.0
Improvements/Enhancements:
1. Compare number of table rows.
Examples:
  compare ~\product /count

Bug Fixes:
1. Cannot bulk copy if table schema is not dbo

11/1/2019 v2.2.6.0
Improvements/Enhancements:
1. Add command to export constant class
2. For example:
   export /c# /type:const /field:col1,col2 /value:col3,col4

9/12/2019 v2.2.5.0
Improvements/Enhancements:
1. Key "Context" in .cfg file defined Context Variables which can be used on the command line through command "let" or "{variable}"
2. Methods in data Contract class generation can be selected through option "/methods:xxx,xxx,xxx"
3. SQL editor:
     Supports dictionary of System.Data.DataSet

8/24/2019 v2.2.4.0
Improvements/Enhancements:
1. Add command option /include:xxx and /exclude:xxx. option value could be wildcard table name list
2. SQL editor:
     Supports multiple script files and windows
     Search bar to serach table names
  Add [Home] button to reach home directory
  Display Top 100 Rows in data grid
  Display All Rows in data grid

8/21/2019 v2.2.3.0
Improvements/Enhancements:
1. Support append to existing file on output. The command option is "/append"
2. For example:
   export /INSERT /out:test.sql /append dbo.Products

7/10/2019 v2.2.2.0
Improvements/Enhancements:
1. export UPDATE script for data rows
1. export IF NOT EXISTS INSERT ELSE UPDATE script for data rows

7/8/2019 v2.2.1.0
Improvements/Enhancements:
1. Export data contract class from last DataSet requires option /last
Example:
   let output = @"C:\src\Solution1\Project1";
      let ns = "Solution1.Project1";
   SELECT TOP 10 * FROM CtrlRom;
   export /ns:{ns} /using:Sys.Data /method:GetField /col:Cid,RomType /dc1 /out:{output} /class:CtrlRom /last

5/29/2019 v2.2.0.0
Improvements/Enhancements:
1. make class Command to public API

5/23/2019 v2.1.1.0
Bug Fixes:
1. Create incorrect IF EXISTS DROP TABLE script if table schema is not "dbo"
2. Treat path string as absolute path if path string starts with ".\" or "..\"

4/18/2019 v2.1.0.0
New Features:
1. Add new statement ":label", "goto label", "if condition goto label" to sqlcon script(.sqc)
2. Create enum class with attribute [Description("any words")] from SQL table

1/20/2019 v2.0.0.0
New Features:
1. Open an Xml file of .net DataSet as database file. The connection string provider is "file/dataset/xml"
2. Open an Xml file of a list of .net DataSet as database server file. The connection string provider is "file/datalake/xml"
3. Open a Json file as database file. The connection string provider is "file/dataset/json"
4. Open a Json file as database server file. The connection string provider is "file/datalake/json"
5. Open data contract C# source code file as database file. The connection string provider is "file/c#"

1/10/2019 v1.9.8.0
Improvements/Enhancements:
1. command "call" can dump memory to output file when option /dump used.

1/5/2019 v1.9.7.0
Bug Fixes:
1. Cannot generate flat style C# class for configuration array.

12/21/2018 v1.9.6.0
Improvements/Enhancements:
1. Support property lambda getter and setter on the C# class builder
2. Can generate ToDictionary/FromDictionary methods on the Entity class builder

12/7/2018 v1.9.5.0
Improvements/Enhancements:
1. In the command export tablename /delete, set foreign key = NULL when foreign key column is nullable.

12/3/2018 v1.9.4.0
Improvements/Enhancements:
1. Export entity class for the methods of Copy/Clone/Compare/Equals
2. Compare columne name with ignoring case

11/16/2018 v1.9.3.0
Improvements/Enhancements:
1. Export DROP TABLE Script, command "export tableName /drop [/if]"

10/3/2018 v1.9.2.2
Bug Fixes:
1. Compare data on identity column or computed column

6/6/2018 v1.9.2.1
Bug Fixes:
1. IDENTITY(1,1) is on incorrect place when CREATE/ALTER a table

2/14/2018 v1.9.2.0
Improvements/Enhancements:
1. command "last" can display/load/save dataset xml file

2/6/2018 v1.9.1.0
Bug Fixes:
1. Display wrong grid when console window resized

2/2/2018 v1.9.0.0
Improvements/Enhancements:
1. command export /c# support user defined data type

2/1/2018 v1.8.10.0
Improvements/Enhancements:
1. add command "ltype" to display local file content. like windows console command "type" in cmd.exe

1/31/2018 v1.8.9.0
Improvements/Enhancements:
1. Add command "check" to check key-value pair syntax, e.g. check  dbo.config /syntax /key:Key /value:Value

12/07/2017 v1.8.8.0
Improvements/Enhancements:
1. Redesign class stdio class. use cin,cout,cerr and clog instead.
2. Add deployment and installation classes

10/23/2017 v1.8.6.0
Improvements/Enhancements:
1. Display error message when connection string is not supported
2. Upgrade command "md" which supports alias name of filter/locator
Bugs Fixes:
1. Crash on command "rd" to delete locators.

09/26/2017 v1.8.5.0
Improvements/Enhancements:
1. export to .cfg file from dbo.config
2. import .cfg file to dbo.config

09/21/2017 v1.8.4.0
Improvements/Enhancements:
1. Configuration excluded table is replaced by included table names for data comparison and data export.
2. Create multiple C# classes from DataSet.xml
3. export data contract class for read only purpose
4. export SCUD SQL script to indicating directory
5. import .csv file to current table

09/20/2017 v1.8.3.0
Improvements/Enhancements:
1. Support {expression} on the command line. e.g. "export /conf /out:{path}" where "path" is variable  

09/19/2017 v1.8.2.0
Improvements/Enhancements:
1. Create config classes for key=value pairs. command>export /conf /type:const /key:col1 /default:col2

09/11/2017 v1.8.1.0
Improvements/Enhancements:
1. Disable query function on the user.cfg, use command batch file instead.
2. run batch file by arguments %1, %2, ....

09/11/2017 v1.8.0.0
Improvements/Enhancements:
1. sqlcon support command batch file (.sqc).
2. Support command echo [on|off]

09/06/2017 v1.7.13.0
Improvements/Enhancements:
1. command export /c# uses current table name as class name
2. Remove /c# option on the command> type, use export /c# instead.
3. Add new command> last to display last query result.
Bugs Fixes:
1. command export /c# doesn't export UniqueIdentifier type column correctly.

06/27/2017 v1.7.12.0
Improvements/Enhancements:
1. command dir can match table name without dbo schema, for example, command>dir cust* can match dbo.cust*
Bugs Fixes:
1. Code builder doesn't generate attributes
2. Output of sqlcon cannot redirect when table displays.

05/19/2016 v1.7.11.0
New Features:
1. command>export /c# /ns:xxx /class:name /type:dict|[list] /out:path generate C# class of List<T> or Dictionary<T1,T2> data from last table result

04/27/2017 v1.7.10.0
Bugs Fixes:
1. Cannot create 2+ foreign keys constraints pointing to the same primary key table

01/25/2017 v1.7.9.0
New Features:
1. command>import file /ds /dt load xml file

01/24/2017 v1.7.8.0
Improvements/Enhancements:
1. Improve command xcopy performance

11/30/2016 v1.7.7.0
New Features:
1. command>export /c# /ns:xxx /class:name /out:path generate C# class and data from last table result
Bugs Fixes:
1. Cannot lauch editor application if defined editor application doesn't exist. use notepad.exe instead

10/20/2016 v1.7.6.0
New Features:
1. command>export /entity /ns:xxx /base:inheritance /out:path generate method CopyFrom, Compare, Clone for entity framrework classes
2. command>export /save create template for IF EXISTS UPDATE ELSE INSERT

9/20/2016 v1.7.5.0
New Features:
1. command>edit to launch query edit window, to edit, execute sql script
2. Configuration file can be loaded from clouds

9/12/2016 v1.7.4.0
New Features:
1. Color schema of GUI table editor is configurable on sqlcon.cfg

8/24/2016 v1.7.3.0
New Features:
1. command>export /l2s to generate Linq to SQL C# class

8/19/2016 v1.7.2.1
New Features:
1. command>export /create supports wildcard to match table names

7/26/2016 v1.7.2.0
New Features:
1. command>export /json supports last data table to Json string

7/11/2016 v1.7.1.1
Bugs Fixes:
1. User configuration file %LOCALAPPDATA/datconn/sqlcon/user.cfg is overwritten by system default user.cfg

7/6/2016 v1.7.1.0
New Features:
1. Support Microsoft SQL Server Express LocalDB

7/5/2016 v1.7.0.0
New Features:
1. Support Microsoft SQL Azure connection string

6/15/2016 v1.6.0.0
Bugs Fixes:
1. Crashes when no database server defined on the user.cfg
2. Crashes when command>type /edit<CR> read-only tables
Improvements/Enhancements:
1. command>type /c# /class:name<CR> outputs named C# data array

5/4/2016 v1.5.1.0
New Features:
1. command xcopy supports column mappings

4/27/2016 v1.5.0.0
New Features:
1. Add GUI tabe editor, command "type /edit" to open editor
2. Add GUI tabe viewer, command "open viewer" to view last data table

2/29/2016 v1.4.0.0
New Features:
1. xcopy large size data table using BulkCopy and display progress bar

2/7/2016 v1.3.3.0
New Features:
1. Add CopyTo, Clone, CompareTo extension methods to Data contract class

1/31/2016 v1.3.2.2
Bugs Fixes:
1. Data contract property of System.Data.DataTable cannot be DBNull

1/25/2016 v1.3.2.0
New Features:
1. Generate C# data contract class from System.Data.DataTable.
2. Generate method to convert DataTable into IEnumerable<T>
3. e.g. generate Northwind.Region: export /dc /class:Region

public partial class Region
{
 public int RegionID {get; set; }
 public string RegionDescription {get; set; }

 public static IEnumerable<Region> ToEnumerable(DataTable dt)
 {
  return dt.AsEnumerable()
  .Select(row => new DataContract
  {
   RegionID = row.Field<int>("RegionID"),
   RegionDescription = row.Field<string>("RegionDescription")
  });
 }
}



1/20/2016 v1.3.1.12
New Features:
1. command <export /csv> export current database or table to csv file.


1/13/2016 v1.3.1.11
Bugs Fixes:
1. Stored proc sp_databases returns 0 rows in some SQL server.

New Features:
1. command <open release> to open release notes.

Improvements/Enhancements:
1. command <mount name=database_server> uses Windows authentication if user name and password are not provided.