Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
Can anyone tell me what this construct in the dictionary means? I did look around but couldn't find anything to explain it and I've never seen a variable with an *b in front of it.
The "*b" is prepended to the variable name if it contains binary data. The revExecuteSQL command strips the binary marker "*b" and passes it to the database as binary data, rather than text data.
An example would be passing image data to be stored in a BLOB in the database.
elanorb wrote: Wed Jul 07, 2021 11:55 am
The "*b" is prepended to the variable name if it contains binary data. The revExecuteSQL command strips the binary marker "*b" and passes it to the database as binary data, rather than text data.
Thanks Elanor, I thought it might be that but I couldn't find anything in the dictionary under binary, binary data, etc that discussed that specific nomenclature.
I think the "*b" is only documented in the Dictionary entries for revExecuteSQL, revQueryDatabase and revDataFromQuery, in the Description section. I am not sure if it is documented on it's own anywhere.
elanorb wrote: Wed Jul 07, 2021 3:28 pm
I think the "*b" is only documented in the Dictionary entries for revExecuteSQL, revQueryDatabase and revDataFromQuery, in the Description section. I am not sure if it is documented on it's own anywhere.
Hi Elanor,
Reading a bit further in the revExecuteSQL documentation (I haven't checked the other commands) I found this:
To pass binary data in a variable in the variablesList, prepend "b" to the variable name. The revExecuteSQL command strips the binary marker "b" and passes it to the database as binary data, rather than text data.
It doesn't refer to the "*" in front of the "b". Does that char serve a special purpose, or is just an alternate form of the same specification?
Ah, I should have read the other two before posting, they both refer to "*b". So, either two ways of doing it or a bit of an oversight in revExecuteSQL.
Presumably that "*b" is a subjective thing and could just as easily be "binary" or "myCamelisCalledClotilde"?
Just going through the annual "agony" of explaining to children that a variable can be called anything (well, except for a word used
in the LiveCode language) . . . not an easy concept for young sprogs.
marksmithhfx wrote: Wed Jul 07, 2021 5:41 pm
Ah, I should have read the other two before posting, they both refer to "*b". So, either two ways of doing it or a bit of an oversight in revExecuteSQL.
M
I went to report a bug about the revExecuteSQL entry and it has already been reported. By me, so I should have remembered