You guys are terrific. Thanks for your help!

The reason I went to the macros was because I was looking for a
repository within LOBase for a number of SQL sequences (e.g. UPDATE tbl
SET Col WHERE expr) that a would want to execute from time to time. A
macro seemed to be the only possibility. What else could you suggest?

(It's a rather trivial requirement actually and using a macro could
become a sledgehammer to crack a nut. Collecting my SQL statements into
a text file somewhere in the bowels of my machine to be called up with
cut and paste struck me as a bit primitive and inelegant).



On Tue, 2023-01-24 at 17:07 -0500, Andrew Pitonyak wrote:
> 
> I have a guess since I was not previously aware of this method. 
> 
> There is precedence for LO adding support for Microsoft Office (MSO)
> compatibility. I am guessing that this method was added for MSO
> compatibility with MS Access (but that is just a guess). I would
> assume, therefore, that it should act similarly to how the method
> work in MS Access (again a guess). 
> 
> When I really want to know, I pull the code and then I go looking for
> the method in the code to see what it does. 
> 
> Also, if it immediately registers as an error, then you might need to
> turn on compatibility mode. 
> 
> Well, that is what I thought until I googled a bit
> 
> This implies that the command is based on an extension rather than
> directly supported by LO.
> 
> https://extensions.libreoffice.org/en/extensions/show/access2base
> https://extensions.openoffice.org/en/project/access2base-api-base-users
> https://ask.libreoffice.org/t/syntax-form-controls-base/45282
> 
> but then this seems to imply otherwise
> 
> https://books.libreoffice.org/en/BG72/BG7209-Macros.html
> 
> Sorry, not much help :-(
> 
> 
> On Tuesday, January 24, 2023 15:50 EST, Harvey Nimmo
> <[email protected]> wrote:
>  Thanks. Not sure I can understand how that should work...hmmm
> 
> I based my syntax on the example here
> 
> https://learn.microsoft.com/en-us/office/vba/api/access.docmd.runsql
> 
> 
> 
> On Tue, 2023-01-24 at 20:39 +0000, Dave Howorth wrote:
> > On Tue, 24 Jan 2023 20:32:18 +0100
> > Harvey Nimmo <[email protected]> wrote:
> > 
> > > Where can I find the syntax of the DoCmd.RunSQL command to be
> > > used
> > > with a LOBase Macro in Basic?
> > 
> > I've never heard of the command, but google suggests
> > 
> > https://docs.libreoffice.org/wizards/html/classaccess2base_1_1DoCmd.html#a3c1b223e5e4024f2a8b955b2df3b6f92
> > 
> > I've no idea whether it is correct/relevant.
> > 
> > > My assumption was 
> > > X = "SQL string"
> > > DoCmD.RunSQL X
> 
>  
> 


-- 
To unsubscribe e-mail to: [email protected]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Reply via email to