رفقا یه مشکل اعصابمو داغون کرده لطفا راهنمایی کنید
این تصویر خطا
در هنگام فراخوانی اطلاعات از دیتابیس با این ارور مواجه میشم
کدهای مربوطه
private Sub Class_Globals
Dim sql1 As SQL
' Dim val As Int
Dim cur As Cursor
End Sub
''''''''''''''''''''''''''''''''''''''''''''
Private Sub IsInitialized
End Sub
'''''''''''''''''''''''''''''''''''''''''''
Public Sub Initialize
End Sub
Public Sub Init
' If File.Exists(File.DirInternal,"nurs.db") = False Then
File.Copy(File.DirAssets,"nurs2.db",File.DirInternal,"nurs.db")
' End If
' If sql1.IsInitialized = False Then
sql1.Initialize(File.DirInternal,"nurs.db",False)
' End If
End Sub
Public Sub SetAll(listV As ListView)
cur = sql1.ExecQuery("SELECT * FROM tbl_nurs")
For i = 0 To cur.RowCount - 1
cur.Position = i
listV.AddTwoLinesAndBitmap(cur.GetString("title"),"",LoadBitmap(File.DirAssets,cur.GetString("pic")))
Next
cur.Close
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''شروع اطفال
Public Sub SetAatfal(listV As ListView)
cur = sql1.ExecQuery("SELECT * FROM tbl_atfal")
For i = 0 To cur.RowCount - 1
cur.Position = i
listV.AddTwoLinesAndBitmap(cur.GetString("title"),"",LoadBitmap(File.DirAssets,cur.GetString("pic")))
Next
cur.Close
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''شروع قلب
Public Sub SetGalb(listV As ListView)
cur = sql1.ExecQuery("SELECT * FROM tbl_galb")
For i = 0 To cur.RowCount - 1
cur.Position = i
listV.AddTwoLinesAndBitmap(cur.GetString("title"),"",LoadBitmap(File.DirAssets,cur.GetString("pic")))
Next
cur.Close
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''شروع محتوای بخش اطفال
Public Sub GetTitle(ID As Int) As String
Dim str As String
cur = sql1.ExecQuery("SELECT title FROM tbl_atfal WHERE id="&ID)
cur.Position = 0
str = cur.GetString("title")
cur.Close
Return str
End Sub
Public Sub GetContext(ID As Int) As String
Dim str As String
cur = sql1.ExecQuery("SELECT context FROM tbl_atfal WHERE id="&ID)
cur.Position = 0
str = cur.GetString("context")
cur.Close
Return str
End Sub
Public Sub GetFav(ID As Int) As Boolean
Dim i As Int
cur = sql1.ExecQuery("SELECT fav FROM tbl_atfal WHERE id="&ID)
cur.Position = 0
i = cur.GetInt("fav")
cur.Close
If i = 0 Then
Return False
Else
Return True
End If
End Sub
Public Sub SetFav(ID As Int , FAV As Boolean)
sql1.ExecNonQuery2("UPDATE tbl_atfal SET fav = ? WHERE id = ?",Array As Object(FAV,ID))
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''پایان محتوای بخش اطفال
#Region Activity Attributes
#FullScreen: false
#IncludeTitle: True
#End Region
Sub Process_Globals
End Sub
Sub Globals
Private ScrollView1 As ScrollView
Private title As Label
Private fav As ImageView
Dim lbl As Label
Dim db As database
Dim ts As TextSetting
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("context")
db.Initialize
title.Text = db.GetTitle(atfal.val)
lbl.Initialize("")
lbl.Gravity = Gravity.RIGHT
lbl.TextColor = Colors.Black
lbl.Typeface = Typeface.LoadFromAssets("B Yekan.TTF")
ScrollView1.Panel.AddView(lbl,0,0,100%x,100%y)
lbl.Text = db.GetContext(atfal.val)
ts.Initialize
ts.LongText(lbl,lbl.Text,18,ScrollView1,1.5)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub fav_Click
End Sub
Sub share_Click
End Sub
سوال
reza1360 2
سلام به هم
رفقا یه مشکل اعصابمو داغون کرده لطفا راهنمایی کنید
این تصویر خطا
در هنگام فراخوانی اطلاعات از دیتابیس با این ارور مواجه میشم
کدهای مربوطه
private Sub Class_Globals Dim sql1 As SQL ' Dim val As Int Dim cur As Cursor End Sub '''''''''''''''''''''''''''''''''''''''''''' Private Sub IsInitialized End Sub ''''''''''''''''''''''''''''''''''''''''''' Public Sub Initialize End Sub Public Sub Init ' If File.Exists(File.DirInternal,"nurs.db") = False Then File.Copy(File.DirAssets,"nurs2.db",File.DirInternal,"nurs.db") ' End If ' If sql1.IsInitialized = False Then sql1.Initialize(File.DirInternal,"nurs.db",False) ' End If End Sub Public Sub SetAll(listV As ListView) cur = sql1.ExecQuery("SELECT * FROM tbl_nurs") For i = 0 To cur.RowCount - 1 cur.Position = i listV.AddTwoLinesAndBitmap(cur.GetString("title"),"",LoadBitmap(File.DirAssets,cur.GetString("pic"))) Next cur.Close End Sub ''''''''''''''''''''''''''''''''''''''''''''''''''شروع اطفال Public Sub SetAatfal(listV As ListView) cur = sql1.ExecQuery("SELECT * FROM tbl_atfal") For i = 0 To cur.RowCount - 1 cur.Position = i listV.AddTwoLinesAndBitmap(cur.GetString("title"),"",LoadBitmap(File.DirAssets,cur.GetString("pic"))) Next cur.Close End Sub '''''''''''''''''''''''''''''''''''''''''''''''''شروع قلب Public Sub SetGalb(listV As ListView) cur = sql1.ExecQuery("SELECT * FROM tbl_galb") For i = 0 To cur.RowCount - 1 cur.Position = i listV.AddTwoLinesAndBitmap(cur.GetString("title"),"",LoadBitmap(File.DirAssets,cur.GetString("pic"))) Next cur.Close End Sub '''''''''''''''''''''''''''''''''''''''''''''''''''''''''شروع محتوای بخش اطفال Public Sub GetTitle(ID As Int) As String Dim str As String cur = sql1.ExecQuery("SELECT title FROM tbl_atfal WHERE id="&ID) cur.Position = 0 str = cur.GetString("title") cur.Close Return str End Sub Public Sub GetContext(ID As Int) As String Dim str As String cur = sql1.ExecQuery("SELECT context FROM tbl_atfal WHERE id="&ID) cur.Position = 0 str = cur.GetString("context") cur.Close Return str End Sub Public Sub GetFav(ID As Int) As Boolean Dim i As Int cur = sql1.ExecQuery("SELECT fav FROM tbl_atfal WHERE id="&ID) cur.Position = 0 i = cur.GetInt("fav") cur.Close If i = 0 Then Return False Else Return True End If End Sub Public Sub SetFav(ID As Int , FAV As Boolean) sql1.ExecNonQuery2("UPDATE tbl_atfal SET fav = ? WHERE id = ?",Array As Object(FAV,ID)) End Sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''پایان محتوای بخش اطفال
#Region Activity Attributes #FullScreen: false #IncludeTitle: True #End Region Sub Process_Globals End Sub Sub Globals Private ScrollView1 As ScrollView Private title As Label Private fav As ImageView Dim lbl As Label Dim db As database Dim ts As TextSetting End Sub Sub Activity_Create(FirstTime As Boolean) Activity.LoadLayout("context") db.Initialize title.Text = db.GetTitle(atfal.val) lbl.Initialize("") lbl.Gravity = Gravity.RIGHT lbl.TextColor = Colors.Black lbl.Typeface = Typeface.LoadFromAssets("B Yekan.TTF") ScrollView1.Panel.AddView(lbl,0,0,100%x,100%y) lbl.Text = db.GetContext(atfal.val) ts.Initialize ts.LongText(lbl,lbl.Text,18,ScrollView1,1.5) End Sub Sub Activity_Resume End Sub Sub Activity_Pause (UserClosed As Boolean) End Sub Sub fav_Click End Sub Sub share_Click End Sub
لینک ارسال
به اشتراک گذاری در سایت های دیگر
15 پاسخ به این سوال تاکنون داده شده است
ارسالهای توصیه شده
بایگانی شده
این موضوع بایگانی و قفل شده و دیگر امکان ارسال پاسخ نیست.