OdbcConnection DbConnection = null;
try
{
DbConnection = new OdbcConnection(
"Driver=SQL Anywhere 10;" +
"Uid=user;" +
"pwd=pass;" +
"Dsn=<name>");
DbConnection.Open();
}开发者_如何学JAVA
catch (Exception e)
{
Console.WriteLine(e.Message);
Console.ReadKey();
System.Environment.Exit(0);
}
Now my problem is that if <name>
is a User-Datasourcename everything is fine.
On the other hand if i use a System-Datasourcename as <name>
it throws me an error that it can't find the Datasourcename. Any hints how i could use a System DSN?
Thanks in advance.
Two example Images: http://i.stack.imgur.com/3h7vh.png http://imgur.com/5Govx
X64 DSN is not visible for a X86 Application...
精彩评论