Home  >  Article  >  Backend Development  >  php odbc 访问 vfp9的表时 提醒 不是一个表

php odbc 访问 vfp9的表时 提醒 不是一个表

WBOY
WBOYOriginal
2016-06-13 12:43:261177browse

php odbc 访问 vfp9的表时 提示 不是一个表
使用 odbc 访问vfP的表 代码如下

<?<br />
header("Content-Type: text/html; charset=gb2312");<br />
$myconn=odbc_connect("vfp1","","");<br />
$strSql="select * from `xxku1`";<br />
<br />
$result=odbc_do($myconn,$strSql);<br />
?><br />
<table ><br />
<?while(odbc_fetch_row($result))//通过循环读取数据内容<br />
{<br />
?><br />
<tr><br />
<td align="center" height="19"><?echo odbc_result($result,1)?></td><br />
<td align="center"><?echo odbc_result($result,2)?></td><br />
<td align="center"><?echo odbc_result($result,3)?></td><br />
<br />
</tr><br />
<?<br />
}<br />
odbc_close($myconn);<br />
?><br />
</table>


用来操作vfp6的表一切正常 但是换了vfp9的表就提示不是一个表. 因为vfp9的表多了一个字段是自动增量型的, 把这个字段去掉也可以访问.
如过要访问有自动增量型字段的表应该如何处理呢,
网上有人说使用 OLE DB  我也下载了 OLDdb vfp, 但不知道怎么用

PHP odbc vfp9
Statement:
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