当前位置:网站首页>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
边栏推荐
- abaqus find contact pairs报错:surface name is already in use
- PDF 拆分/合并
- 谷歌CTS测试(cta测试)
- 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
- 763.划分字母区间——之打开新世界
- Linux check redis version (check mongodb version)
- hough变换检测直线原理(opencv霍夫直线检测)
- 修改SQL语言实现Mysql 多表关联查询优化
- 基于最小二乘法和SVM从天气预报中预测太阳能发电量(Matlab代码实现)
- R语言ggplot2可视化:使用ggpubr包的ggboxplot函数可视化箱图、使用font函数自定义图例标题文本(legend.title)字体的大小、颜色、样式(粗体、斜体)
猜你喜欢
随机推荐
工程力学复习资料
TRACE32——C源码关联
NC | 中国农大草业学院杨高文组揭示发现多因子干扰会降低土壤微生物多样性的积极效应...
The normal form of the database (first normal form, second normal form, third normal form, BCNF normal form) "recommended collection"
AVH Deployment Practice (1) | Deploying the Flying Paddle Model on Arm Virtual Hardware
实现防抖与节流函数
Public Key Retrieval is not allowed error solution when DBeaver connects to MySQL 8.x
Female service community product design
做事软件开发-法的重要性所在以及合理结论的认识
网银被盗?这篇文章告诉你如何安全使用网银
Synchronized和volatile 面试简单汇总
易驱线主控芯片对比(电动三轮电机90O瓦世纪通达)
「秋招系列」MySQL面试核心25问(附答案)
leetcode303场周赛复盘
button控件的使用
谷歌CTS测试(cta测试)
基于极限学习机(ELM)进行多变量用电量预测(Matlab代码实现)
org.apache.jasperException(could not initialize class org)
力扣:738.单调递增的数字
DBeaver连接MySQL 8.x时Public Key Retrieval is not allowed 错误解决