Home Database Mysql Tutorial vb.net操作数据库之ACCESS(1)

vb.net操作数据库之ACCESS(1)

Jun 07, 2016 pm 03:37 PM
access operate database

一直想写下 数据库 操作 方面的,只是没什么时间(好像是借口,应该是懒或者没心情吧,呵呵)。最近发现CSDN上 还是每天有人要问这些内容,我有的时候就懒的回答,呵呵,主要不断的去找代码给他们累

  一直想写下数据库操作方面的,只是没什么时间(好像是借口,应该是懒或者没心情吧,呵呵)。最近发现CSDN上

还是每天有人要问这些内容,我有的时候就懒的回答,呵呵,主要不断的去找代码给他们累啊。所以还是听高人的,来

个一劳永逸,自己重新温习下,也好给其他人一些帮助。

 

    这个数据库操作我会写个系列性的吧, 先写ACCESS。不知道这个一篇能写多长,不行我要分级篇了。

    其实ACCESS的操作基本都其他数据库一个样,只是长的不一样,大家有种畏惧还是陌生?其实是纸老虎啦。

 

    好了,先说连接方面:

 

  上面的代码就是一个公用函数,因为多处要用到,懒得每次都写,直接调用下就OK了。中间部分就是一个数据库连接字串,

Data Source=" & Application.StartupPath & "./FlashCard.mdb"这里就是设置你的数据库地址,具体代码不用我解释了吧?

 

    如果有密码就需要再加一个账号密码了.

 

     User ID=myUsername;Password=myPassword

 

这个资料太多了,也基本差不多,随便抓抓就来咯。

 

那下面是不是要说说如何操作了?对,操作数据库嘛,无非就是查询,增加,删除,修改这几种。代码方面基本也差不多了,只是SQL上要换名字。废话不说了,直接上代码好了。


不知道大家有没有看清楚, 这里就是一个ACCESS操作的基本内容了。我想你这些明白了,数据库操作也该明白一大半了。

这里我要考下看官了,你有没有注意到查询和新增、插入等有什么区别没?注意看哦,栏位的名称在查询中没有加括号,而

在其他的地方有,为什么呢?我也不知道,哈哈!但是一定要加哦,不加ACCESS就不认识,不能成功。记得!!

 

还有的一些问题,比如存储图片啊,声音啊之类的文件,如何读取然后显示或者播放啊,这又一个技术问题了,呵呵,卖弄下。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

MySQL: An Introduction to the World's Most Popular Database MySQL: An Introduction to the World's Most Popular Database Apr 12, 2025 am 12:18 AM

MySQL is an open source relational database management system, mainly used to store and retrieve data quickly and reliably. Its working principle includes client requests, query resolution, execution of queries and return results. Examples of usage include creating tables, inserting and querying data, and advanced features such as JOIN operations. Common errors involve SQL syntax, data types, and permissions, and optimization suggestions include the use of indexes, optimized queries, and partitioning of tables.

Why Use MySQL? Benefits and Advantages Why Use MySQL? Benefits and Advantages Apr 12, 2025 am 12:17 AM

MySQL is chosen for its performance, reliability, ease of use, and community support. 1.MySQL provides efficient data storage and retrieval functions, supporting multiple data types and advanced query operations. 2. Adopt client-server architecture and multiple storage engines to support transaction and query optimization. 3. Easy to use, supports a variety of operating systems and programming languages. 4. Have strong community support and provide rich resources and solutions.

How to configure zend for apache How to configure zend for apache Apr 13, 2025 pm 12:57 PM

How to configure Zend in Apache? The steps to configure Zend Framework in an Apache Web Server are as follows: Install Zend Framework and extract it into the Web Server directory. Create a .htaccess file. Create the Zend application directory and add the index.php file. Configure the Zend application (application.ini). Restart the Apache Web server.

How to use Debian Apache logs to improve website performance How to use Debian Apache logs to improve website performance Apr 12, 2025 pm 11:36 PM

This article will explain how to improve website performance by analyzing Apache logs under the Debian system. 1. Log Analysis Basics Apache log records the detailed information of all HTTP requests, including IP address, timestamp, request URL, HTTP method and response code. In Debian systems, these logs are usually located in the /var/log/apache2/access.log and /var/log/apache2/error.log directories. Understanding the log structure is the first step in effective analysis. 2. Log analysis tool You can use a variety of tools to analyze Apache logs: Command line tools: grep, awk, sed and other command line tools.

What is apache server? What is apache server for? What is apache server? What is apache server for? Apr 13, 2025 am 11:57 AM

Apache server is a powerful web server software that acts as a bridge between browsers and website servers. 1. It handles HTTP requests and returns web page content based on requests; 2. Modular design allows extended functions, such as support for SSL encryption and dynamic web pages; 3. Configuration files (such as virtual host configurations) need to be carefully set to avoid security vulnerabilities, and optimize performance parameters, such as thread count and timeout time, in order to build high-performance and secure web applications.

How to monitor Nginx SSL performance on Debian How to monitor Nginx SSL performance on Debian Apr 12, 2025 pm 10:18 PM

This article describes how to effectively monitor the SSL performance of Nginx servers on Debian systems. We will use NginxExporter to export Nginx status data to Prometheus and then visually display it through Grafana. Step 1: Configuring Nginx First, we need to enable the stub_status module in the Nginx configuration file to obtain the status information of Nginx. Add the following snippet in your Nginx configuration file (usually located in /etc/nginx/nginx.conf or its include file): location/nginx_status{stub_status

How to configure Debian Apache log format How to configure Debian Apache log format Apr 12, 2025 pm 11:30 PM

This article describes how to customize Apache's log format on Debian systems. The following steps will guide you through the configuration process: Step 1: Access the Apache configuration file The main Apache configuration file of the Debian system is usually located in /etc/apache2/apache2.conf or /etc/apache2/httpd.conf. Open the configuration file with root permissions using the following command: sudonano/etc/apache2/apache2.conf or sudonano/etc/apache2/httpd.conf Step 2: Define custom log formats to find or

Nginx performance monitoring and troubleshooting tools Nginx performance monitoring and troubleshooting tools Apr 13, 2025 pm 10:00 PM

Nginx performance monitoring and troubleshooting are mainly carried out through the following steps: 1. Use nginx-V to view version information, and enable the stub_status module to monitor the number of active connections, requests and cache hit rate; 2. Use top command to monitor system resource occupation, iostat and vmstat monitor disk I/O and memory usage respectively; 3. Use tcpdump to capture packets to analyze network traffic and troubleshoot network connection problems; 4. Properly configure the number of worker processes to avoid insufficient concurrent processing capabilities or excessive process context switching overhead; 5. Correctly configure Nginx cache to avoid improper cache size settings; 6. By analyzing Nginx logs, such as using awk and grep commands or ELK

See all articles