Home > Software engineering >  Using VB to connect the oracle database to realize a simple add and delete SQL statements
Using VB to connect the oracle database to realize a simple add and delete SQL statements

Time:09-16

Using VB to connect the oracle database to realize a simple add and delete SQL statements, you can, as long as can achieve simple function is mainly written in VB to connect the oracle to increase data and modify the data, as well as changes to the data,

CodePudding user response:

No VB great spirit and oracle, a great god can help to solve?

CodePudding user response:

This can do it, the key is to connect the oracle database, and other SQL database, Access database is not much difference, is nothing but only execute SQL,
We connect to the database using ADO objects:
Dim cn As New ADODB. Connection
Cn. The ConnectionString="Provider=MSDADQL. 1; Password=Password; Persist Security Info=True; User ID=system; Date Source=database name "is the password you set the database password, database name is you need to connect the database name,
Of course, if you use ADO controls can also
If you are in the system set up the data source is also a kind of good method
I don't have the oracle database system, so there is no debugging, but this code is used to before me, a no problem.

CodePudding user response:

Using VB to realize add and delete functionality statement of how to write?

CodePudding user response:

VB Oracle need to install the Oracle client,
The connection string baidu,

Database operation, it is the update, insert, delete the three SQL syntax,

CodePudding user response:

Private Sub Form_Load ()
Dim CNN As ADODB. Connection
Set the CNN=New ADODB. Connection
CNN. Open "the Provider=OraOLEDB. Oracle. 1; Persist Security Info=False; User ID=system; Password=Mr; Data Source=KFGL "
Dim the rs As the ADODB library you
Set the rs=New ADODB. You
Rs. Open the "select * from SYS. Kf order by kf.????? ", CNN
Set Me. MSHFlexGrid1.
the DataSource=rsEnd Sub
Need to install the vb sp6

CodePudding user response:

Don't forget to install the oracle client
  • Related