Hello to everyone!
Can you please advice how to create subj which will receive a string with SQL query and will return a... here the problem because the query result may contain different amount/types of data
I'm novice in pointers but I think it is possible
Thank you in advance!
Universal procedure for SQL queries processing
Re: Universal procedure for SQL queries processing
Not 100% clear what you mean, but...
You can always use GetDatabaseString() doesn't matter if the real field is an integer or float or ...
Bernd
Re: Universal procedure for SQL queries processing
Hi infratec,
Of course I can treat all data as a string, concatenate them in a structure with one .s variable and use StringField() to parce it later but it is not... nice solution)
I'd like to learn how to return different amount/types of data from the same procedure.
I can allocate memory, put data there and return a pointer to this memory but how to return a structure description of the data I've put into this memory?
It could be Int or Quad or String or BLOB... or (Int-O-Quad-O-String-O-BLOB)*n (structured list)
Of course I can treat all data as a string, concatenate them in a structure with one .s variable and use StringField() to parce it later but it is not... nice solution)
I'd like to learn how to return different amount/types of data from the same procedure.
I can allocate memory, put data there and return a pointer to this memory but how to return a structure description of the data I've put into this memory?
It could be Int or Quad or String or BLOB... or (Int-O-Quad-O-String-O-BLOB)*n (structured list)
Re: Universal procedure for SQL queries processing
Hi,
use a pointer to a structure as parameter.
The structure contains a StructureUnion ...
But you need many ore stuff for this.
Bernd
use a pointer to a structure as parameter.
The structure contains a StructureUnion ...
But you need many ore stuff for this.
Bernd
Re: Universal procedure for SQL queries processing
It is a higher magic for me
Could you post some simple example code please?
Could you post some simple example code please?