using Sybase.Data.AseClient;//反编译修改后的DLL public class SybaseHelper
{
public AseConnection con; public SybaseHelper()
{
this.con = new AseConnection("Data Source=10.196.58.43;Database=DBA;Port=2638;UID=dba;PWD=sql");
} public DataSet DataAdapters(string sql)
{ try
{
con.Open();
AseCommand command = new AseCommand(sql, con);
DataSet ds = new DataSet();
AseDataAdapter adapter = new AseDataAdapter();
adapter.SelectCommand = command;
adapter.Fill(ds); return ds;
}
catch (Exception ex)
{
throw ex;
}
finally
{
con.Close();
con.Dispose();
} } public void ExcuteSql(string sql)
{
try
{
con.Open();
AseTransaction trans = con.BeginTransaction(); AseCommand command = new AseCommand(sql, con);
AseDataAdapter ada = new AseDataAdapter();
command.Transaction = trans;
command.ExecuteNonQuery();
command.Dispose(); trans.Commit();
}
catch (Exception ex)
{
throw ex;
}
finally
{
con.Close();
con.Dispose();
}
}
}
免安装客户端需要引用DLL
msvcr71.dll
sybdrvado11.dll
sybdrvssl.dll
Sybase.Data.AseClient /*可以反编译,本人就是反编译修改部分代码后才能使用*/
本文地址: DLL包