Hi Andrew,
database of Harvey is MariaDB. So it has been quoted a littel bit different:
SELECT `Name` FROM `Table`
This kind of qouting could be used in Basic macros without any problems:
stSql = "SELECT `Name` FROM `Table`"
If there are double qoutes like in internal HSQLDB it looks a
I think in my AndrewBase.odt document that I previously referenced, that I
wrote a routine to put quotes around things so that they would appear inside
the strings but I would have to go back and double check. But yes, I think you
need to do that.
Get BlueMail for Android
On Jan 26, 2023,
Hi Harvey,
would be better to post such a SQL-code you execute through Tools → SQL.
This code should be the same as safed in the database for executing
later through the form.
I will send you an example with internal HSQLDB per private mail.
Regards
Robert
--
Homepage:
Hi Robert,
the thought occurs to me that the existing quotes within the SQL
statements may need their own treatment. The statements that work under
the LOBase Tools>SQL... function have different type of single
quotemarks for the column names (e.g. containing two separate words) or
the text to be
Hi Harvey,
how would this work for me, where I only want to create a SQL statement
as a string and execute it.
Mcro works with SQL-code, which has been saved in a field of a table.
Field in the table is called "SQL-Code". Table is datasource of a form.
A button in this form will start the
Hi Robert,
how would this work for me, where I only want to create a SQL statement
as a string and execute it. Can it be that the string is not recognised
as SQL? (In my MSAccess days it worked). Here the run-time error
indicates that the "Object variable is not set" although it is valid
SQL text
Hi Harvey,
why do you want to use Access2Base?
Here a code from German Base Handbuch:
SUB ChangeData(oEvent AS OBJECT)
DIM oConnection AS OBJECT
DIM oForm AS OBJECT
DIM stSql AS STRING
DIM oSql_Statement AS OBJECT
DIM inValue AS INTEGER
oForm = oEvent.Source.Model.Parent
oConnection =
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
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
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 +, Dave Howorth wrote:
> On Tue, 24 Jan 2023 20:32:18 +0100
> Harvey Nimmo wrote:
>
> >
On Tue, 24 Jan 2023 20:32:18 +0100
Harvey Nimmo 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
The only reference, I found to DoCmd in the LO Base Guide 7.3 is on
page 504 (Special commands), i.e. rather brief ("To name a few").
As the employed syntax compiles in LOBase without error, I assume it is
correct as described below, so far. So I'm looking for a better
explanation for the
I am not familiar with "DoCmd.RunSQL", I will have to look it up (unless you
have a few links). Is DoCmd a server?
I have not used Base with Macros in a long time, but, last time I did, I was
creating connections to a database and then running SQL commands using a
connection object.
I
Where can I find the syntax of the DoCmd.RunSQL command to be used with
a LOBase Macro in Basic?
My assumption was
X = "SQL string"
DoCmD.RunSQL X
The SQL string runs correctly is correct when executed as SQL Command
in the Base Tools/SQL window.
The Basic Macro with the above statemsnt
14 matches
Mail list logo