I am working on a form which uses an Access (oledb) database, I have a button to update, and other to insert a new client, when I insert a new client it successfully adds it to the database, but I have to open and close the form to update it, is there a way to make it that when I add the client, or press a button it refreshes the database without closing the form? I am using comboboxes to select clients, thats why I ask.
Thanks in advance!
Andrees92 0 Newbie Poster
Recommended Answers
Jump to Posthi there?
yes there is a way to refresh the database without closing and opening it again. what you do is very simple just use the code thats loading the database but this time write it in the new client form and use the CALL method. after the message that …
Jump to PostCan't you use an INSERT or UPDATE query back to the database?
Jump to PostDim con = New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Resumen Guia\Base.mdb") Dim dataadapter1 As New System.Data.OleDb.OleDbDataAdapter() dataadapter1 = New System.Data.OleDb.OleDbDataAdapter("select * from Tabla ", con) Dim DtSet As System.Data.DataSet DtSet = New System.Data.DataSet dataadapter1.Fill(DtSet) ComboBox1.DataSource = Nothing ComboBox1.DataSource = DtSet.Tables(0) con.Close()
All 12 Replies
kinyuadave 0 Newbie Poster
Andrees92 0 Newbie Poster
GeekPlease 16 Junior Poster
midnite11 0 Newbie Poster
Andrees92 0 Newbie Poster
jared.geli 9 Junior Poster
Andrees92 0 Newbie Poster
oussama_1 39 Posting Whiz in Training
Andrees92 0 Newbie Poster
oussama_1 39 Posting Whiz in Training
khair.ullah -2 Junior Poster in Training
Andrees92 0 Newbie Poster
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.