SQLitening Support Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the SQLitening support forums!

Author Topic: Upsert  (Read 297 times)

Fredrick Ughimi

  • Master Geek
  • ****
  • Posts: 601
    • View Profile
    • Software Development Company
Upsert
« on: June 10, 2018, 12:15:35 PM »

Fredrick Ughimi:
Hello,

I was just playing around with SQLite UPSERT and I got the same error from my codes and as well as those here:

http://www.sqlitening.planetsquires.com/index.php?topic=9709.0

1 = near ON: syntax error
Logged
Fredrick O. Ughimi

fughimi@yahoo.com
- Freedom lies in being bold -- Robert Frost, Poet

Fredrick Ughimi

  • Master Geek
  • ****
  • Posts: 601
    • View Profile
    • Software Development Company
Re: Upsert
« Reply #1 on: June 11, 2018, 12:32:05 AM »

I guess I am the only one having this error? I use SQLite 3.7.13.
Logged
Fredrick O. Ughimi

fughimi@yahoo.com
- Freedom lies in being bold -- Robert Frost, Poet

cj

  • Master Geek
  • ****
  • Posts: 696
    • View Profile
Upsert requires updating SQLite3.DLL to version 3.24.0
« Reply #2 on: June 11, 2018, 10:31:21 AM »

SQLite3.DLL (32.bit binary) needs to be updated to version 3.24.0 using 3240000.zip
https://sqlite.org/download.html

Your version 3.7.13 is from 06/11/2012.  It is exactly 6-years old today!
https://sqlite.org/chronology.html

Show SQLite version:
#INCLUDE "sqlitening.inc"
FUNCTION PBMAIN () AS LONG
  slOpen "sample.db3","C" 'must have an open database
  ? GetSqliteVersion,,"Sqlite version"   '3.24.0 as of 06/04/2018
END FUNCTION
'
FUNCTION GetSQliteVersion AS STRING
  IF slsel("select sqlite_version()",0,"E0") = 0 THEN
   slGetRow
   FUNCTION = slf(1)
   slCloseSet
  END IF
END FUNCTION

« Last Edit: June 11, 2018, 11:42:17 AM by cj »
Logged
CJ

Fredrick Ughimi

  • Master Geek
  • ****
  • Posts: 601
    • View Profile
    • Software Development Company
Re: Upsert
« Reply #3 on: June 11, 2018, 11:26:19 AM »

Hello CJ,


Wow! I thought going by digits my version was even higher. :)

Thanks.

Code: [Select]
slSEL "SELECT sqlite_version(*) as Version"
       If IsTrue slGetRow Then
           sVersion = slFN("Version")
       End If
       slCloseSet   
       ? "Database Version: " & sVersion
Logged
Fredrick O. Ughimi

fughimi@yahoo.com
- Freedom lies in being bold -- Robert Frost, Poet

cj

  • Master Geek
  • ****
  • Posts: 696
    • View Profile
Re: Upsert
« Reply #4 on: June 11, 2018, 11:43:16 AM »

I did too, until I realized 3.7.13 is 3.07.13 and a lesser version than 3.24.0.

Your version 3.7.13 is from 06/11/2012.  It is exactly 6-years old today!
Version history: https://sqlite.org/chronology.html
« Last Edit: June 11, 2018, 07:37:53 PM by cj »
Logged
CJ