当前位置:网站首页>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
边栏推荐
猜你喜欢

网银被盗?这篇文章告诉你如何安全使用网银

Ubantu专题4:xshell、xftp连接接虚拟机以及设置xshell复制粘贴快捷键

分成两栏后文字顺序混乱的问题解决【写期刊论文时】

微信聊天记录中搜索红包

11 pinia use

border控件的使用

思路迪医药冲刺港股:5个月亏2.9亿 泰格医药与先声药业是股东

AVH Deployment Practice (1) | Deploying the Flying Paddle Model on Arm Virtual Hardware

Excel quickly aligns the middle name of the table (two-word name and three-word name alignment)

使用 GraphiQL 可视化 GraphQL 架构
随机推荐
使用 PyTorch 检测眼部疾病
Groupid(artifact id)
更新数据表update
Kubernetes常用命令
border控件的使用
Getting Started with TextBlock Control Basic Tools Usage, Get Started
Advanced Mathematics - Commonly Used Indefinite Integral Formulas
Gorm—Go语言数据库框架
svn安装及使用(身体功能手册)
R语言计算时间序列数据的移动平均值(滚动平均值、例如5日均线、10日均线等):使用zoo包中的rollmean函数计算k个周期移动平均值
OpenCV测量物体的尺寸技能 get~
Ubantu专题4:xshell、xftp连接接虚拟机以及设置xshell复制粘贴快捷键
Trigonometric identity transformation formula
[MySQL] Mysql paradigm and the role of foreign keys
The meaning of node_exporter performance monitoring information collection in Prometheus
华医网冲刺港股:5个月亏2976万 红杉与姚文彬是股东
Nuget package and upload tutorial
微信聊天记录中搜索红包
Efficient use of RecyclerView Section 1
ASP.NET Core 产生连续 Guid