D
Dmox
I'm having issues with an OnLoad event. I'm trying to update a SQL Database
when the form loads with the following code:
Public Sub FormEvents_Loading(ByVal sender As Object, ByVal e As
LoadingEventArgs)
' Write your code here.
Dim conn As New SqlConnection()
conn.ConnectionString = "Data Source=SQL2005;Initial
Catalog=Database1;Persist Security Info=True;User ID=DBDude;Password=MyPass"
Dim SqlConnection As String = "INSERT INTO Ticket (Ref) VALUES
('Test')"
conn.Close()
End Sub
It debugs and loads fine, however it's not updating the database at all.
when the form loads with the following code:
Public Sub FormEvents_Loading(ByVal sender As Object, ByVal e As
LoadingEventArgs)
' Write your code here.
Dim conn As New SqlConnection()
conn.ConnectionString = "Data Source=SQL2005;Initial
Catalog=Database1;Persist Security Info=True;User ID=DBDude;Password=MyPass"
Dim SqlConnection As String = "INSERT INTO Ticket (Ref) VALUES
('Test')"
conn.Close()
End Sub
It debugs and loads fine, however it's not updating the database at all.