I wish to find out how can I insert a record into Microsoft Access using SQL query string? I've got a record of 3 columns in myTable namely: Name, Address and TelNumber. Name and Address in String and TelNumber in Integer. I'm using Microsoft DAO Object to access the database. I'm able to use the SELECT query string to extract the data but I don't know how to insert data into the database.
This is what I've tried:
rs = db.OpenRecordset("INSERT INTO myTable VALUES(Name,Address,TelNumber)")
and of course it's not working :) I mean I believe there's something wrong with the parameters passed into the VALUES. Any help offered is very much appreciated!
I'm working on Microsoft Windows XP Pro, using Microsoft Access 2002 and Visual Basic 6.