Still getting a crash here if I use the UDF more than once in the same
statement:

So, table with 2 integer columns and then doing:

select XXX(field1), XXX(field2) from table1

causes a crash.

I can see that the statement prepares fine and that the UDF gets called
twice (for the first row), but with no error, so
sqlite3_errmsg(lDBHandle) gives not an error, but than my application
crashes.
I get the following information about this if it is of any help:

Problem signature:
  Problem Event Name: APPCRASH
  Application Name: EXCEL.EXE
  Application Version: 12.0.6732.5000
  Application Timestamp: 55f969a5
  Fault Module Name: sqlite3.dll
  Fault Module Version: 3.9.1.0
  Fault Module Timestamp: 562138c8
  Exception Code: c0000005
  Exception Offset: 0005a28b
  OS Version: 6.1.7601.2.1.0.256.48
  Locale ID: 2057
Additional information about the problem:
  LCID: 1033
  Brand: Office12Crash
  skulcid: 1033

Using the UDF once in a statement is fine:

select XXX(field1) from table1

One thing I noticed is that every time the UDF is called (that is
only twice, so once for field1 then again for field2) it is with a
different statement handle.
Is this to be expected?


RBS


On Mon, Oct 19, 2015 at 1:21 AM, Bart Smissaert <bart.smissaert at gmail.com>
wrote:

> Actually, I can see now that the result of
> sqlite3_extended_errcode(lDBHandle) is in fact the same as the result of
> sqlite3_step as
> I get for the 3 rows 100, 100, 100, 101 so SQLITE_ROW 3 times then
> SQLITE_DONE.
>
> Note sure though why this is and why I get unknown error as a result of
> sqlite3_errmsg(lDBHandle). Should that not be: Not an error?
>
> In any case it does all work now.
>
> RBS
>
>
>
> On Mon, Oct 19, 2015 at 1:05 AM, Bart Smissaert <bart.smissaert at gmail.com>
> wrote:
>
>> Some progress with this.
>> Still get an error: unknown error, Extended error code: 100, but it all
>> runs and get the right results and no crash.
>> Problem was I did put the result of sqlite3_step in a VB Long datatype:
>>
>> Dim lStepResult As Long
>>
>> lStepResult = sqlite3_step(lStatementHandle)
>>
>> Now I do instead:
>>
>> Dim lStepResult 'VB variant datatype
>>
>>
>> RBS
>>
>>
>>
>>
>>
>>
>> On Sun, Oct 18, 2015 at 10:16 PM, Bart Smissaert <
>> bart.smissaert at gmail.com> wrote:
>>
>>> > Is that binary ?  Or hex ?
>>>
>>> Normal decimal, it is the result of sqlite3_extended_errcode(lDBHandle)
>>>
>>> > Just to verify, can you download the SQLite shell tool and try to
>>> execute the same sequence ?
>>>
>>> Not sure that is that simple as the code to produce the result is in an
>>> ActiveX dll, not in sqlite3.dll.
>>>
>>> RBS
>>>
>>> On Sun, Oct 18, 2015 at 9:43 PM, Simon Slavin <slavins at bigfraud.org>
>>> wrote:
>>>
>>>>
>>>> On 18 Oct 2015, at 8:35pm, Bart Smissaert <bart.smissaert at gmail.com>
>>>> wrote:
>>>>
>>>> > I get an error: unknown error, Extended error code: 100.
>>>>
>>>> Is that binary ?  Or hex ?
>>>>
>>>> > I do understand that most likely the problem is somewhere in my VB6
>>>> code,
>>>> > but I can't see it and maybe somebody can shed some light on this
>>>> from the
>>>> > SQLite side.
>>>>
>>>> Just to verify, can you download the SQLite shell tool and try to
>>>> execute the same sequence ?
>>>>
>>>> Simon.
>>>> _______________________________________________
>>>> sqlite-users mailing list
>>>> sqlite-users at mailinglists.sqlite.org
>>>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>>>>
>>>
>>>
>>
>

Reply via email to