T toro1950 Active Member Licensed User Aug 18, 2024 #1 Buona Domanica, trovo problemi per il risultato di una Query con B4I, su Androide grazie ad alcuni di voi utilizzo questo semplice codice. B4X: Dim ResultSet1 As ResultSet Query = "SELECT * FROM mytabel WHERE xxxx = ?" ResultSet1 = SQL1.ExecQuery2(Query, Array As String (editxxx.text)) If ResultSet1.RowCount> 0 Then Do While ResultSet1.NextRow B4I non implementa ResultSet
Buona Domanica, trovo problemi per il risultato di una Query con B4I, su Androide grazie ad alcuni di voi utilizzo questo semplice codice. B4X: Dim ResultSet1 As ResultSet Query = "SELECT * FROM mytabel WHERE xxxx = ?" ResultSet1 = SQL1.ExecQuery2(Query, Array As String (editxxx.text)) If ResultSet1.RowCount> 0 Then Do While ResultSet1.NextRow B4I non implementa ResultSet
LucaMs Expert Licensed User Longtime User Aug 18, 2024 #2 Ho cercato e pare che ResultSet esista anche in B4I; dovrai selezionare la libreria giusta (che non so quale sia, dato che non ho B4I). P.S. Probabilmente si chiama iSQL.
Ho cercato e pare che ResultSet esista anche in B4I; dovrai selezionare la libreria giusta (che non so quale sia, dato che non ho B4I). P.S. Probabilmente si chiama iSQL.
T toro1950 Active Member Licensed User Aug 18, 2024 #3 La libreria in effetti si chiama iSQl ed è quulla che ho spuntata nelle librerie, però se io inserisco Public SQL1 As iSQL nella Class_Globals ho SQL1 rosso e iSQL sconusciuto, manca un riferimento ad una libreria, Però nella inzializzazione e creazione del database non mi da errore B4X: SQLDataBasePath = xui.DefaultFolder If File.Exists(SQLDataBasePath, nomedbpaz) = False Then SQL1.Initialize(SQLDataBasePath, nomedbpaz, True) CreateDataBasepaz Else SQL1.Initialize(SQLDataBasePath, nomedbpaz, True) Msgbox("ok","") End If e tramite il messaggio mi risulta creato, se in modo corretto non so, perche la query non funziona
La libreria in effetti si chiama iSQl ed è quulla che ho spuntata nelle librerie, però se io inserisco Public SQL1 As iSQL nella Class_Globals ho SQL1 rosso e iSQL sconusciuto, manca un riferimento ad una libreria, Però nella inzializzazione e creazione del database non mi da errore B4X: SQLDataBasePath = xui.DefaultFolder If File.Exists(SQLDataBasePath, nomedbpaz) = False Then SQL1.Initialize(SQLDataBasePath, nomedbpaz, True) CreateDataBasepaz Else SQL1.Initialize(SQLDataBasePath, nomedbpaz, True) Msgbox("ok","") End If e tramite il messaggio mi risulta creato, se in modo corretto non so, perche la query non funziona
klaus Expert Licensed User Longtime User Aug 18, 2024 #4 The declaration should be: B4X: Public SQL1 As SQL ResultSet.RowCount does not exist in B4i. You should remove this line. B4X: If ResultSet1.RowCount> 0 Then
The declaration should be: B4X: Public SQL1 As SQL ResultSet.RowCount does not exist in B4i. You should remove this line. B4X: If ResultSet1.RowCount> 0 Then
LucaMs Expert Licensed User Longtime User Aug 18, 2024 #5 toro1950 said: La libreria in effetti si chiama iSQl ed è quulla che ho spuntata nelle librerie, però se io inserisco Public SQL1 As iSQL nella Class_Globals ho SQL1 rosso e iSQL sconusciuto Click to expand... Strano; prova a premere CTRL+P (da menu: "Clean Project"). Inizialmente, scrivi le istruzioni più "rischiose" all'interno di blocchi Try-Catch.
toro1950 said: La libreria in effetti si chiama iSQl ed è quulla che ho spuntata nelle librerie, però se io inserisco Public SQL1 As iSQL nella Class_Globals ho SQL1 rosso e iSQL sconusciuto Click to expand... Strano; prova a premere CTRL+P (da menu: "Clean Project"). Inizialmente, scrivi le istruzioni più "rischiose" all'interno di blocchi Try-Catch.
T toro1950 Active Member Licensed User Aug 18, 2024 #6 klaus said: ResultSet.RowCount does not exist in B4i. You should remove this line. Click to expand... Thanks klaus, that's how it works ? e grazie anche al mio omonimo LucaMs sempre pronto a dare una mano
klaus said: ResultSet.RowCount does not exist in B4i. You should remove this line. Click to expand... Thanks klaus, that's how it works ? e grazie anche al mio omonimo LucaMs sempre pronto a dare una mano