Hi,
This is probably a really silyy question, but I just can't figure out why this isn't working! Maybe casting a fresh pair of eyes across it might help?!
What I'm trying to do is take the data, entered into a form, for there and pass it into a table in my Access 2000 database.
I thought that I had the coding correct, but it appears not (as it's not inserting ANY of the data).
Coding goes as follows
I've also tried the INSERT VALUES(data1, data2) INTO [tablename](column1, column2) but I didn't get that working either!?!
Any help is greatly appreciated
Thanks
Jane
This is probably a really silyy question, but I just can't figure out why this isn't working! Maybe casting a fresh pair of eyes across it might help?!
What I'm trying to do is take the data, entered into a form, for there and pass it into a table in my Access 2000 database.
I thought that I had the coding correct, but it appears not (as it's not inserting ANY of the data).
Coding goes as follows
Code:
'Create the connection string to the database
Dim conString As String = ("Provider=Microsoft.Jet.OLEDB.4.0; data source=" & server.mappath("LLDB.mdb"))
'Set connection to the connection string
Dim oleConnection As New OleDBConnection(conString)
'open connection
oleConnection.Open()
'set OleDbCommand
Dim oleCommand = New OleDbCommand("INSERT [Area], [Client], [Division], [Reporter], [Country], [Well], [Task], [Event], [Lesson] INTO Testing VALUES ('" & dataArea & "', '" & dataClient & "', '" & dataDivision & "', '" & dataReporter & "', '" & dataCountry & "', '" & dataWell & "', '" & dataTask & "', '" & dataEvent & "', '" & dataLesson & "')")
oleCommand.Connection = oleConnection
'close connection to database
oleConnection.Close()
I've also tried the INSERT VALUES(data1, data2) INTO [tablename](column1, column2) but I didn't get that working either!?!
Any help is greatly appreciated
Thanks
Jane