Dim RsObj As Object = Starter.mysql.ExecQueryAsync("Mysql","select *,date_format(tgl_lahir,'%d/%m/%Y') as tgllahir from t_dpt where no_nik = '" & EditText1.text & "'",Null)
Wait for (RsObj) Mysql_QueryComplete (Success1 As Boolean, Rs As JdbcResultSet)
If Success1 Then
Try
Do While Rs.NextRow
Label1.Text = "NIK : " & Rs.GetString("no_nik")
Label2.Text = "Nama : " & Rs.GetString("nama")
Label3.Text = "Tempat, Tgl. Lahir : " & Rs.GetString("kota_lahir") & ", " & Rs.GetString("tgllahir")
'Label4.Text = "Alamat Lengkap : "
Label5.Text = Rs.GetString("alamat") & ", RT. " & Rs.GetString("no_rt") & " / RW. " & Rs.GetString("no_rw") & ", Kel. " & Rs.GetString("kelurahan") & ", Kec. " & Rs.GetString("kecamatan") & ", Kab. " & Rs.GetString("kota") & ", " & Rs.GetString("propinsi")
Label6.Text = "No. TPS : " & Rs.Getstring("no_tps")
'Label7.Text = "Tim Sukses : " & Rs.GetString("nm_ts")
Spinner1.SelectedIndex = Spinner1.IndexOf(Rs.GetString("nm_ts"))
Check1.Checked = IIf(Rs.GetString("cek")="1",True,False)
EditText2.Text = Rs.GetString("keterangan")
EditText3.Text = Rs.GetString("aktif_partai")
'-- Load The ID Image
Buffer = Rs.GetBlob("foto_file")
InputStream1.InitializeFromBytesArray(Buffer,0,Buffer.Length)
Foto.Initialize2(InputStream1) '----- ERROR HAPPEN IN THIS LINE'
'ImageView1.SetBackgroundImage(Foto)
ImageView1.Bitmap=Foto
'B4XImageView1.Bitmap=Foto
'-----
Loop
EditText2.RequestFocus
Catch
Success1 = False
'Log(LastException)
End Try
Else
Success1 = False
Log(LastException)
End If