@@ -28,10 +28,8 @@ public Mysql(string Database, int ID = 0)
2828 {
2929 this . ID = ID ;
3030 this . Database = Database ;
31- if ( ! MysqlCon . State . ContainsKey ( ID ) )
31+ if ( ! MysqlCon . Contains ( ID ) )
3232 throw new ErrorDump ( $ "没有Mysql数据库{ ID } ") ;
33- if ( MysqlCon . State [ ID ] == false )
34- throw new ErrorDump ( "Mysql未就绪" ) ;
3533 if ( string . IsNullOrWhiteSpace ( Database ) )
3634 throw new ErrorDump ( "没有选择数据库" ) ;
3735 }
@@ -143,10 +141,8 @@ public MSsql(string Database, int ID = 0)
143141 {
144142 this . Database = Database ;
145143 this . ID = ID ;
146- if ( ! MSCon . State . ContainsKey ( ID ) )
147- throw new ErrorDump ( $ "没有Mysql数据库{ ID } ") ;
148- if ( MSCon . State [ ID ] == false )
149- throw new ErrorDump ( "MS数据库没有链接" ) ;
144+ if ( ! MSCon . Contains ( ID ) )
145+ throw new ErrorDump ( $ "没有MS数据库{ ID } ") ;
150146 if ( string . IsNullOrWhiteSpace ( Database ) )
151147 throw new ErrorDump ( "没有选择数据库" ) ;
152148
@@ -243,10 +239,8 @@ public class Oracle
243239 public Oracle ( string Database = "" , int ID = 0 )
244240 {
245241 this . ID = ID ;
246- if ( ! OracleCon . State . ContainsKey ( ID ) )
242+ if ( ! OracleCon . Contains ( ID ) )
247243 throw new ErrorDump ( $ "没有Oracle数据库{ ID } ") ;
248- if ( OracleCon . State [ ID ] == false )
249- throw new ErrorDump ( "Oracle没有链接" ) ;
250244 if ( string . IsNullOrWhiteSpace ( Database ) )
251245 throw new ErrorDump ( "没有选择数据库" ) ;
252246 this . Database = Database ;
0 commit comments