开发平台(Platform): (Ex: VC++, GCC, Linux, ...)
Vs2010 C++
额外使用到的函数库(Library Used): (Ex: OpenGL, ...)
DAO
问题(Question):
执行到下面程式码前端有打星号的那行时
会跑出"参数太少预期个数1"的错误讯息
喂入的资料(Input):
预期的正确结果(Expected Output):
错误结果(Wrong Output):
程式码(Code):(请善用置底文网页, 记得排版)
void DataRead(int basetittlemin,int basetittlehour)
{
try{
DAO::DBEngine^ dbEngine;
DAO::Database^ database;
DAO::Recordset^ myRecordset;
DAO::Fields^ myFields;
String^filePath;
int i;
String^ minut;
String^ hou;
if (basetittlemin<10)
{minut="0"+basetittlemin.ToString();}
else
{minut=basetittlemin.ToString();}
if (basetittlehour<10)
{hou="0"+basetittlehour.ToString();}
else
{hou=basetittlehour.ToString();}
dbEngine = gcnew DBEngine();
filePath = hou+minut+"DataChiller.accdb";
database = dbEngine->OpenDatabase(filePath,false,false,"");
String^ ReadSql = "Select Top 60 * From 系统资料 Order By [Id] DESC";
*myRecordset =database->OpenRecordset(ReadSql,DAO::RecordsetTypeEnum::dbOpenDynaset,(int ^)0,DAO::LockTypeEnum::dbOptimistic);
myRecordset->MoveFirst();
database->Close();
}catch (Exception ^DAOException){MessageBox::Show(DAOException->Message, "Error",MessageBoxButtons::OK,
MessageBoxIcon::Error );
}
}
补充说明(Supplement):