distal-attribute
distal-attribute
distal-attribute
distal-attribute

import text file dialog

BubikolRamios posted 3 years ago in Feature discussion
There should be 'truncate destination table' checkbox.

That would save enormous amount of time.

Imagine that you are clearing errors in source file. Each time you try again you have to manualy clear dest. table contence.
ansgar posted 3 years ago
Well, why not put that as a checkbox into the "Options" group box. Only I don't agree with that "enormous amount of saved time" but that's ok, that checkbox makes sense anyway.
ansgar posted 3 years ago
Done in r3964
BubikolRamios posted 3 years ago
Pulling it down rigt away (-:
BubikolRamios posted 3 years ago
Tested, it works, and remembers state of that check box, when I open it next time.

Could you do the same (remember) for test encoding one of these days, please.

ansgar posted 3 years ago
Remember last file encoding? Depends on the file you select, as there is some auto-detection.
BubikolRamios posted 3 years ago
Auto does not work. It always selects UTF-8, while I have to allways manualy to do selection of cp1250.

1.leavea auto
2.import
3. x errors (hence, besides other thigs, my enormous amount of time from above (-:) --> not all get imported
4. luckily there is now truncate check box, manual select cp1250
5. and it works

my dest. table is utf8_slovenian_ci, also all columns. Files made under win7 (same thing under win xp)
BubikolRamios posted 3 years ago
"It always selects UTF-8"
That is, I probably don't know what it selects, but it is surely wrong.
ansgar posted 3 years ago
Just looked after that in the code: Heidi fires a

SHOW CREATE DATABASE [selected db]

and detects the database charset here to preselect that in the pulldown (and calls it "Let server/database decide" - which is NOT always UTF-8 btw). Now, I can't do both - store your previous selection AND detect the db charset. But I think the current preselection is not the baddest idea.
BubikolRamios posted 3 years ago
Well, i don't know how encodings realy works, It seems I always produce cp1250. And characters looks OK. If I try to switch into UTF-8 in text editor, some characers turns bad. So remembering last used encoding would be great.

Furthermore, I'm pretty sure that sort order in table dropdown is changing from version to version of HSQL. How can I tell ? I have a table , name starting with _, and before last update of exe it looked like HSQL remembers last used destination table. In newest version I have to scroll thru entire list of tables for each import.

Remembering that would be allso a +.

ansgar posted 3 years ago
Your database then seems to have a UTF-8 encoding. That's nice as you can store nearly every international character in that db without loss. On the other hand, you should adapt your file encoding to the encoding of your database, not cp1250.

Tables and databases are sorted alphabetically. The one which is "active" in HeidiSQL gets preselected in the import dialog, means: the table which was doubleclicked and visible in the table tab.
BubikolRamios posted 3 years ago
Thanks for that inf.

Please login to leave a reply, or register at first.