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("a ctole.database" )
objApp.OpenEx(" ")
If objApp.IsOpen = False Then
MessageBox.Show ("Failed to connect to ACT")
Application.Exi t()
End If
ActElement = objApp.contact
' get the database path
' MsgBox(objApp.G etDataBasePath)
ActElement.Add( )
ActElement.Data (26, "A SuperStar")
ActElement.Upda te()
Catch ex As Exception
End Try
End Sub
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) 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.