DataControl not connecting to Database

I have a database called ‘gDatabase’, and I’ve been trying to use a DataControl for the first time.

A DataControl has a property, ‘Database’, which is a popup box to select. I click it and select the database I want but it just goes back to ‘None’, why is this?

Do I need to be doing else anything to use a DataControl?

Thanks.

This is a Bug.

<https://xojo.com/issue/34821>

[quote=154228:@Wolfgang Schwarz]This is a Bug.

<https://xojo.com/issue/34821>[/quote]

Oh I see, how do I see the feedback cases?

Download the Feedback application from the extras page.
http://xojo.com/download/extras.php

You can always not use the DataControl and do everything programmatically. In the long run I think you’ll be happier not using it.

Yeah I did everything programmatically before even discovering the DataControl exists.

Then don’t look back. DataControl isn’t very helpful.

Would still be nice if it would work. To make small beginner projects, it is sufficient.

As I understand it, the plan is to revisit database access and make it more friendly in general. There is no published timeline for this, however.

I also believe there’s been some talk about having SQLite have an ORM option (sort of like what ActiveRecord does but the IDE would build the classes for you outright). But I think that conference was 3 conferences ago so the timeframe is unknown.

Has this bug been fixed for the data controller not selecting a database? I’m a complete newbie programmer but I have built several very functional apps for my business that keep records using the data controller and sqlite as building a roll-your-own data controller is beyond me. Everything I’ve tried to build has failed in the last month to the same bug… I know “advanced” programmers seem to hate this thing on the forums… but I very much use it alot as it’s very functional for what I do and build.

Can anyone tell me the last version of XoJo or RealBasic this worked in so I can finish my project…

The last version that I know it works, was 2014R1.1

So I was able to create my tables and my app in 2013r4… Then I tried to import it into the latest 2014 release… now when i run it, it just crashes… this is a frustrating app to recommend to any one when things are broken and there is an apparent disregard that it doesn’t work by the developers just because they believe there is a better way or they don’t use this feature… what will be broken in the future that they won’t care about either… kind of bugs me… but whatever…

I totally agree with you Wally David
I wonder if Xojo is running some Regression Testing to ensure curent functionalities are still OK…
I have reported that bug (and also the same bug with the control “DataQuery”) and the only answer I got is :
“Please you better avoid that control and write your code yourself…”
What a shame to read such of answer… Is it a workaround solution until the next release or what.??
I bought Xojo Pro after a long test (from the previous release) and I let you guess what was my frustration when trying to run the sample I created with the new release!!!
Does anyone knows if the new release will fix that issue or shall I reconsider my purchase ?

Thank you

@Patrick: it’s rather unlikely that your bug will be fixed soon. Have you considered to roll you own control for handling data? Have a look at Argen from Bob Keeney. This is a helper app for a pattern called Active Record. See http://www.bkeeney.com/allproducts/argen/ .

Don’t give up on Xojo so easily…

Hi Beatrix

I appreciate your honesty and I hope that bug will be fix soon;
Nonetheless, you must have the full picture to understand my frustration!
Indeed, I have been involved into a benchmark for a several clients and my CPY, and according to a severe criteria Xojo went through and it has been selected as the main platform to carry our some DEV… Of course it was the previous release.
Now, after having bought the last release, and trying to migrate all our samples; I let you guess how much time t took us
to prepare all that sample + Doc… and now we are struggling with a large amount of then that cannot be executed under the new release 2015.R2.2
Thus, this is not a question of “giving up” but more a question “How to handle it” :
The Bug with “DataControl” also occurs with “DataQuery” Control

  1. Shall I reconsider all our Unit Test (made during our benchmark ) and AGAIN Go thru all of then to see what else are not working
    properly under Xojo 2015R2.2 ? (This should have been carried out by Xojo under Regression Testing)
  2. Shall I ask a licence Key to build our apps under the previous release ?
  3. Shall I give up these components that are not working any longer to go thru a hard coding ?
  4. Shall I move forward and set some workaround solution until the next release fix the issue ?
    I believe that can understand people frustration when they purchase something and part of it is malfunctioning…
    Anyway…
    I do not give up easily, this is not in my core value; Therefore, I got to face some issue that I wasn’t supposed to.
    Thank for the link, I’ll check that out later and give you my feedback
    Cheers

Personally I would NOT use either the DataControl or Data Query control
They restrict what you can do (like sorting a listbox by clicking on the headers) and dont really offer such a significant amount of functionality that they cannot be easily replaced with a handful of lines of code
And there are issues you will run into to with them like (many mentioned in the old forums)

Certainly - customer service is very accommodating in circumstances like these

Personally I would - but not “hard coding”
Its possible to write a routine that returns a record set given a query & its paramaters and it works for any query (see something like http://documentation.xojo.com/index.php/SQLitePreparedStatement or http://documentation.xojo.com/index.php/MySQLPreparedStatement)

There’s really only a few choices

  • replace them with your own code (which I would say gives you more flexibility)
  • do nothing & wait until its fixed
  • use an old version

Hi Norman

Thank you for answering. I do appreciate a lot.
I have a mother discussion in progress in a post I created : http://forum.xojo.com/24565-database-access-via-datacontrol-fail-crash
And I’m looking forward to reading the Xojo answer regarding couple of issue. Thus I’ll post the feedback.
Cheers

Multiple threads about more or less the same thing is just not useful
You’re getting most of the same people posting most of the same things