当前位置:网站首页>Vb how to connect mysql_vb how to connect to the database collection "advice"
Vb how to connect mysql_vb how to connect to the database collection "advice"
2022-07-31 15:16:00 【Full stack programmer webmaster】
Hello everyone, meet again, I'm your friend Quanstack Jun.
How to connect vbDatabaseLibrary[edit]
Overview
When we operate the database, on the one hand, we must enable users to access the required data on the program interface; on the other hand, we can perform various operations on the data in the database, and the final operation results must be fed back to the user.
One, Data control
1. Set the properties of the data control
2. Connect the Data control to a specific database and one of its tables
3. Create a standard project in VB
4. Add a control to the form (Data1 is a Data control)
5. Change some properties of the control
6. Set the Data control (to set the Databasename property in the Data control, when this property is set, a pair will pop up
In the dialog box, you can select the path of the database. There may be many tables in a database. We also need to specify a table, which can be passed through the Data control
Recordsource property to set)
7. Run the program
Second, ADO controls
ADO is an interface to the OLE database.It was introduced in VB6, it is a new data access technology from Microsoft, it is not easy to store in any format
Provide access to any data.ADO supports access to relational and non-relational databases, as well as other data sources.
1. Settings for connecting to the database
2. Specify a custom connection string to connect to the data source
3. Define a connection string to the data source
Three, connection method
(1) Using text files
1. Read the file
2. Formatting data
3. Close the file
4. Use data
5. If the amount of data is large and needs to be filtered, and the source file storing the data may change from time to time, then we can use a temporary file to store useful data
This can greatly improve the efficiency of the program
(2) The use of the database
1. Open the database
2. Find data
3. Use data
4. Close the database
(3) Reference a class that contains access to the database
1. Adopt ADODB
2. Compared with DAO and the API that can access the database, it is more flexible and powerful than DAO
3. Compared with API, it is easier to use and more suitable for beginners
4. Access is selected
(4) Database programming
1. Quote ADO
2. Create an object in the program
3. Open the database
4. Compare the password entered by the user to see if the login is allowed
5. Query records
6. Locate/filter information
7. Add/modify records
References:
Extended reading:
Related terms:
Database
Co-editors:
Share to:
More
The contents of the Internet Marketing Dictionary are provided by netizens for reference only.If you find any problem with the content of the entry, please send an email to info # wm23.com.
Publisher: Full-stack programmer, please indicate the source: https://javaforall.cn/128255.htmlOriginal link: https://javaforall.cn
边栏推荐
- Matlab矩阵基本操作(定义,运算)
- 工程水文学名词解释总结
- R language ggplot2 visualization: use the ggmapplot function of the ggpubr package to visualize the MA plot (MA-plot), the font.legend parameter and the font.main parameter to set the title and legend
- 7. Summary of common interview questions
- Selenium自动化中无头浏览器的应用
- org.apache.jasperException(could not initialize class org)
- leetcode303 Weekly Match Replay
- 力扣:56. 合并区间
- R语言ggplot2可视化:使用ggpubr包的ggboxplot函数可视化分组箱图、使用ggpar函数改变图形化参数(caption、添加、修改可视化图像的题注、脚注内容)
- charles进行弱网测试(app弱网测试怎么做)
猜你喜欢
随机推荐
Word table to Excel
11 pinia use
Linux查看redis版本(查看mongodb版本)
修改SQL语言实现Mysql 多表关联查询优化
自适应控制——仿真实验三 用超稳定性理论设计模型参考自适应系统
Codeforces Round #796 (Div. 2)(A-D)
浏览器自带的拾色器
Jmeter常用的十大组件
Kubernetes原理剖析与实战应用手册,太全了
what exactly is json (c# json)
R语言ggplot2可视化:使用ggpubr包的ggboxplot函数可视化箱图、使用font函数自定义图例标题文本(legend.title)字体的大小、颜色、样式(粗体、斜体)
hough变换检测直线原理(opencv霍夫直线检测)
TCP详解
Excel快速对齐表格的中姓名(两个字姓名和三个字姓名对齐)
安装Xshell并使用其进行Ymodem协议的串口传输
Matlab矩阵基本操作(定义,运算)
R language test whether the sample conforms to normality (test whether the sample comes from a normally distributed population): shapiro.test function tests whether the sample conforms to the normal d
PDF 拆分/合并
01 邂逅typescript,环境搭建
01 Encounter typescript, build environment









