so do i not need an oledb connection object on the form anymore?
im getting an error message now that says it cant find:
c:\WINDOWS\system32\alumniDatabase.mdb
Thats not where the database is, but i dont know where to change it ( i dont see it anywhere in the code).
heres my code. i dont think there are any errors:
--------------------------
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
Dim command As New OleDbCommand()
Dim myConnection As New OleDbConnection()
myConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=alumniData" & _
"base.mdb;Mode=Share Deny None;Extended Properties="""";Jet OLEDB:System database=""" & _
""";Jet OLEDB:Registry Path="""";Jet OLEDB
atabase Password="""";Jet OLEDB:Engine Typ" & _
"e=5;Jet OLEDB
atabase Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OL" & _
"EDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Crea" & _
"te System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB
ont Copy L" & _
"ocale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:" & _
"SFP=False"
With command
.CommandText = "Insert into Graduates (City) values (" & txtCity.Text & ")"
.Connection = myConnection
End With
myConnection.Open()
command.ExecuteNonQuery()
myConnection.Close()
End Sub