[Gambas-user] Succesful multiple Insert return a failed Result
T Lee Davidson
t.lee.davidson at gmail.com
Tue Apr 7 16:21:23 CEST 2020
On 4/7/20 8:10 AM, Benoît Minisini wrote:
> Le 07/04/2020 à 11:27, Yeshua Rodas a écrit :
>> Hello people.
>>
>> I'm having an issue working with SQLite.
>>
>> I have a particular function for insert a batch of data and return the number of affected rows:
>>
[snip]>>
>
> Only SELECT queries return a Result object. You don't have access to the number of inserted rows at the moment.
>
If you need the number of rows inserted, one way might be to:
1. Count the number of rows in the table before the operation, then
2. Count the number of rows in the table after the operation, and
3. Return the difference.
--
Lee
More information about the User
mailing list