不能修改表 'content' 的设计。它在只读数据库中解决办法

WBOY
Release: 2016-06-13 12:31:59
Original
1662 people have browsed it

不能修改表 'content' 的设计。它在只读数据库中
$db=$_SERVER['DOCUMENT_ROOT']."\myfirst.mdb";
$connstr="Driver={Microsoft Access Driver (*.mdb)};Dbq=$db";
$connid=odbc_connect($connstr,"","",SQL_CUR_USE_ODBC) or die("数据库打开失败!请联系管理员"); 
echo 123;
$sql="create table content(id counter constraint primarykey primary key,[标题] varchar(50) null,[省市] varchar(30) null,[内容] varchar(255),[已采] bit,[已发] bit)"; 
echo $sql;
odbc_exec($connid,$sql);
执行结果:
Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC Microsoft Access Driver] 不能修改表 'content' 的设计。它在只读数据库中。, SQL state 42000 in SQLExecDirect in G:\zhengli\access.php on line 9
怎么解决错误,顺利创建access表

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template