Hi guys,
i've tried to connect to an local (also tried to connect to on hosted) mssql server by passing the connectionproperties with the commandline, but heidi given me every time an error ("unknown mysql server host").
my connection string was:
-host=localhost\MYINSTANCE -user=sa -password=sa12345 -d=TEST -D=testDatabase
can you help me please ?
PS: tried with version 9.0.0.4865
Commandline connection to MSSQL on portable HeidiSQL
Command line options are MySQL specific yet. But you can pass a session name. Let's say you have named your MSSQL session "Microsoft" or "SQL server", then these command lines should work:
But don't leave away the .exe suffix. I just found out that the command line parser expects that. A bug to fix for me.
heidisql.exe -d=Microsoft
heidisql.exe -d="Microsoft"
heidisql.exe -d="SQL server"
But don't leave away the .exe suffix. I just found out that the command line parser expects that. A bug to fix for me.
Hi ansgar,
my problem is, that the login credentials change from time to time and i would like to get heidi connected as easy as possible (so i have the new credentials, but i wouldnt store it every time and safe it) ... so the command line sounds like a nice option to do this stuff programatically ... but it seems, that atm the cmd is only working with mysql ?
hm no prob, i've started to port your pw encryption from delphi to c# (already done this) and create a little "portable_settings.txt" with an small .net application. finished result: i click on "connect" on my .net app, it creates the settings.txt in %temp%, starts heidi with this settings.txt and immediately deletes the settings.txt =)
btw: wie ich grad sehe kommst du selbst aus D, daher ists leichter so zu schreiben, aber im sinne von anderen forums-usern, die vllt. mitlesen und vor der gleichen problematik stehen lasse ich den obrigen text mal auf englisch :D
my problem is, that the login credentials change from time to time and i would like to get heidi connected as easy as possible (so i have the new credentials, but i wouldnt store it every time and safe it) ... so the command line sounds like a nice option to do this stuff programatically ... but it seems, that atm the cmd is only working with mysql ?
hm no prob, i've started to port your pw encryption from delphi to c# (already done this) and create a little "portable_settings.txt" with an small .net application. finished result: i click on "connect" on my .net app, it creates the settings.txt in %temp%, starts heidi with this settings.txt and immediately deletes the settings.txt =)
btw: wie ich grad sehe kommst du selbst aus D, daher ists leichter so zu schreiben, aber im sinne von anderen forums-usern, die vllt. mitlesen und vor der gleichen problematik stehen lasse ich den obrigen text mal auf englisch :D
Code modification/commit
d940f61
from ansgar.becker,
10 years ago,
revision 9.1.0.4868
Support new command line parameter "n", or "nettype", which takes an integer, representing the protocol number (0=mysql tcpip, ...). See http://www.heidisql.com/forum.php?t=16891
btw, if you (or someone else) need some c# port of the encrypt:
private static String HeidiPwEncrypt(String pass)
{
string result = string.Empty;
Random rnd = new Random();
int salt = rnd.Next(0, 9) + 1;
foreach (int nr in pass.Select(t => t + salt))
{
string h = (nr > 255 ? nr - 255 : nr).ToString("X");
if (h.Length == 1) h = "0" + h;
result += h;
}
return result + salt;
}
private static String HeidiPwEncrypt(String pass)
{
string result = string.Empty;
Random rnd = new Random();
int salt = rnd.Next(0, 9) + 1;
foreach (int nr in pass.Select(t => t + salt))
{
string h = (nr > 255 ? nr - 255 : nr).ToString("X");
if (h.Length == 1) h = "0" + h;
result += h;
}
return result + salt;
}
Please login to leave a reply, or register at first.