I am trying to edit information contained within an access database using vb6 on a client server book lending program. I am fairly new to vb so please excuse incorrect terminology etc. I have included the server code for adding a book as the edit code will have to follow this format.


Public Function addBook(ByVal title As String, ByVal author As String, ByVal price As String) As Boolean
Dim db As New ADODB.Connection
Dim rec As New ADODB.Recordset
db.ConnectionString = "Data Source=EveningClass;"
db.Open
query = "INSERT into Book(BookTitle,Author,Price) values ('" & title & "','" & author & "','" & price & "');"
rec.Open query, db
addBook = True
End Function

I have looked at the tutorials but they did not offer the solution I was looking for.

I would really appreciate any help offered.

Thanks in advance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.