سلام من اطلاعات دیتابیسم به وسیله کد زیر لود میکنم
متاسقانه ارور internal server error میده
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: FALSE
#End Region
Sub Process_Globals
End Sub
Sub Globals
Private name As Label
Private Panel1 As Panel
Private Sms As Label
Private ScrollView1 As ScrollView
Dim PanelHeight As Int
Dim ht As Float
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Scroll")
LoadData
End Sub
Sub LoadData
ProgressDialogShow("درحال دریافت اطلاعات...")
ExecuteRemoteQuery("SELECT Name, Content FROM sms ORDER BY id DESC", "GetData")
End Sub
Sub ExecuteRemoteQuery(Query As String, JobName As String)
Dim job As HttpJob
job.Initialize(JobName, Me)
job.PostString("http://apk702.ir/php/SQLDB.php", Query)
End Sub
Sub JobDone(Job As HttpJob)
ProgressDialogHide
If Job.Success = True Then
Dim strReturn As String = Job.GetString
Dim parser As JSONParser
parser.Initialize(strReturn)
If Job.JobName = "GetData" Then
Dim Members As List
Members = parser.NextArray
For i = 0 To Members.Size - 1
Dim m As Map
m = Members.Get(i)
Dim p1 As Panel
p1.Initialize("")
ScrollView1.Panel.AddView(p1,0,PanelHeight,100%x,0)
p1.LoadLayout("Load")
Panel1.Height=ht+380dip
PanelHeight=PanelHeight+ht+380dip
p1.Height=Panel1.Height+380dip
ScrollView1.Panel.Height=PanelHeight+p1.Height-380dip
Sms.Text = m.Get("Content")
name.Text = m.Get("Name")
Next
Else
ToastMessageShow("Error: Invalid Value", True)
End If
Else
ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
Job.Release
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub share_Click
Dim share As Intent
share.Initialize(share.ACTION_SEND,"")
share.SetType("text/plain")
share.PutExtra("android.intent.extra.TEXT", Sms.Text)
share.WrapAsIntentChooser("اشتراک گذاری این پیامک")
StartActivity(share)
End Sub
'Sub copy_Click
' Dim cp As Clipboard
' cp.setText(Sms.Text)
' ToastMessageShow("کپی شد :)",False)
'End Sub
سوال
parham01 82
سلام من اطلاعات دیتابیسم به وسیله کد زیر لود میکنم
متاسقانه ارور internal server error میده
#Region Activity Attributes #FullScreen: False #IncludeTitle: FALSE #End Region Sub Process_Globals End Sub Sub Globals Private name As Label Private Panel1 As Panel Private Sms As Label Private ScrollView1 As ScrollView Dim PanelHeight As Int Dim ht As Float End Sub Sub Activity_Create(FirstTime As Boolean) Activity.LoadLayout("Scroll") LoadData End Sub Sub LoadData ProgressDialogShow("درحال دریافت اطلاعات...") ExecuteRemoteQuery("SELECT Name, Content FROM sms ORDER BY id DESC", "GetData") End Sub Sub ExecuteRemoteQuery(Query As String, JobName As String) Dim job As HttpJob job.Initialize(JobName, Me) job.PostString("http://apk702.ir/php/SQLDB.php", Query) End Sub Sub JobDone(Job As HttpJob) ProgressDialogHide If Job.Success = True Then Dim strReturn As String = Job.GetString Dim parser As JSONParser parser.Initialize(strReturn) If Job.JobName = "GetData" Then Dim Members As List Members = parser.NextArray For i = 0 To Members.Size - 1 Dim m As Map m = Members.Get(i) Dim p1 As Panel p1.Initialize("") ScrollView1.Panel.AddView(p1,0,PanelHeight,100%x,0) p1.LoadLayout("Load") Panel1.Height=ht+380dip PanelHeight=PanelHeight+ht+380dip p1.Height=Panel1.Height+380dip ScrollView1.Panel.Height=PanelHeight+p1.Height-380dip Sms.Text = m.Get("Content") name.Text = m.Get("Name") Next Else ToastMessageShow("Error: Invalid Value", True) End If Else ToastMessageShow("Error: " & Job.ErrorMessage, True) End If Job.Release End Sub Sub Activity_Resume End Sub Sub Activity_Pause (UserClosed As Boolean) End Sub Sub share_Click Dim share As Intent share.Initialize(share.ACTION_SEND,"") share.SetType("text/plain") share.PutExtra("android.intent.extra.TEXT", Sms.Text) share.WrapAsIntentChooser("اشتراک گذاری این پیامک") StartActivity(share) End Sub 'Sub copy_Click ' Dim cp As Clipboard ' cp.setText(Sms.Text) ' ToastMessageShow("کپی شد :)",False) 'End Sub
لینک ارسال
به اشتراک گذاری در سایت های دیگر
3 پاسخ به این سوال تاکنون داده شده است
ارسالهای توصیه شده
بایگانی شده
این موضوع بایگانی و قفل شده و دیگر امکان ارسال پاسخ نیست.