运行时错误3027无法更新 [英] run-time error 3027 Cannot update

查看:136
本文介绍了运行时错误3027无法更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(访问2000 / ODBC到MySQL表格)





我得到运行时间erro 3027并且它说无法更新:数据库或对象是只读的。有人在下面的代码中看到任何错误吗?感谢您的帮助!


我的代码是

(Access 2000/ODBC to MySQL tables)

Hi,

I am getting the run time erro 3027 and it says that "cannot update: database or object is read only." Does anyone see any errors in my code below? Thanks for the help!

My code is

< span class =codeLinkonclick =Blur(this,this.parentNode.parentNode,getChildren(this),true);>展开 | 选择 | Wrap | 行号

推荐答案


(访问2000 / ODBC到MySQL表格)





我得到运行时间erro 3027并且它说无法更新:数据库或对象是只读的。有人在下面的代码中看到任何错误吗?感谢您的帮助!


我的代码是

(Access 2000/ODBC to MySQL tables)

Hi,

I am getting the run time erro 3027 and it says that "cannot update: database or object is read only." Does anyone see any errors in my code below? Thanks for the help!

My code is

< span class =codeLinkonclick =Blur(this,this.parentNode.parentNode,getChildren(this),true);>展开 | 选择 | Wrap | 行号



嗨。我尝试了一个基于你的代码(没有其他数据库)的查询,它试图连接到后端数据库;我没有设置测试数据库来复制你想要做的事情,但是因为RunSQL做了它应该做的事情,所以看起来VB代码没问题。我不能说你的SQL更新是,因为它取决于其他数据库是否将其识别为响应的有效SQL语句。


随着SQL查询进入阶段它传递给另一个数据库,它向我建议1)myDatabase结束时有问题,或者2)当前设置的权限不允许你更新其他数据库,或3)这种类型的SELECT ... INTO不是您的其他数据库的有效更新查询。我不能评论MySQL(我自己没有使用它),也没有关于你是否使用过这种类型的更新的数据,我只能说Access正在做它应该做的事情。


-Stewart
Hi. I tried out a query based on your code (without the other DB) which tried to connect to the back-end DB; I didn''t have a test DB set up to replicate what you are trying to do, but since the RunSQL did what it was supposed to do it appears that the VB code is OK. I can''t say that your SQL update is, because it depends whether the other DB recognises it as a valid SQL statement to respond to.

As the SQL query got to the stage where it was passed through to the other DB it suggests to me that either 1) there is a problem at the myDatabase end, or 2) the permissions currently set do not allow you to update the other DB, or 3) this type of SELECT ... INTO is not a valid update query for your other DB. I cannot comment on MySQL (not used it myself), and with no data about whether you have used this type of update before all I can say is that Access is doing what it is supposed to do.

-Stewart



Hi Stewart!

非常感谢您尝试我的代码。

我不明白的一件事是......如果文件名不是变量,那么它会渲染一个txt文件。例如,

Hi Stewart!
Thank you so much for your trying out my code.
One thing that I don''t understand is that... if the file name is not a variable, then it renders a txt file OK. For instance,

展开 | 选择 | Wrap | 行号



... if文件名不是变量,然后它呈现txt文件OK。
... if the file name is not a variable, then it renders a txt file OK.



您好,直接找到问题的核心 - 将变量名称放在字符串中! VB 无法以这种方式进行替换。我之前没有看到它,不熟悉MySQL SELECT ... INTO构造 - 但现在你已经提到它了,它变得如此明显。


尝试

Hi, and well done for going straight to the heart of the problem - placing the variable name within the string! VB can''t do the substitution that way. I didn''t see it before, not being familiar with the MySQL SELECT...INTO construct - but it becomes so obvious now you have mentioned it.

Try

展开 | 选择 | Wrap | 行号


这篇关于运行时错误3027无法更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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