Here I will provide an example of programmatic adding cells, and accordingly columns and rows. This may be necessary when you very much need to fill DataGridView and at the same time do not need a DataSet. In my case, this is required most often when it is necessary to fill some parameters that may differ for the same object, for example, there may be a different number, in addition, they may be of different type, etc.<br><br>So, example:
This example is provided for its own sake, so as not to forget. The code demonstrates the change of the color of the row output in the field depending on the value. The formula code: if {@delta_c}<0 Then crRed else crBlack Now, how to do it in pictures:…
In this article, I will provide an example of creating and using a Crystal Report in Visual Studio. The provided example is a real working project for preparing tickets for printing on a standard laser printer. Let's start with what we need, which is a data source, so first create a project where we will use our report and create a data source that we will export to an XML file, for a more simple and intuitive creation of a new report and its settings.
This article will cover the main ways to perform type casting in MySQL. It should be noted that in most cases, type casting in MySQL will work automatically, for example:
There are often cases when creating an event for controls programmatically is necessary, for example, when we need to perform certain manipulations with elements and data they contain before events are processed. This can be on change of selected value, mouse click, change of content, and many other events. It is advisable to create events programmatically rather than in the designer. I will show how to do this in an example.
The String class includes a number of methods for comparing, searching, and modifying string values. Here I will list the most frequently used (by me) capabilities of this class: Empty — a property that determines whether a string is empty; Compare() — compares two strings; CompareOrdinal() — allows comparing strings regardless of regional settings; Concat() — combines two or more strings into a new string; Copy() — copies the original string; Equals() — checks whether two strings have the same values; Format() — formats a string using a strictly defined format; Intern() — returns a reference to an existing string instance; Join() — adds a new string to a specified location in an existing string; Chars — a character index of the string; Length — the number of characters in the string; Clone() — returns a reference to an existing string; CompareTo() — compares one string with another; CopyTo() — copies a specified number of characters from the string to a Unicode character array; EndsWith() — checks whether a string ends with a specified sequence of characters; Equals() — determines whether two strings have the same values; Insert() — inserts a new string into an existing one; LastIndexOf() — returns the index of the last occurrence of an element in the string; PadLeft() — aligns a string to the right, skipping all spaces or other specially defined characters; PadRight() — aligns a string to the left, skipping all spaces or other specially defined characters; Remove() — removes a specified number of characters from the string; Split() — returns a substring separated from the main array by a specified character; StartsWith() — determines whether a string starts with a specified sequence of characters; Substring() — returns a substring from the main character array; ToCharArray() — copies characters from the string to a character array; ToLower() — converts characters in the string to lowercase; ToUpper() — converts characters in the string to uppercase; Trim() — removes all occurrences of specified characters from the beginning and end of the string; TrimEnd() — removes all occurrences of specified characters from the end of the string; TrimStart() — removes all occurrences of specified characters from the beginning of the string.<br><br>That's all the main stuff.
Window functions are functions that calculate a scalar value based on a window (set of records). This value is determined using the OVER instruction. Example: select regioncode, aolevel, offname, row_number() over(partit…
There are no special problems with passing parameters to an application at startup in C#, it's done quite simply like this: static void Main(string[] args) { if (args.Length == 0) { MessageBox.Show("No parameters"); } else { MessageBox.Show("1");…
MySQL database supports several different types of tables, each with its own unique features and limitations. I will start my description with the "native" type of tables for MySQL, MyISAM. If the type of table is not specified in the create table operator, it will be assigned to MyISAM. Each MyISAM table is stored on disk in three files (in the subdirectory of the mysql/data catalog), the names of which match the name of the table, and the extension can take one of the following values: .frm - the structure of the table, this file contains information about the names and types of columns and indexes; .MYD - in this file, the data of the table is stored; .MYI - in this file, the indexes of the table are stored. Tables of the MyISAM type have several features: 1. Data is stored in a cross-platform format, which allows for the transfer of databases from one server to another by direct copying of files, bypassing intermediate forms. 2. The maximum number of indexes is 64 (from version 4.1.2). Each index can be a maximum of 16 columns. 3. From MySQL 4.1, a specific encoding can be set for each text column. 4. Indexing of text columns, including variable-length columns, is allowed. 5. Full-text search is supported. 6. Tables have a special flag indicating the correctness of closing the table. If the server was stopped abnormally, when loading, the flags of the closed tables will signal the possible damage to the tables and the server will attempt to automatically check and restore them.
Recently came across a very useful resource for all developers working with databases, called Connection Strings. The resource is a collection of various connection strings to different databases using various providers and technologies. Very useful resource. Here is the link: <a href="[[B0]]" target="_blank" rel="noopener external">[[B1]]</a>. The resource is in English, but I assume it's not a problem for those who need it.