数据库问题,请教高手
出现图片的问题是怎么回事啊? 插入的代码如下: void Cskjdate::sql_insert() { ADOConn m_ADOConn; m_ADOConn.OnInitADOConn();
_bstr_t vSQL; vSQL="INSERT INTO skjdate(SkjId,Time,HardwareNum,SoftwareNum,MachineState) VALUES(''SkjId'',''Time'',''HardwareNum'',''SoftwareNum'',''MachineState'')"; m_ADOConn.ExecuteSQL(vSQL); m_ADOConn.ExitConnect(); }
还有就是数据库连接问题! void ADOConn::OnInitADOConn() { ::CoInitialize(NULL); m_pConnection.CreateInstance(_uuidof(Connection)); try { m_pConnection->Open("Provider=MSDASQL.1;Persist Security Info=False;Data Source=skjdate","","",adModeUnknown); 如果我用m_pConnection->Open("("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=skjdate.mdb","","",adModeUnknown);); } catch(_com_error e) { AfxMessageBox("数据库连接失败,请确认yhsj路径"); } }