Visual Basic .Net 引用 Microsoft.Jet.OLEDB.4.0 调试出错

操作系统环境:win 7 64 位

编程环境:Visual Basic .Net 2008 

在上述环境,测试连接Access 2003数据库MDB文件 ,已经正确导入 system.data system.data.oledb,检查语法没问题,但调试运行时,抛出错误:

未在本地计算机上注册 Miscrosft Jet Oledb 4.0提供程序

经参照 CSDN网友 水云之间 记录,找到 原因,链接:https://blog.csdn.net/weixin_43115314/article/details/105547126###

感谢前行者的分享.

My Project -->编译-->高级编译选项---->目标CPU(选择:X86)

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
漂亮的界面,可执行的代码 菜谱管理: Dim cnn As New ADODB.Connection Dim rsImage As New ADODB.Recordset Dim Chunk() As Byte Dim lngLengh As Long Dim intChunks As Integer Dim intFragment As Integer Const ChunkSize = 1000 Const lngDataFile = 1 Dim sql As String Private Sub back_Click() End Sub Private Sub Command1_Click(Index As Integer) Set DataGrid1.DataSource = Nothing sql = "delete * from huncai where cname='" & (Text1(2).Text) & "'" cnn.Execute sql MsgBox ("成功删除信息") Adodc1.Recordset.Update Adodc1.Refresh Set DataGrid1.DataSource = Adodc1 End Sub Private Sub Command2_Click() End End Sub Private Sub Command3_Click() If Text3.Text = "" Or Text4.Text = "" Then MsgBox ("请输入完整信息!") Else sql = "insert into huncai(sort,cname,price) values ('" & (Combo1.Text) & "' ,'" & (Text3.Text) & "' ,'" & Val(Text4.Text) & "')" If Trim(txtFilePath.Text) = "" Then MsgBox "未选择文件.!!", vbInformation + vbSystemModal, "保存出错" Exit Sub End If Open Trim(txtFilePath.Text) For Binary Access Read As lngDataFile lngLengh = LOF(lngDataFile) ' 文件大小 If lngLengh = 0 Then Close lngDataFile: Exit Sub intChunks = lngLengh \ ChunkSize intFragment = lngLengh Mod ChunkSize '新建记录 rsImage.AddNew ReDim Chunk(intFragment) Get lngDataFile, , Chunk() rsImage!picImage.AppendChunk Chunk() ReDim Chunk(ChunkSize) For i = 1 To intChunks Get lngDataFile, , Chunk() rsImage!picImage.AppendChunk Chunk() Next i rsImage.Update Close lngDataFile Call ShowPic cnn.Execute sql Adodc1.Refresh MsgBox ("添加成功!") End If End Sub Private Sub cmdBrowse_Click() On Error Resume Next With cmdlFilePath .Filter = "JPG Files|*.JPG|Bitmaps|*.BMP" .ShowOpen txtFilePath.Text = .FileName End With

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值