sql

  1. R

    Android Code Snippet Taking SquareRoot in SQL

    SQLite doesn't have SQTR as a standard function, so you would normally do this in code. There is a way though to do this in SQL with a CTE: strSQL = "update Table1 set xValue = (" & _ "with Guesses(FindRootOf, " & _ "guessRoot) as (" & _ "select xValue, " & _ "case when xValue...
  2. MARCO C.

    Italian 2 jobdone() in esecuzione ??

    Buongiorno, avete presente questo post https://www.b4x.com/android/forum/threads/mysql-su-aruba.62942/ tutto ok , con il file connessione.php inserito nel server e il seguente codice che lo richiama fraseSql = "SELECT id, idcall, item, qt, prz FROM `app_servicerow`...
  3. Jorge M A

    B4J Question [SOLVED] SQLite Built-in Window Functions?

    Why is it not possible to run a query against SQLite that contains functions like row_number() or rank() ? e.g. Dim RS As ResultSet=Sql1.ExecQuery($"SELECT ROW_NUMBER () OVER ( ORDER BY cid ) RowNum, ostatus, cid, itemcount FROM orders;"$) Error in Log: DBeavear and DB Browser for SQLite...
  4. P

    B4J Question mysql resultset to xml

    So I'm most likely just being a bit thick today but i can't get my head around how to get this to work; The aim being to have an xml builder populated from a database. 'Handler class Sub Class_Globals Private mreq As ServletRequest 'ignore Private mresp As ServletResponse 'ignore '...
  5. behnam_tr

    B4J Question how combine two sql query

    hi i want to combine two sql query Dim RS As ResultSet=Sql1.ExecQuery2("SELECT * FROM tbl WHERE userid = ? ", Array As Int(uid)) Dim RS As ResultSet=Sql1.ExecQuery2("SELECT * FROM tbl OFFSET LIMIT ?,?",Array As String(0,10)) how do i this ??
  6. S

    Android Question How to make SQL object reusable

    I am using SQLITE with B4A. I am using the database in multiple activities. I have created a service to contain my database object. StartAtBoot is set to True. sqlManager #Region Service Attributes #StartAtBoot: True #End Region Sub Process_Globals 'These global variables will be...
  7. ALBRECHT

    Android Question Sqlite Database options

    Hello, I like to get a suggest of method, regarding best practices for my App : 1/ i have an SQLITE db that contain general setting strings and language strings for its operation, and independent of user data. I systematicaly copy that DB from asset dir to Internal, so even after app updating...
  8. Duque

    Android Question Migration SQLCiper V1.50 to V1.60

    Colleagues, I'm pretty worried, I should do this migration from SQLCiper V1.50 to V1.60, as we all know from the 64BIT binary. The problem is generated because the database created in V1.50 will not be compatible with V1.60, so as I do to pass that data to the new database when updating the app...
  9. trejocode

    Android Question FOR (Loop) and Call a WebService | OkHttpUtils2

    Hello, I have a problem is that I do not understand at all how to "Block" an HTTP request because I use Wait For (Resumable). Look at the case: I select my items from my local database, and then I send the data to an API but they are not sent properly because, as it is a "non-blocking" event...
  10. MitchBu

    Android Question SQL change one field on one row

    I am working on the SQL tutorial at https://www.b4x.com/android/forum/threads/sql-tutorial.6736/#content I seem to have pretty much understood the example project. Now I am modifying it to get to what I need. I have this grid showing data, a bit like a spreadsheet, and the user may modify one...
  11. sfsameer

    Android Question Sql, timer and notifications

    Hello everyone, My app is an ordering app, so the buyer contacts the seller and once the seller send the buyer a message and he is not online the app should send a notification. The problem : The notifications Not always are being sent and the services some times it works and sometimes it just...
  12. Magma

    B4J Tutorial [B4J] A solution for SQL Brute force Protection

    Hi there, I want to share a tactic / a small guard for MySQL/MariaDB DataBases.. Well all we know that having a Database online and not in localhost is difficult to protect from brute force attacks / ransomware attacks... Well i ll give a little "pebble" to help others to think / different -...
  13. iRobotD

    Spanish Mostrar mensajes de un .db al hacer click en listview B4A

    Buenas, soy nuevo en este mundillo y tengo un problema con mi código. Expongo la situación: Estoy trabajando en una aplicación de listados de fallos. A través de una base de datos .db muestro en un list view los fallos. Mi problema es que cuando hago clic encima de un item del list view quiero...
  14. 3

    Italian connessione a db sqlserver su server aziendale

    Buonasera, vorrei col mio telefonino creare un app che mi permetta di farel' update di dati che ho su un database aziendale. Di solito su VB.net usavo laconnessione OLEDB o SQLclient esiste qualcosa di simile? Quindi una volta aperta la connessione fare le query, le update ecc in sql. Ho...
  15. N

    Android Question SQL error writing blob

    I have a long running app that I have updated over the years as things have changed but this error causes my sql_lite database to die and become corrupt. Basically failing when it updates a blob field in a SQL database file under Android 8.1 (Oreo) on Samsung tablets. Its not random and happens...
  16. K

    Android Question error while inserting record

    I'm trying to download and insert record in sql I'm inserting 250 records at a time with ExecNonQuery. sometimes while inserting records show this log Error occurred on line: 656 (all) android.database.sqlite.SQLiteDatabaseCorruptException: database disk image is malformed (code 11...
  17. rafaelcamara

    Android Question Select sum() and total() rounding

    Hello friends I'm in trouble I'd like someone to help me. I'm running a sql query with select sum () and select total () in the sqlite database and the result is rounding to a smaller one. code: conect.db.BeginTransaction rs = conect.db.ExecQuery("Select total(Valor) as TotalTitulos, " & _...
  18. J

    Android Code Snippet Concept for VERY fast temporary IO

    SubName: N/A its simply a concept/idea that would appear very easy to implement, with possibly great benefits for performance. But totally untested, only created it and put a file in it, and it acted just like normal storage. Description: Historically, I have seen my IO access on storage around...
  19. K

    Android Question TransactionTooLargeException

    https://www.b4x.com/android/forum/threads/error-with-customlistview.97829/ As per discussion in this forum I got that TransactionTooLargeException error is in sql query I change query and add limit in that, its working fine now. But I have to add all records in clv, What should I do?
  20. PatrikCavina

    Other SQL History tables

    Hi to all, I'm building database structure in SQL, i want hold history of change in record in tables that have many to many relationship. Tables are A, B and AB_Map where AB_Map table is the link table between A and B. Considering table B immutable (records inside table B never change so table B...
Top