static void TestOracleRaw() { //byte b = Convert.ToByte("01", 16); OracleDataBase db = new OracleDataBase("User Id=bpi;Password=yuantacps;Data Source=TS02G"); DataTable dt = db.QueryCommand("SELECT * FROM ptDeptRiskCtrl"); if (dt != null && dt.Rows.Count > 0) { DataRow row = dt.Rows[0]; byte[] rawData = (byte[])(row["PTDeptAuthID"]); string strRaw = AbstractDataBase.RawToString(rawData); byte[] raw2 = AbstractDataBase.StringToRaw(strRaw); System.Diagnostics.Debug.Assert(rawData.Length == raw2.Length); for (int index = 0; index < raw2.Length; ++index) { System.Diagnostics.Debug.Assert(rawData[index] == raw2[index]); } string tmps = db.FieldToSQL(new OracleRowID(strRaw)); } db.Close(); }
public static AbstractDataBase GetDataBaseConnection() { if (mDataBaseConnection == null) mDataBaseConnection = new SQLiteConnection (MobileOptions.GetDataBaseFilePath()); else return mDataBaseConnection; return mDataBaseConnection; }