dreamdelerium
Active member
- Joined
- Mar 7, 2008
- Messages
- 36
- Programming Experience
- 1-3
hi everyone. im not sure if i should post this here or what but heres my question: i have a main form with a combo-box that is connected to a binding source (a microsoft access table). in a dialog, i let the user add/delete items in the table. how do i refresh the binding source on my original form to reflect the changes.
oh, and i insert data into my table by using the following sub:
the data gets entered, and will show when i restart the app. but only after i restart it
oh, and i insert data into my table by using the following sub:
VB.NET:
Public Sub InsertMe(ByVal MyQuerrys As String)
On Error GoTo errorhandler
' Dim FileName As String = CurDir() & "\SMSer.mdb"
Dim conn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\JasonWucinski.mdb;Persist Security Info=True;Jet OLEDB:Database Password=")
Dim Cmd As OleDbCommand
Dim objCmd As New OleDbCommand
Cmd = New OleDbCommand(MyQuerrys, conn)
conn.Open()
objCmd = New OleDbCommand(MyQuerrys, conn)
objCmd.ExecuteNonQuery()
conn.Close()
'JasonWucinskiBots5
If Not (Cmd Is Nothing) Then Cmd.Dispose()
Cmd = Nothing
If Not (objCmd Is Nothing) Then objCmd.Dispose()
objCmd = Nothing
errorhandler:
If Err.Number = 0 Then
ElseIf Err.Number = 5 Then
MsgBox("You have an item with that name already. Type a unique identifier")
Else
MsgBox(Err.Number)
End If
End Sub
the data gets entered, and will show when i restart the app. but only after i restart it
Last edited: