Italian Il database non viene riconosciuto! Help!

mauri74doc

Member
Licensed User
Longtime User
Ciao a tutti. Ho un grosso problema che non riesco a rosolvere, e quindi mi appello alla disponibilità della comunità. Il mio progettino a cui sto lavorando (ora interrotto per il problema che ora spiegherò) rischia di schianatarsi già sul nascere --> il problema è che Purtroppo l'applicazione non funziona poichè continua a darmi errore relativo al riconoscimento del database, utile allo sviluppo dell'applicazione stessa. Per completezza, Ho fatto come mi è stato consigliato (cioè di caricare il db dai tasti in basso a destra) ma quando lancio il debug, la linea "DBCursor = DBSql.ExecQuery("SELECT * FROM Tabella") si evidenzia di giallo la riga che fa riferimento al db e nell'emulatore mi appare la dicitura "Program paused on line:45 DBCursor = DBSql.ExecQuery("SELECT * FROM Tabella")". Ci sto impazzendo e sopratutto il lavoro è interrotto!!
Qualcuno mi può aiutare !!??
 

ivanomonti

Expert
Licensed User
Longtime User
scusa ma ti da errore e che errore, perchè se non erro devi anche passare la stringa di connessione che non vedo, ma non vorrei dire una cazzata, inoltre perrchè non lo crei da codice il db!

posta il codice magari qualcuno più bravo ti può dare una mano.
 

mauri74doc

Member
Licensed User
Longtime User
Questo è il mio progetto, altro non so. Io lo posto. Se qualcuno ha voglia di provarlo...

'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim id As Int = 0
End Sub

Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.

Dim cmd_entra As Button
Dim lbl_benvenuto As Label
Dim Button2 As Button
Dim Button3 As Button
Dim Button4 As Button
Dim cmd_Back1 As Button
Dim cmd_casa As Button
Dim cmd_igene As Button
Dim cmd_viaggio As Button
Dim Cmd_casaPavimento As Button
Dim cmd_ApriFoto As Button
Dim cmd_ApriVideo As Button
Dim Label1 As Label
Dim Label2 As Label
Dim tipo As Byte = 0
Dim DBSql As SQL
Dim DBCursor As Cursor
Dim ImageView1 As ImageView
Dim Button1 As Button

End Sub

Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Activity.LoadLayout("main")
DBSql.Initialize(File.DirInternal,"pippo.db",True)

eseguiquery
End Sub

Sub eseguiquery

DBCursor = DBSql.ExecQuery("SELECT * FROM Tabella")
DBCursor.Close

End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub cmd_entra_Click
Activity.RemoveAllViews
Activity.LoadLayout("menuprincipale")
End Sub


Sub cmd_casa_Click
Activity.RemoveAllViews
Activity.LoadLayout("casa_menu")
tipo = 1
End Sub
Sub Cmd_casaPavimento_Click
Activity.RemoveAllViews
Activity.LoadLayout("testo")
End Sub

Sub cmd_ApriVideo_Click

End Sub
Sub cmd_ApriFoto_Click

End Sub
Sub ImageView1_Click
If tipo = 1 Then
Activity.RemoveAllViews
Activity.LoadLayout("casa_menu")
Else If tipo = 2 Then
'continuare a inserire gli indirizzamenti alle altre pagine
End If
End Sub
 

giannimaione

Well-Known Member
Licensed User
Longtime User
... ma il DB come viene creato???
e poi , che significato ha
Sub eseguiquery

DBCursor = DBSql.ExecQuery("SELECT * FROM Tabella")
DBCursor.Close
 

mauri74doc

Member
Licensed User
Longtime User
hello. in my application I have a designer with some buttons, the text of which must be filled in at run time. The data is read from a database and stored in a standard array. My problem is that I need to know if you can create, and if so how, a dynamic array for creating buttons at run time of the program. You can also insert images (jpg, png, bmp) as the background of the button in addition to the text?
 
Top