📄 dbbase.h
字号:
#pragma once
#using <System.Xml.dll>
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Data;
using namespace System::Data::OleDb;
//gloabel static variable
const int FapLan_EN = 2;
const int FapLan_JP = 1;
const int FapLan_CN = 0;
public __gc class DBBase
{
public:
//construct function
DBBase();
// Open Connection
bool blnCnnOpen(String * strCnn ,String * strUser , String * strPass );
// Open Default Connection strCnn == "ORCL2"
bool blnCnnOpen();
// close connection
bool blnCnnClose(); //Connect Close TRUE: Success
//execute select sql to get count(*) ,sum(*) value SQL setence etc.
int intSQL_Select(String * strSQL);
//Get Dataset Class for a table
DataSet * dSetSQL_Select(String *strSQL,
String * StrTableName,
int intClear //clear DBBase Dataset default 0 to clear ,,1 not to clear);
);
//Get Row Record for a row
DataRow * dRowSQL_Select(String *strSQL );
//execute Insert,Update,Delete SQL
bool blnSQL_Execute(String * strSQL);
//get flection records count
//modified by kasenhoo 051115
bool blnSQL_Execute(String * strSQL, int * );
//Begin Transaction //do not use , auto use in OpenCnn
bool blnBeginTrans();
//Commit
bool blnCommit();
//Rollback
bool blnRollBack();
/*Modifed BY KasenHOo 051014*/
//Get DataReader
OleDbDataReader * dReadSQL_Select(String * strSQL);
/*End*/
//gloabel static variable
static String *CstrSTOCK_DATA = S"STOCK_DATA";
static String *CstrDELIVER_DATA = S"DELIVER_DATA";
static String *CstrPRODUCT_RESULT_DATA = S"PRODUCT_RESULT_DATA";
static String *CstrRETURN_DATA = S"RETURN_DATA";
static String *CstrQUALITY_CONTROL_DATA = S"QUALITY_CONTROL_DATA";
static String *CstrPLATE_DATA = S"PLATE_DATA";
static String *CstrPRODUCT_SCHEDULE = S"PRODUCT_SCHEDULE";
static String *CstrPRODUCT_SCHEDULE_TEMP = S"PRODUCT_SCHEDULE_TEMP";
static String *CstrDISTRIBUTION_DATA = S"DISTRIBUTION_DATA";
static String *CstrDISTRIBUTION_PLAN = S"DISTRIBUTION_PLAN";
static String *CstrSTOCK_MODIFY = S"STOCK_MODIFY";
static String *CstrWORK_CALENDER = S"WORK_CALENDER";
static String *CstrACCOUNT_DATA = S"ACCOUNT_DATA";
static String *CstrCONTROL = S"CONTROL";
static String *CstrACCOUNT_ITEM = S"ACCOUNT_ITEM";
static String *CstrFACTORY_MST = S"FACTORY_MST";
static String *CstrCOST_MST = S"COST_MST";
static String *CstrCOST_COMPOSITION = S"COST_COMPOSITION";
static String *CstrLINE_MST = S"LINE_MST";
static String *CstrTEAM_MST = S"TEAM_MST";
// //
static String *CstrPARTS_MST = S"PARTS_MST";
static String *CstrPART_COMPOSITION = S"PART_COMPOSITION";
static String *CstrREASON_MST = S"REASON_MST";
static String *CstrTEXT_MST = S"TEXT_MST";
protected:
String *strConnectString ;
OleDbConnection* connBase;
OleDbDataAdapter* adpBase;
DataSet *dsetBase;
bool blnTrans;
OleDbCommand * cmdExecute;
//OleDbCommand * cmdOleSQL;
OleDbTransaction* transExecute;
private:
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -