未找到 Clickhouse 数据源名称且无默认驱动程序
Clickhouse Data source name not found and no default driver
我正在尝试通过 odbc (clikhouse-odbc) 从 c#+.Net 进行连接。
下面是我的代码
var builder = new OdbcConnectionStringBuilder();
builder.Driver =
"E:\...\clickhouse-odbc-master\vs\x64\clickhouseodbc.dll";
builder.Add("SERVER", "....");
builder.Add("DATABASE", "default");
builder.Add("PORT", 8123);
builder.Add("FRAMED", 0);
var connection = new OdbcConnection("Driver = Click House ANSI; Host = ***; Port =***");
//Also tried below
//var connection = new OdbcConnection(builder.ConnectionString);
connection.Open();
return connection;
当我运行时,我有异常:
System.Data.Odbc.OdbcException: 'ERROR [IM002] [Microsoft][ODBC Driver
Manager] Data source name not found and no default driver specified'.
驱动我也安装好了,配置如下图
我必须添加 builder.Driver 如下:
var builder = new OdbcConnectionStringBuilder();
builder.Driver =
"E:\<path>\clickhouseodbc.dll";
builder.Add("SERVER", "...");
builder.Add("DATABASE", "default");
builder.Add("PORT", 8123);
builder.Add("FRAMED", 0);
builder.Driver = "ClickHouse ANSI";
var connection = new OdbcConnection(builder.ConnectionString);
connection.Open();
我正在尝试通过 odbc (clikhouse-odbc) 从 c#+.Net 进行连接。
下面是我的代码
var builder = new OdbcConnectionStringBuilder();
builder.Driver =
"E:\...\clickhouse-odbc-master\vs\x64\clickhouseodbc.dll";
builder.Add("SERVER", "....");
builder.Add("DATABASE", "default");
builder.Add("PORT", 8123);
builder.Add("FRAMED", 0);
var connection = new OdbcConnection("Driver = Click House ANSI; Host = ***; Port =***");
//Also tried below
//var connection = new OdbcConnection(builder.ConnectionString);
connection.Open();
return connection;
当我运行时,我有异常:
System.Data.Odbc.OdbcException: 'ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified'.
驱动我也安装好了,配置如下图
我必须添加 builder.Driver 如下:
var builder = new OdbcConnectionStringBuilder();
builder.Driver =
"E:\<path>\clickhouseodbc.dll";
builder.Add("SERVER", "...");
builder.Add("DATABASE", "default");
builder.Add("PORT", 8123);
builder.Add("FRAMED", 0);
builder.Driver = "ClickHouse ANSI";
var connection = new OdbcConnection(builder.ConnectionString);
connection.Open();