Tuesday, June 23, 2020

SQL SERVER - How to load data from text file to table ?

If I have this table:
column_name     datatype   length
--------------- ---------- ------
id              varchar    7
description     nvarchar   60
last_index      int        NULL
..and this text file (first three rows only here):
-94544;ovládání;74
-00000;přídavné podstavce;15
-01881;hřídel, nástavec-spojovací(keiper);145
For import file data to this table use this statement:
delete dbo.drawing_index;

bulk insert dbo.drawing_index
from 'c:\cieb\import\drawing_index.txt'
with
(
	CODEPAGE = '65001',	-- UTF-8
	fieldterminator = ';',
	ROWTERMINATOR = '\n'
)
Output:

Tuesday, June 2, 2020

C# - How to hide TabPage ?

TabPage.Hide() doesn`t work correctly. But you can use this trick:
TabCommon.Parent = null;
TabLabels.Parent = null;
Output: