Where is the DatabaseQuery Control?

I am reading all these posts on using the DatabaseQuery control in Xojo.

I have just purchased Xojo Pro and can’t find it in the controls.

Where is it? Can someone help me out?

DatabaseQuery brings up only three results in the forum, this post being one of them…

Perhaps you mean one of the Database classes (like SQLiteDatabase) or PreparedStatements? If that’s the case, these are objects that you instantiate with your code, rather than dragging them from the library onto a window.

What specifically are you looking to accomplish?

http://documentation.xojo.com/index.php/DatabaseQuery

However, given what it does your better off to just use a prepared statement for whatever database you intend to use

Here…

http://documentation.xojo.com/index.php/DatabaseQuery

https://forum.xojo.com/14895-database-query-and-database/0

http://xojobyexample.com/databases-page-4/

These all talk about a DatabaseQuery Control

Just to clarify…

It is not part of my Xojo Pro installation.

[quote=338885:@Norman Palardy]http://documentation.xojo.com/index.php/DatabaseQuery

However, given what it does your better off to just use a prepared statement for whatever database you intend to use[/quote]
The part on the docs page where it says “you can instantiate it with code, eliminating the need to actually add the control to a window.” is what got me thinking it was a superclass for PreparedStatements somehow.

While I did not see the object in the list, I was able to drag a Generic Object in and change it’s super to DatabaseQuery. However, considering a Xojo Engineer just said you’d be better off with a prepared statement, you should consider taking that approach, or explaining to us what your goal is so we can help you achieve it.

I have been using RealBasic/RealStudio/Xojo for over 10 years, and this is the first time I have even heard of this control, and after reading what sparse documentation there is, and knowing what I do about datbases, SQL and the like, I would like to add my 2 cents into the pot on the side of “Forget this control/object even exists”…

I’m of the impression (since the IDE doesn’t really expose it, that it was something they (Xojo) might have decided was better off left out for some reason or another (percieved lack of error checking/reporting perhaps?, incompatiblitiy with all database engines? who knows)… But If Norman says “your better off”… this would be one of the few times he and I agree :smiley:

Point taken…

However, I am just going through the entire spectrum of features to familiarize myself with the products’ strengths and weaknesses. It keeps me from reinventing the wheel if I don’t have to…

I found it in the superclass list. It is a code instantiated control. I didn’t think to look at that.

Thanks for all the quick answers and support. I appreciate it.

DatabaseQuery isn’t a “control” in the same sense as PushButton" is a control

What you CAN do is drag a “generic object” onto a layout and add its events

But, as I said, it basically just ran a sql query so its utility is kind of limited

Hark, the mysterious and almost mythological DatabaseQueryControl:
http://xojobyexample.com/databases-page-4/

Only God knows where the dude got this widget, but evidently he used it because he knows all about it. I’ll take the word of all the gurus that there’s a better way to do this, but the control looks kind of cool.

Probably a BlackOps thing that the NSA snatched from the codebase while nobody was looking.

Bindings - as he’s demoing - have been gone for a long time - minimum of 4 years as all the binding interfaces were removed
Basically “those examples are old”

The “control” - which it really isn’t - is not much use without being able to simply & easily bind the data to other controls (as those examples illustrate)
And THAT no longer exists - so the databasequery isn’t that useful any more

Friedrich:
You shared a link to a page who ends (nearly) with a link to a project. Did you try to download that example ?

No, because if you do that you realized the URL is wrong…

Also, did you met previously a file Extension called .sit ?

According to a search, the last time the Stuffit application was updated… was 2014; read the page below:

I think the application is now dead… (probably a Carbon only application) I hope I extracted any / every stuffit archive I have or a current (2017) applciation knows how to unarchive sit / sitx files.

At last, when a Xojo Engineer tells you twice [quote]it basically just ran a sql query so its utility is kind of limited[/quote], maybe, maybe it is time to value your time thinking (working on) something else.

If not, tell us what you want to do and you may get an advice to code that using 2017-07 code, not code that comes from the night of time :wink:

OR: make a Feedback report to remove all clues about DatabaseQueryControl in the next Xojo release (documentation). :wink:

Data binding never worked all that well, in my not so humble opinion. I think you’re better off doing the work yourself rather than relying on a ‘control’ (which it really wasn’t but for arguments sake it is).

You might want to look at some projects like ActiveRecord, SQLdelite, or various others that can help abstract the database for you so you don’t have to do as much grunt work.