0

Hi everybody, i just registered here.
Hoping to learn some from everything i find here and also hoping a bit to be helped out.

I am creating a small program which has a few texboxes which i want to saved in a access database.
My problem is i have no clue what code belongs to such button.

I have added the database to my datasources, and linked the fields from the database to the textboxes.
But thats all i got so far,.
Being searching around the net for a few days to figure this out, but no luck.

So i am kinda hoping to find some help here for this.

in my access db i got the fields firstname, surename, address1, address2, postcode, phone, email.
Each are linked to their matching textbox on the form.
Surname.text - surname
Firstname.text - firstname
etc....

1
Contributor
2
Replies
3
Views
6 Years
Discussion Span
Last Post by Sevyt
0

I was trying this, but its giving me a error saying "Unrecognized database format..."

Dim formConn As OleDb.OleDbConnection = New OleDb.OleDbConnection
        Try
            formConn.ConnectionString =
            "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\Administrator\Documents\Visual Studio 2010\Projects\Prijsmaken - DB\prices.accdb;"
            formConn.Open()
            Dim formCommand As New OleDb.OleDbCommand("Insert into CustomerInformation (FirstName) Values ('" & Me.TxtSurname.Text &
            "')",
            formConn)
            formCommand.ExecuteNonQuery()
        Catch ex As Exception
            MsgBox("Error: " & ex.Message)
        Finally
            If formConn.State <> ConnectionState.Closed Then
                formConn.Close()
            End If
        End Try
0

Ah i figured it out, its Microsoft.ACE.OLEDB.12.0 now.

however when i use that code it says "Error: could not find output table 'Surname'

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.