13186.html
来自「以电子书的形式收集了VB一些常见问题解决方法,可以很方便的查找自己需要解决的问题」· HTML 代码 · 共 23 行
HTML
23 行
<html>
<head>
<title>Re: 请问一下,如何用VB连结*.dbf的资料?</title>
</head>
<body bgcolor="#FFFFFF" vlink="#808080">
<center>
<h1>Re: 请问一下,如何用VB连结*.dbf的资料?</h1>
</center>
<hr size=7 width=75%>
<hr size=7 width=75%><p>
Posted by 澳门人 on May 21, 1999 at 00:56:13:<p>
In Reply to: <a href="13172.html">Re: 请问一下,如何用VB连结*.dbf的资料?</a> posted by Jan on May 20, 1999 at 15:34:52:<p>
: : : 如题...试着连结用VFP(6.0)建立出来的.DBF档,但不论是透过ODBC或DATA元件,都无法连结到资料..(会出现"找不到 XBase备忘档案,数目3166"的错误讯息)...<br>: : : (NT Server (sp4)平台,VB6.0企业版)...请各位帮帮忙....<p>: : <br>: : 这样试试吧:<p>: : if the dbf file path is "c:\dbf\abc.dbf"<p>: : dim db as database<br>: : dim rs as recordset<br>: : dim sCmd as string<p>: : set db=opendatabase("c:\dbf\abc.dbf",false,false,"foxpro 2.5;")<br>: : scmd="select * from abc order by field_name"<br>: : set rs=db.openrecordset(scmd,dbopendynaset)<p>: : with rs<br>: : code here<br>: : end with<p>: 谢谢您的回答,可是若是Client/Server 架构,且需用到多张table时,此法似乎...<p><br>我没有用 dbf database 写过 client/server program, 或许帮不了你, 但若果你想同时开多个table的话,那是否需要每次都connect to database 一次??! 其实事情并不是这样,<br>cos' set db=opendatabase("c:\dbf\abc.dbf",...) 和<br>set db=opendatabase("c:\dbf\",...) is the same,<br>so you only want to connect to the path one time when your program startup,<br>你可以写一个module include functions,<br>you can call thoses functions in your design time,<br>if you want to know more, just post your response,<br>cos' i don't know whether you are interest with my opinions.
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 13186-->
</ul><!--end: 13186-->
<br><hr size=7 width=75%><p>
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?