import text file dialog

BubikolRamios's profile image BubikolRamios posted 12 years ago in Feature discussion Permalink
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's profile image ansgar posted 12 years ago Permalink
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.
Code modification/commit from ansgar.becker, 12 years ago, revision 6.0.0.3964
Add "truncate table" feature to text import dialog. See http://www.heidisql.com/forum.php?t=9367
ansgar's profile image ansgar posted 12 years ago Permalink
Done in r3964
BubikolRamios's profile image BubikolRamios posted 12 years ago Permalink
Pulling it down rigt away (-:
BubikolRamios's profile image BubikolRamios posted 12 years ago Permalink
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's profile image ansgar posted 12 years ago Permalink
Remember last file encoding? Depends on the file you select, as there is some auto-detection.
BubikolRamios's profile image BubikolRamios posted 12 years ago Permalink
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's profile image BubikolRamios posted 12 years ago Permalink
"It always selects UTF-8"
That is, I probably don't know what it selects, but it is surely wrong.
ansgar's profile image ansgar posted 12 years ago Permalink
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's profile image BubikolRamios posted 12 years ago Permalink
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's profile image ansgar posted 12 years ago Permalink
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's profile image BubikolRamios posted 12 years ago Permalink
Thanks for that inf.

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