求帮忙把vb.net代码转成vb能用的代码,这段代码是用来做翻译的

2024-11-08 10:26:38
推荐回答(2个)
回答1:

引用MicrosoftDAO3.6ObjectLibraryPublicFunctionDaoOpenDB(ByValpDbTypeAsString,ByValpDbNameAsString,ByValpMdbCnctAsString)AsIntegerOnErrorGoToErr_HandlerDimm_DbDataBaseAsDAO.DatabaseDimgwsMainworkSpaceAsDAO.WorkspaceDimDAODBEngineAsNewDAO.DBEngine()Dimm_DbWkSpace=DAODBEngine.CreateWorkspace("","Admin","")IfpDbType="c_ACCESS"Then'Accessm_DbDataBase=m_DbWkSpace.OpenDatabase(pDbName)Else'Oraclem_DbDataBase=m_DbWkSpace.OpenDatabase(pDbName,True,False,pMdbCnct)EndIfDaoOpenDB=c_OK'你在全局中已定义ExitFunctionErr_Handler:DaoOpenDB=c_NG'你在全局中已定义MsgBox(Err.Description,MsgBoxStyle.OkOnly+MsgBoxStyle.Critical,"Err")EndFunction

回答2:

这叫倒行逆施啊。