Sub displayPersonalInfo
Dim cursor1 As Cursor
Dim bytes() As Byte
NewFileFlag = False
Try
cursor1 = SQL1.ExecQuery("SELECT screename, phonenumber, YOB, myPicture FROM PersonalInfo WHERE ID = 1")
If cursor1.RowCount = 0 Then
Msgbox("","No Personal Information found")
NewFileFlag = True
cursor1.Close
Else
cursor1.Position = 0
bytes = cursor1.GetBlob("myPicture")
If bytes.Length > 0 Then
UI.InitializeFromBytesArray(bytes, 0, bytes.Length)
bmp.Initialize2(UI)
End If
PN = cursor1.GetString("phonenumber")
SN = cursor1.GetString("screename")
YB = cursor1.GetString("YOB")
cursor1.Close
End If
Catch
Msgbox("error in reading from PersonalInfo table","")
Log(LastException.Message)
cursor1.Close
End Try
Activity.LoadLayout("PersonalInfo")
ScreenName.Text = SN
PhoneNumber.Text = PN
YOB.Text = YB
UserImage.Bitmap = bmp
End Sub