It is currently Thu Dec 03, 2020 4:36 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: SQlite: Count affected rows
PostPosted: Wed Nov 06, 2019 2:43 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Apr 30, 2003 8:15 am
Posts: 1054
Location: Germany
If you need to know whether an DatabaseUpdate() has caused a change, you can query this as follows:

Code:
Procedure.i Sqlite3_CountChanges (DBID)
  Protected SQL.S = "SELECT changes()", Result.l = -1
 
  If DatabaseQuery(DBID, SQL)
    If NextDatabaseRow(DBID)
      Result = GetDatabaseLong(DBID, 0)
    EndIf
    FinishDatabaseQuery(DBID)
  Else
    Debug DatabaseError()
  EndIf
 
  ProcedureReturn Result
EndProcedure

_________________
"Daddy, I'll run faster, then it is not so far..."


Top
 Profile  
Reply with quote  
 Post subject: Re: SQlite: Count affected rows
PostPosted: Wed Nov 06, 2019 3:43 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Mar 02, 2004 1:20 pm
Posts: 1154
Location: Amphibios 9
Nice! :D

Thanks & Greetings ... Peter

_________________
Hygge


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye