Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » Next SQLite3 Issue
Next SQLite3 Issue [message #8533] Fri, 16 March 2007 00:18 Go to next message
MikeyV is currently offline  MikeyV
Messages: 20
Registered: February 2007
Promising Member
Told you it wouldn't take long Laughing

If I use a drop down control on a layout all by itself, I can add the query data to it like so:
dropdown.Add(SQL[0]);

If I put that layout in a tab control, I can only access it like:
layoutInTabControl.dropdown.Add(SQL[0]);

However, this just crashes my program. The query runs, but the Add part crashes.

I'm attaching my code so you can tell me where I'm screwing up.

Sorry to be a pain, but I'm still learning.

Mike
  • Attachment: Sats2.zip
    (Size: 2.69KB, Downloaded 378 times)
Re: Next SQLite3 Issue [message #8535 is a reply to message #8533] Fri, 16 March 2007 10:02 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
My bet is that it crashes at Fetch, because you do not have database schema established (SQL error crashes Fetch).

Mirek
Re: Next SQLite3 Issue [message #8544 is a reply to message #8535] Fri, 16 March 2007 17:33 Go to previous messageGo to next message
MikeyV is currently offline  MikeyV
Messages: 20
Registered: February 2007
Promising Member
Quote:

you do not have database schema established (SQL error crashes Fetch).


It becomes un-established when I put the widget in a tab control?

I don't understand. I populated that drop down with the info from the db. That part worked. Then, I made no other changes to the code except to put the same widget into a tab control. That crashes.

So, the schema is still there. I can make successful queries to the db, as long as I don't try to put the results into a drop down on a tab control.

What am I doing wrong?
Re: Next SQLite3 Issue [message #8545 is a reply to message #8544] Fri, 16 March 2007 18:25 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Sorry then, I have just seen the code you posted and there was nothing about creating the database schema...

Well, perhaps better testcase would help. You are almost there (with the testcase), but you should post the whole package (whole directory, including the .upp file) and make it so that I get that crash here too, without haveing your .db file, or perhaps send .db file too.

(Sorry about being nitpick, but this should be much easier for those submiting problems than for those responding is to recreating the whole thing by guessing Wink

Mirek
Re: Next SQLite3 Issue [message #8548 is a reply to message #8545] Fri, 16 March 2007 18:59 Go to previous messageGo to next message
MikeyV is currently offline  MikeyV
Messages: 20
Registered: February 2007
Promising Member
luzr wrote on Fri, 16 March 2007 10:25

there was nothing about creating the database schema...


Maybe I'm not clear on schemas. I have a schema file in there, and the dropdown will populate correctly as long as it's not in a tab control.

Quote:

Well, perhaps better testcase would help. You are almost there (with the testcase), but you should post the whole package (whole directory, including the .upp file) and make it so that I get that crash here too, without haveing your .db file, or perhaps send .db file too.


Of course. Sorry abbout that, I thought I zipped it all. Embarassed

Quote:

(Sorry about being nitpick, but this should be much easier for those submiting problems than for those responding is to recreating the whole thing by guessing Wink


You're not nitpicky. You're helping a newbie programmer to learn to use your toolkit. I appreciate the help.

I've been playing with this some, and made a new testcase based on the TabDlg reference. As long as I put the layout in a tab dialog, it works. But tab control makes it crash.

Here's my complete package. Note, some of the tables are empty. The only populated tables are tables that contain static data.
  • Attachment: Sats2.zip
    (Size: 4.93KB, Downloaded 305 times)
Re: Next SQLite3 Issue [message #8549 is a reply to message #8533] Fri, 16 March 2007 20:49 Go to previous message
MikeyV is currently offline  MikeyV
Messages: 20
Registered: February 2007
Promising Member
Ok, I started over, and now it works. I'm not sure why, I have to compare my code. I was doing something wrong, obviously.

Thanks for the help, and I'll post my error when I find it in the hopes of helping others.
Previous Topic: At Wits End/SQLite3
Next Topic: Sqlite3 Blob sample code required
Goto Forum:
  


Current Time: Sun Apr 28 23:30:35 CEST 2024

Total time taken to generate the page: 0.02642 seconds