Home > Computer Tutorials > Computer Knowledge > Please tell me about the problem of connecting the VB library management system to the database

Please tell me about the problem of connecting the VB library management system to the database

王林
Release: 2024-01-24 08:18:06
forward
666 people have browsed it

Please tell me about the problem of connecting the VB library management system to the database

VB book management system connection database problem please ask

"Project"--"Add module", the new module generated is the public module of this project.

The so-called subroutine is under this project. Whether it is a SUB or Function belonging to a form or a module, it is a subroutine.

Whether it is a variable or a procedure declared with Public in a public module, it can be referenced in the entire project.

conn.Open connectionstring The purpose of this statement is to open an ADODB connection named book.mdb. By using this connection, you can operate on the database in controls or code. Therefore, this code is usually placed before operating on the database. If you are using a control, place it at the beginning of the Form_load event or control-related events. If you use code, just put it before the code.

The above is my understanding, but I am also a newbie, so there may be something wrong.

A big database job is to build an online bookstore information system VB SQL

When is this assignment due?

Private Sub Command1_Click()

Dim n As Integer

Dim sum As Double

sum = 0

n = InputBox ("Please enter the value of n")

For i = 1 To n

sum = sum jiecheng(i)

Next i

Print sum

End Sub

Public Function jiecheng(ByVal n As Integer) As Double

Dim jc As Double

jc = 1

For i = 1 To n

jc = jc * i

Next

jiecheng = jc

End Function

The above is the detailed content of Please tell me about the problem of connecting the VB library management system to the database. For more information, please follow other related articles on the PHP Chinese website!

source:docexcel.net
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template