Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.scripting.vbscript > #11457

Re: SQLite with VBScript UDF?

From Schmidt <ng@vbRichClient.com>
Newsgroups microsoft.public.scripting.vbscript
Subject Re: SQLite with VBScript UDF?
Date 2016-11-29 22:01 +0100
Organization A noiseless patient Spider
Message-ID <o1kq8e$26n$1@dont-email.me> (permalink)
References (16 earlier) <o1c5r2$pm2$1@dont-email.me> <d3e794d4-688e-4305-836d-e7b5130525b6@googlegroups.com> <3409b47b-5095-446e-a7d8-069a8f46744f@googlegroups.com> <o1hpe9$2ab$1@dont-email.me> <88fec54b-eff8-466c-8ec2-7593153cbb80@googlegroups.com>

Show all headers | View raw


Am 29.11.2016 um 14:59 schrieb bart.smissaert@gmail.com:
>> Into the Scripting-Code, you'll still need to pass some Wrapper-Obj,
> similar to the cUDFMethods in my example
>
> This is the bit I am not sure about.
> cUDFMethods in vbRichClient5 is a class with the Read-Only context property, which I presume is the same as SQLite's sqlite3_context*
> Then there are lots of functions and subs that get things out of SQLite and put things into SQLite. Does my object (I presume a class) have to match this?

If you want to read SQLite-Param-Values from inside VBScript (or
set SQLite-UDF-Results from inside that VBScript) you will have to.
VBScript cannot call a "Declared Flat-API" directly (as VBA can) - it
will always have to work through a COM-Wrapper-Object, which (behind
an appropriate Method) performs the Flat-API-Call for you then.

> Trouble is I have no idea how cActiveScript.Run works under the hood.
cActiveScript is roughly compatible to the MS-ScriptControl (though not
dependent on it - it only needs VBScript.dll or JScript.dll, which come
preinstalled on any Windows-System).

The Run-Method takes the Function-Name as the first (String)argument,
and then a list of Variant-Parameters in a ParamArray - so it's a
bit like "CallByName" if you want... (only that it calls into priorily
added ScriptCode-Functions or -Subs).

> So basically what should I code to replace cUDFMethods?

Maybe look at, how you accomplished an 'AddSomething' UDF-Method,
using only the Flat-API in VBA - then try to hide all the Flat-SQLite-
APIs behind a Class (its Methods) to ensure the needed indirection.

That should give you an idea, what belongs into such an UDF-Helper-
Object (to be usable from within a VBScript).

Olaf


Back to microsoft.public.scripting.vbscript | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

SQLite with VBScript UDF? bart.smissaert@gmail.com - 2016-11-21 02:04 -0800
  Re: SQLite with VBScript UDF? JJ <jj4public@vfemail.net> - 2016-11-21 23:17 +0700
    Re: SQLite with VBScript UDF? bart.smissaert@gmail.com - 2016-11-21 09:14 -0800
  Re: SQLite with VBScript UDF? GS <gs@v.invalid> - 2016-11-21 15:21 -0500
    Re: SQLite with VBScript UDF? bart.smissaert@gmail.com - 2016-11-21 13:03 -0800
      Re: SQLite with VBScript UDF? GS <gs@v.invalid> - 2016-11-21 16:11 -0500
        Re: SQLite with VBScript UDF? bart.smissaert@gmail.com - 2016-11-21 13:19 -0800
          Re: SQLite with VBScript UDF? GS <gs@v.invalid> - 2016-11-21 16:31 -0500
            Re: SQLite with VBScript UDF? bart.smissaert@gmail.com - 2016-11-21 13:40 -0800
              Re: SQLite with VBScript UDF? GS <gs@v.invalid> - 2016-11-22 12:30 -0500
                Re: SQLite with VBScript UDF? GS <gs@v.invalid> - 2016-11-22 12:43 -0500
                Re: SQLite with VBScript UDF? bart.smissaert@gmail.com - 2016-11-22 11:02 -0800
                Re: SQLite with VBScript UDF? GS <gs@v.invalid> - 2016-11-22 14:19 -0500
                Re: SQLite with VBScript UDF? "Mayayana" <mayayana@invalid.nospam> - 2016-11-22 15:27 -0500
                Re: SQLite with VBScript UDF? bart.smissaert@gmail.com - 2016-11-22 14:12 -0800
                Re: SQLite with VBScript UDF? "Mayayana" <mayayana@invalid.nospam> - 2016-11-22 17:34 -0500
                Re: SQLite with VBScript UDF? bart.smissaert@gmail.com - 2016-11-22 15:22 -0800
                Re: SQLite with VBScript UDF? "Mayayana" <mayayana@invalid.nospam> - 2016-11-22 20:06 -0500
                Re: SQLite with VBScript UDF? bart.smissaert@gmail.com - 2016-11-22 17:42 -0800
                Re: SQLite with VBScript UDF? Schmidt <ng@vbRichClient.com> - 2016-11-26 15:23 +0100
                Re: SQLite with VBScript UDF? GS <gs@v.invalid> - 2016-11-26 15:21 -0500
                Re: SQLite with VBScript UDF? bart.smissaert@gmail.com - 2016-11-27 08:11 -0800
                Re: SQLite with VBScript UDF? bart.smissaert@gmail.com - 2016-11-27 12:59 -0800
                Re: SQLite with VBScript UDF? bart.smissaert@gmail.com - 2016-11-28 07:39 -0800
                Re: SQLite with VBScript UDF? Schmidt <ng@vbRichClient.com> - 2016-11-28 18:28 +0100
                Re: SQLite with VBScript UDF? bart.smissaert@gmail.com - 2016-11-29 05:59 -0800
                Re: SQLite with VBScript UDF? Schmidt <ng@vbRichClient.com> - 2016-11-29 22:01 +0100
                Re: SQLite with VBScript UDF? bart.smissaert@gmail.com - 2016-11-29 13:35 -0800
                Re: SQLite with VBScript UDF? Schmidt <ng@vbRichClient.com> - 2016-11-30 06:31 +0100
                Re: SQLite with VBScript UDF? bart.smissaert@gmail.com - 2016-11-29 13:01 -0800
                Re: SQLite with VBScript UDF? Schmidt <ng@vbRichClient.com> - 2016-11-30 06:51 +0100
                Re: SQLite with VBScript UDF? bart.smissaert@gmail.com - 2016-11-30 00:17 -0800
                Re: SQLite with VBScript UDF? Schmidt <ng@vbRichClient.com> - 2016-11-30 10:50 +0100
                Re: SQLite with VBScript UDF? bart.smissaert@gmail.com - 2016-11-30 02:45 -0800
                Re: SQLite with VBScript UDF? bart.smissaert@gmail.com - 2016-12-01 02:40 -0800

csiph-web