CRUD SQLite example
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: CRUD SQLite example
works great! it really helped me to get the understanding a bit more and run some testing. How can I set column dynamically from the code? I see
you have hardset the number of columns. Is it possible to set this information in the code as well as the column widths, and fonts, etc...?
you have hardset the number of columns. Is it possible to set this information in the code as well as the column widths, and fonts, etc...?
Deving on WinVista Home Prem. SP2 32 bit. Using LiveCode 4.6.1 Pro Build 1392
-
- Livecode Opensource Backer
- Posts: 430
- Joined: Sun Feb 13, 2011 8:43 pm
- Location: Seattle, USA
Re: CRUD SQLite example
Yes-- that's certainly possible, but that would be part of the DataGrid example.jesse wrote:How can I set column dynamically from the code? Is it possible to set this information in the code as well as the column widths, and fonts, etc...?
Here's a Stack that will show you how that is done. It's one of my favorites.
DataGrids Tour: http://revonline2.runrev.com/stack/229/Data-Grids-Tour
And here are a whole bunch of other good DataGrid lessons:
http://lessons.runrev.com/spaces/lesson ... =Data+Grid
If you get stuck start a new thread.
PS: Thanks for you help on my DB question.
-
- VIP Livecode Opensource Backer
- Posts: 1236
- Joined: Sat Apr 08, 2006 1:10 pm
- Location: Zurich
- Contact:
Re: CRUD SQLite example
Nice!
i suggest uploading it to revOnline ("user samples") too!
maybe make a presentation about it on www.livecode.tv ?
i suggest uploading it to revOnline ("user samples") too!
maybe make a presentation about it on www.livecode.tv ?
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
Re: CRUD SQLite example
townsend,
thanks i'll check it out again. and your welcome
thanks i'll check it out again. and your welcome
Deving on WinVista Home Prem. SP2 32 bit. Using LiveCode 4.6.1 Pro Build 1392
-
- Livecode Opensource Backer
- Posts: 430
- Joined: Sun Feb 13, 2011 8:43 pm
- Location: Seattle, USA
Re: CRUD SQLite example
Thanks! Let me get this uploaded to revOnline, then we canBvG wrote:Nice!
i suggest uploading it to revOnline ("user samples") too!
maybe make a presentation about it on http://www.livecode.tv ?
talk about me doing a short presentation.
-
- VIP Livecode Opensource Backer
- Posts: 4027
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: CRUD SQLite example
Hi Paul,
thank you for the stack. Maybe I finally get around to dig into sql thanks to your example. I actually understood what was going on.
Kind regards
Bernd
thank you for the stack. Maybe I finally get around to dig into sql thanks to your example. I actually understood what was going on.
Kind regards
Bernd
Re: CRUD SQLite example
townsend,
I have tried running for CRUD Example as a standalone on Windows but it doesn't seem to update the datagrid
after Connecting, Create Table, Populate, and then when I click Read into Datagrid nothing happens. Any suggestions?
I have tried running for CRUD Example as a standalone on Windows but it doesn't seem to update the datagrid
after Connecting, Create Table, Populate, and then when I click Read into Datagrid nothing happens. Any suggestions?
Deving on WinVista Home Prem. SP2 32 bit. Using LiveCode 4.6.1 Pro Build 1392
-
- Livecode Opensource Backer
- Posts: 430
- Joined: Sun Feb 13, 2011 8:43 pm
- Location: Seattle, USA
Re: CRUD SQLite example
Yes-- I see that message, "Table 'Users' Updated Successfully" is somewhat
confusing. I've changed it to read, "Selected Row Updated Successfully"
I've attached an updated version.
ALSO-- a much more important change to this version has to do with a
slightly poor coding practice I discovered. Previously, all the exit statements
had included the Hander name. These have all been replaced with the
more generic "exit to top" key phrase, which does the same thing.
This way if you ever want to copy and rename the Handler, you only
need to change the name in two places: at "on name ... exit name"
instead of three or four, or many more in more complex Handlers.
confusing. I've changed it to read, "Selected Row Updated Successfully"
I've attached an updated version.
ALSO-- a much more important change to this version has to do with a
slightly poor coding practice I discovered. Previously, all the exit statements
had included the Hander name. These have all been replaced with the
more generic "exit to top" key phrase, which does the same thing.
This way if you ever want to copy and rename the Handler, you only
need to change the name in two places: at "on name ... exit name"
instead of three or four, or many more in more complex Handlers.
- Attachments
-
- CRUD_SQLite_example_v3.3.zip
- (7.62 KiB) Downloaded 344 times
Re: CRUD SQLite example
Thanks for the update. Still I have no clue why when I compile as a standalone none of the buttons that are supposed to manipulate the datagrid are working.
I tried clear datagrid, and read into datagrid but nothing changes on the datagrid. Of course everything works fine while in development mode.
Any ideas?
I tried clear datagrid, and read into datagrid but nothing changes on the datagrid. Of course everything works fine while in development mode.
Any ideas?
Deving on WinVista Home Prem. SP2 32 bit. Using LiveCode 4.6.1 Pro Build 1392
-
- Livecode Opensource Backer
- Posts: 430
- Joined: Sun Feb 13, 2011 8:43 pm
- Location: Seattle, USA
Re: CRUD SQLite example
I didn't even think to create a Standalone. You're right. The DtataGrid was frozen.
I tried everything I could think of. Nothing worked. So, I just deleted the DataGrid
and created a new one, with the same name. Works good now.
I tried everything I could think of. Nothing worked. So, I just deleted the DataGrid
and created a new one, with the same name. Works good now.
- Attachments
-
- CRUD_SQLite_example_v3.5.zip
- (8.89 KiB) Downloaded 371 times
Re: CRUD SQLite example
That is very odd. I used your CRUD script as a starting point for my script and had the same problem with the datagrid
not working. Sure enough like you mentioned I deleted the grid and re-created it and it works now. If you happen to find
out what the issue was please let me know as I can't figure it out for the life of me. Thanks again for your help!
not working. Sure enough like you mentioned I deleted the grid and re-created it and it works now. If you happen to find
out what the issue was please let me know as I can't figure it out for the life of me. Thanks again for your help!
Deving on WinVista Home Prem. SP2 32 bit. Using LiveCode 4.6.1 Pro Build 1392
-
- Livecode Opensource Backer
- Posts: 430
- Joined: Sun Feb 13, 2011 8:43 pm
- Location: Seattle, USA
Re: CRUD SQLite example
Okay-- Here's the updated version, with the dynamic column names.did you update the download on the other post? i would love to download
it once its updated. its really helped me to understand how to do things more.
- Attachments
-
- CRUD_SQLite_example_v3.6.zip
- (9.47 KiB) Downloaded 377 times
-
- VIP Livecode Opensource Backer
- Posts: 1236
- Joined: Sat Apr 08, 2006 1:10 pm
- Location: Zurich
- Contact:
Re: CRUD SQLite example
Hi
please make a presentation on livecode.tv about the sql example stack, it's so grand! Please contact me at bvg AT mac DOT com.
please make a presentation on livecode.tv about the sql example stack, it's so grand! Please contact me at bvg AT mac DOT com.
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: CRUD SQLite example
Oooo - I second that - this would make a great presentation for livecode.tv
-
- Livecode Opensource Backer
- Posts: 430
- Joined: Sun Feb 13, 2011 8:43 pm
- Location: Seattle, USA
Re: CRUD SQLite example
Thanks for the encouragement guys!
Yeah-- sure-- I'd be glad to do a presentation for livecode.tv
after I finish at the Summer Academy. (3 weeks left)
There's not much to the example. If I ALSO went over the basics of
the SQL manager, SQLiteMan, then I probably could do 20-30 minutes.
BvG-- I'll send you an email about this. Also, I've been trying to
log into RevOnline for days now. It looks like they're not accepting
uploads right now.
Yeah-- sure-- I'd be glad to do a presentation for livecode.tv
after I finish at the Summer Academy. (3 weeks left)
There's not much to the example. If I ALSO went over the basics of
the SQL manager, SQLiteMan, then I probably could do 20-30 minutes.
BvG-- I'll send you an email about this. Also, I've been trying to
log into RevOnline for days now. It looks like they're not accepting
uploads right now.