using KdbndpConnection conn = new KdbndpConnection("Host=192.168.133.221;Port=54321;Database=db1;Pooling=true;User ID=system;Password=123");
conn.Open();
//存储过程调用也是类似
using var cmd = conn.CreateCommand();
cmd.CommandText = "模式.包名称.存储过程名称";
cmd.CommandType = CommandType.StoredProcedure;
//参数1是普通入参
var p1 = cmd.CreateParameter();
p1.ParameterName = "p1";
p1.Direction = ParameterDirection.Input;
p1.Value = "123";
cmd.Parameters.Add(p1);
//参数2是一个select结果的游标
var p2 = cmd.CreateParameter();
p2.ParameterName = "Resultlist";
p2.Direction = ParameterDirection.Output;
p2.KdbndpDbType = KdbndpTypes.KdbndpDbType.Refcursor;
cmd.Parameters.Add(p2);
//执行
cmd.ExecuteNonQuery();
//游标数据获取
var curName = p2.Value;
cmd.CommandText = $"fetch all in \"{curName}\"";
cmd.CommandType = CommandType.Text;
//生成dt
DataTable dt = new DataTable();
using var adp = new KdbndpDataAdapter(cmd);
adp.Fill(dt);
官网下载的包有问题,使用这个包就ok