Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ACCESS ADO Á¬±í²éѯ recordset->update ???

»ù±¾µãÈçÌâ
hr = m_pConnection->Open(_bstr_t(m_connectionStr),"","",adEditNone);
////
CString  sqlquery;
sqlquery.Format("select * from scores,students where students.studentid =scores.stdnumber and scores.subjectid=%d",subjectid);
_variant_t sql=sqlquery;
m_pRecordset.CreateInstance("ADODB.Recordset");
m_pRecordset->Open(sql,_variant_t((IDispatch*)m_pConnection,true),adOpenStatic,adLockOptimistic,adCmdText);
return m_pRecordset;
/////
m_pRecordset->AddNew();
m_pRecordset->PutCollect("studentname",vstudentname);
m_pRecordset->PutCollect("studentid",vstudentnumber);
m_pRecordset->PutCollect("scorecontent",vscore);
m_pRecordset->Update();

Ö´Ðе½update¾Í²»ÐÐÁË,ÎÒµÄÄ¿µÄÊÇÖ»½«¼Ç¼·Åµ½¼Ç¼¼¯ÖÐ,ÉÏÃæ´ò¿ªÁ¬½ÓµÄʱºòÓÃadEditNone²»ÖªµÀ¶Ô²»¶Ô,¿´±ðÈË˵ÕâÑù,ÓÃupdate²»»áÖ±½Óµ½Êý¾Ý¿âÁË,ÒªÓõ½updatebatch();
´óϺ°ï°ï,VC++²ËÄñ
ÍüÁ˲¹³ä,µ¥±íµÄ²Ù×÷¶¼¿ÉÒÔ°É

ΪʲôûÈ˰ïÎÒ= =¶¼Ã»ÓÐÓöµ½¹ýÂð

Ò»°ãÎÒ²»»á¶Ô¶à±íÓÃm_pRecordset->Update(); Ö±½ÓÓÃSQLµÄupdateÓï¾ä¡£Èç¹ûÒ»¶¨ÒªÓ㬾ÍÓÃview°É


m_pRecordset->AddNew();
m_pRecordset->PutCollect("studentname",vstudentname);
m_pRecordset->PutCollect("studentid",vstudentnumber);
m_pRecordset->PutCollect("scorecontent",vscore);
m_pRecords


Ïà¹ØÎÊ´ð£º

ÈçºÎ½«accessÀïÃæµÄ¸½¼þ±£´æµ½´ÅÅÌÉÏÄØ

Çë´óÏÀÖ¸µã£¬¹òлÁË£¬×îºÃÓдúÂë
ÒªÓõ½ADOX¶ÔÏ󣬲éϰïÖúÎĵµ£¬
http://hyadliujing.blog.163.com/blog/static/4484507420091020969233/?mode=edit

ûÓÐÕÒµ½°¡ ¿´ÁËÄãµÄ²©¿ÍÁË£¬ÎÒÊÇÏ뽫accessÀïÃæµÄ¸½¼þ±£´æ ......

dwr Illegal access to default constructor´íÎó

dwr.xml:
<create creator="struts" javascript="PrisonerActionForm">
  <param name="formBean" value="prisonerForm"/>
  < ......

VCÖÐ odbc·ÃÎÊaccessÄÚ´æÔö³¤

vcÖÐÓÃodbcµÄ·½·¨·ÃÎÊaccessÊý¾Ý¿â£¬Óõ½ÁËcdatabaseÀàºÍcrecordsetÀà¡£Êý¾ÝÔ´ÔÚ´°¿Ú³õʼ»¯µÄʱºò±»´ò¿ªg_datasource.Open("data",FALSE,FALSE); µã»÷Ò»¸ö°´Å¥Æô¶¯Ò»¸ö¶¨Ê±Æ÷£¬ÔÚ¶¨Ê±Æ÷ÄÚÍê³ÉÒÔϲÙ×÷£¬¶¨ ......

AccessÑ¡ÖÐij¸ö×ֶλòÕß¶à¸öµ¥Ôª¸ñÖ®ºó¿ÉÒÔ×Ô¶¯ÇóºÍ

Çë´ó¼Ò°ï棬ÎÒÏëÔÚAccess´°ÌåÀïÃæÏÔʾ±íºó£¬Ñ¡Ôñ±íÖеÄij¸ö×ֶΣ¬¾Í¿ÉÒÔ¸ù¾ÝÑ¡ÔñµÄÕâЩµ¥Ôª¸ñÇóºÍ¡¢Ç󯽾ù£¬¾ÍÈçExcelÓÒϽÇ״̬À¸ÄÇÑù£¬ºÜ·½±ãµÄͳ¼ÆÇóºÍÇ󯽾ù£¬Ð»Ð»£¡
Äã¿ÉÒÔÓÃÒ»¸ögridview »òÕ߯äËûʲô¿Ø¼þ ¶ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ