Example #1
0
        public static void ExportEachNumberOccurencesToMathematicaMatrix(SQLUtils.ConnectionString con, string Path, int Rows, int Columns)
        {
            StringBuilder sb = new StringBuilder();
            int           k  = 1;

            sb.Append("{");
            for (int j = 0; j < Rows; j++)        //rows
            {
                for (int i = 0; i < Columns; i++) //columns
                {
                    if (i == 0)
                    {
                        sb.Append("{");
                    }
                    sb.Append(SQLQueries.procedure_CountEachNumberOccurencesOutput(con.ToString(), k++));
                    if (i != Columns - 1)
                    {
                        sb.Append(", ");
                    }
                    else
                    {
                        sb.Append("}");
                    }
                }
                if (j != Rows - 1)
                {
                    sb.Append(",");
                }
            }
            System.IO.StreamWriter file = new System.IO.StreamWriter(Path);
            sb.Append("}");
            file.WriteLine(sb.ToString());
            file.Close();
        }
Example #2
0
 public ExportDrawsToSQL(string serverName, string databaseName, bool trustedConnection, string tableName)
 {
     if (tableName == null)
     {
         throw new ArgumentException(string.Format("Class {0} requires a SQLUtils.Connection string with non-null tableName.", "ExportDrawsToSQL"));
     }
     this.connectionString = new SQLUtils.ConnectionString(serverName, databaseName, trustedConnection, tableName);
 }
Example #3
0
 // Constructors
 public ExportDrawsToSQL(SQLUtils.ConnectionString ConnString)
 {
     if (ConnString.tableName == null)
     {
         throw new ArgumentException(string.Format("Class {0} requires a SQLUtils.ConnectionString with non-null tableName.", "ExportDrawsToSQL"));
     }
     this.connectionString = ConnString;
 }