✔ 最佳答案
If you are an Oracle user, I assume you are quite advanced and know how to work with ActiveX Data Object (ADO).
1. Download Oracle Provider for OLE DB of your version from here
http://www.oracle.com/technology/software/tech/windows/odpnet/utilsoft.html
2. Install the downloaded file on the machine running the VB program.
3. The downloaded file will give you the utility to set up the name that points to the Oracle server.
4. In VB project, add ADO 2.x library to Reference
5. Use these lines to open a connection to Oracle
Dim conn As New ADODB.Connection
ConnectString = "Provider=OraOLEDB.Oracle;User ID=database_user_id;Password=user_password;Data Source=server_pointer;"
conn.Open ConnectString
6. Use these codes to update the table
sql = " INSERT INTO Customer ( .... ) "
conn.Execute sql
sql = " UPDATE Customer SET Age=30 WHERE Customer_id='ming' "
conn.Execute sql
7. Finally close the connection
conn.Close
Set conn = Nothing