简体   繁体   English

使用VB6访问远程数据库

[英]Accessing a Remote Database with VB6

How to access a remote database with Visual Basic 6? 如何使用Visual Basic 6访问远程数据库?

It's been a while since I've done any code in Visual Basic 6, I remember ODBC connections however I'm not sure how I would go about it. 自从我在Visual Basic 6中完成任何代码以来已经有一段时间了,我记得ODBC连接,但是我不确定该如何处理。 All that I need is to have a database on a host computer and then some clients would connect to it, probably without need to guarantee simultaneous access. 我所需要的只是在主机上拥有一个数据库,然后一些客户端可以连接到该数据库,可能不需要保证同时访问。

Edit: I'm trying to access a Microsoft Access database. 编辑:我正在尝试访问Microsoft Access数据库。

您需要使用ADODB,这是一个涵盖您大部分需求的教程

本教程应该可以帮助您入门。

The methods mentioned by @rick_schott and @eric_j are good and legit, but if you want speed, that is not the way to go. @rick_schott和@eric_j提到的方法既好又合法,但是如果要提高速度,那不是路要走。

Instead, you want to use DAO and Jet (the technology released prior to ADODB). 相反,您要使用DAO和Jet(ADODB之前发布的技术)。 Here is a pretty good tutorial: 这是一个很好的教程:

http://www.vb6.us/tutorials/using-dao-data-access-objects-code-tutorial http://www.vb6.us/tutorials/using-dao-data-access-objects-code-tutorial

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM