Sysbase数据库程序开发

 

1)首先在bin中引用Sybase.Data.AseClient.dll

2)web.config中添加数据库连接

<add name="AirTransConnectionString" connectionString="Data Source=192.168.2.230;Port=5000;UID=sa;PWD=;Database=dahang;"/>

3)单元中引用using Sybase.Data.AseClient;

public void UpdateAirChargeDetail(AirChargeDetail airChargeDetail) ...{ public void UpdateAirChargeDetail(AirChargeDetail airChargeDetail) ...{ using ...(AseConnection aseconnection = new AseConnection(DateAccess.sConnectionstring)) ...{ aseconnection.Open(); AseTransaction trans = aseconnection.BeginTransaction(IsolationLevel.RepeatableRead); try ...{ AirChargeDetailDAL dal = new AirChargeDetailDAL(); dal.ModifyAirChargeDetail(aseconnection,trans,airChargeDetail); trans.Commit(); aseconnection.Close(); } catch (Exception ex) ...{ DOMUtility.WriteLogFile(ex.Message); trans.Rollback(); aseconnection.Close(); } } }

你可能感兴趣的:(数据库,exception,database,程序开发)