两ç§åæ³ï¼ä¸ç§æ¯ ç¨SQLï¼å¦ä¸ç§æ¯ADO
1ãç¨SQLæ·»å æ°æ®ï¼
insert into 表åï¼å段1ï¼å段2ï¼å段3ï¼
valuesï¼å¼01ï¼å¼02ï¼å¼03ï¼
ä¾å¦ï¼
docmd.runsql"insert into EmpTable(Name,age,Duty,Salary) values('çæ',35,'å¤è´¸æ»ç',12500)"
2ãç¨ADOçåæ³ï¼
ADOæ¯è¾å¤æï¼ç»ä½ ä¸ä¸ªå®æ´çä¾åå§ï¼
Dim strSqlfitjc As String
strSqlfitjc = "select * from *表"
Set RSfitjc = New ADODB.Recordset âå®ä¹ä¸ä¸ªADOè¿æ¥ï¼è¿è¿æ°æ®åº
RSfitjc.Open strSqlfitjc, cn, adOpenKeyset, adLockOptimistic âæå¼è¿æ¥
RSfitjc.addnew 'æ·»å ä¸ä¸ªçºªå½
RSfitjc.Fields("é
件ç¼å·") = âstyleâ âç»æ¯ä¸ªå段èµå¼
.Update âå¨åèµå¼çæ°çºªå½
.Close å
³éè¿æ¥
End With
温馨提示:内容为网友见解,仅供参考