G
garyusenet
Hi I'm using the following code which is finally working.
Public Class Form1
Shared ActElement As Object
Shared ActFields As DataSet
Public Sub SetActElement()
Dim objApp As New Object
Try
objApp = CreateObject("actole.database")
objApp.OpenEx("")
If objApp.IsOpen = False Then
MessageBox.Show("Failed to connect to ACT")
Application.Exit()
End If
ActElement = objApp.contact
' get the database path
' MsgBox(objApp.GetDataBasePath)
ActElement.Add()
ActElement.Data(26, "A SuperStar")
ActElement.Update()
Catch ex As Exception
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
SetActElement()
End Sub
End Class
I understand most of what's going on but i've never met Catch, or Try
before - i've had a look at microsofts site and couldn't make head nor
tail of it - can someone explain in beginners term, what these words
are used for. And specifically in the context of my little program what
they are doing?
Thanks
Gary.
Public Class Form1
Shared ActElement As Object
Shared ActFields As DataSet
Public Sub SetActElement()
Dim objApp As New Object
Try
objApp = CreateObject("actole.database")
objApp.OpenEx("")
If objApp.IsOpen = False Then
MessageBox.Show("Failed to connect to ACT")
Application.Exit()
End If
ActElement = objApp.contact
' get the database path
' MsgBox(objApp.GetDataBasePath)
ActElement.Add()
ActElement.Data(26, "A SuperStar")
ActElement.Update()
Catch ex As Exception
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
SetActElement()
End Sub
End Class
I understand most of what's going on but i've never met Catch, or Try
before - i've had a look at microsofts site and couldn't make head nor
tail of it - can someone explain in beginners term, what these words
are used for. And specifically in the context of my little program what
they are doing?
Thanks
Gary.