ODBC和Excel:数据库或对象是只读的。 [英] ODBC and Excel: Database or object is read-only.

查看:575
本文介绍了ODBC和Excel:数据库或对象是只读的。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用ODBC打开Excel文档。我正在使用Ole,直到我遇到了可爱的数据类型"猜测"。问题。我在一栏中有车牌,而且你们大多数人都知道它们可以是所有数字或数字&字母。这些文件带有许多记录,有时可以有100个行,只有数字板,然后有几个带有字母字符,反之亦然。

无论如何,完整的连接字符串是:
Driver = {Microsoft Excel Driver(* .xls)}; DBQ =" C:\ test.xls" ;;

完整的例外是:
ERROR [42000] [Microsoft] [ODBC Excel驱动程序]无法更新。数据库或对象是只读的。
错误[IM006] [Microsoft] [ODBC驱动程序管理器]驱动程序的SQLSetConnectAttr失败
错误[42000] [Microsoft] [ODBC Excel驱动程序]无法更新。数据库或对象是只读的。

我有"完全控制"。该文件和我还添加了'Everyone'到完全控制的安全性只是为了踢。

任何人有任何想法?

解决方案

是的,添加READONLY = FALSE;连接字符串。



Driver = {Microsoft Excel Driver(* .xls)}; DBQ = QUOT; C:\test.xls英寸;只读= FALSE;

I am trying to use ODBC to open an excel document.  I was using Ole until I ran across the lovely datatype "guessing" problem.  I have license plates in a column and as most of you know they can be all numbers or numbers & letters.  These files are coming in with many records and can sometimes have 100's of rows with number-only plates then later on have a few with alpha characters and vica-versa.

Anyway, the full connection string is:
Driver={Microsoft Excel Driver (*.xls)};DBQ="C:\test.xls";

The full exception is:
ERROR [42000] [Microsoft][ODBC Excel Driver] Cannot update.  Database or object is read-only.
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
ERROR [42000] [Microsoft][ODBC Excel Driver] Cannot update.  Database or object is read-only.

I have "full control" of the file and I also added 'Everyone' to the security with full control just for kicks.

Anyone have any ideas?

解决方案

Yes, add READONLY=FALSE; to connection string.

 

 

Driver={Microsoft Excel Driver (*.xls)};DBQ="C:\test.xls";Readonly=False;


这篇关于ODBC和Excel:数据库或对象是只读的。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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