请各位大大帮我看看这段代码出了什么问题?
程序代码:
Dim PictureDiskFile As String Dim PictureName As String Private Sub Command1_Click() CommonDialog1.Filter = "图片文件(*.JPG;*.BMP;*.GIF)|*.jpg;*.bmp;*.gif" CommonDialog1.ShowOpen PictureDiskFile = CommonDialog1.FileName PictureName = CommonDialog1.FileTitle If PictureDiskFile = "" Then Exit Sub End If FileNumber = FreeFile Open PictureDiskFile For Binary Access Read As FileNumber PictureFileLength = LOF(FileNumber) If PictureFileLength = 0 Then Close FileNumber MsgBox PictureDiskFile & "无内容或不存在!" End If Picture1.Picture = LoadPicture(PictureDiskFile) Close FileNumber End Sub Private Sub Command2_Click() FileCopy PictureDiskFile, App.Path & "\picture" PicturePath = App.Path & "\picture" Dim ADOrs As New Recordset Set ADOrs.ActiveConnection = ADOcn ADOrs.Open "Insert into ImageTable2(ImageName,ImagePath) Values(PictureName,PicturePath)" ADOrs.Update End Sub
是这一行报错ADOrs.Open "Insert into ImageTable2(ImageName,ImagePath) Values(PictureName,PicturePath)"
[此贴子已经被作者于2016-5-16 09:30编辑过]