OLEDB插入未运行 [英] OLEDB insert not running

查看:91
本文介绍了OLEDB插入未运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Dim con As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\billing.accdb;Persist Security Info=True")
        Dim objcmd As OleDbCommand
        con.Open()
        objcmd = New OleDbCommand("INSERT INTO bills VALUES(..,.. ,.....)", con)
        objcmd.ExecuteNonQuery() <------------ Getting Error here that the path is not correct
        con.Close()

推荐答案

我会说错误消息说明了一切.您是否在方法中设置了断点并检查连接字符串是否确实正确?您是否已物理检查数据库确实位于连接字符串中标识的目录中?您需要提供有关所做工作的更多详细信息.
I would say the error message says it all. Have you put a breakpoint in the method and checked whether the connection string is indeed correct ? Have you physically checked that the database is indeed in the directory identified in the connection string ? You need to give more details on what you have done.


这篇关于OLEDB插入未运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆