Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Update a Access table with only the use of a conne...
Author:
Jacques
E-mail:
Click to e-mail author
Website:
http://www.cpptech.com
Submitted:
5/24/2002
Version:
VB6
Compatibility:
VB6
Category:
Databases
Views:
12642
Update a Access table with only the use of a connection object.
Declarations:
'Include the Data objects reference 'Declare connection object Dim objCon As Object 'Delcare temporary string for SQL query Dim strSQL As String
Code:
Public Sub updateDB() Set objCon = New adodb.Connection objCon.ConnectionString _ = "Microsoft.Jet.OLEDB.4.0;Data Source='myDB.mdb'" objCon.Open strSQL = "Insert Into tblNames(FirstName, LastName)" strSQL = strSQL & " Values('John', 'Doe');" objCon.Execute(strSQL) objCon.Close Set objCon = Nothing End Sub
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement