Re: Newbie SQLite and LC learing problems
On 08/24/2012 11:43 AM, Blair Lewis wrote: I'm new to LC and am I am looking for help with using DB's with LC. I am coming from Filemaker and I am unable to find a decent tutorial on how to use SQLite that is either complete or useful. Does anyone have a sample stack and DB that I can pull apart to learn. I'm particularly having difficulty with creating relationships for creating and retrieving data combining multiple tables. Something about lastrow ID keeps coming up but I'm a little lost Blair Hi Blair, This might be a good place to start. Read the whole thread. You'll find an example stack that was developed over the course of the thread. Good luck, Warren ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Newbie SQLite and LC learing problems
On 08/24/2012 11:53 AM, Warren Samples wrote: On 08/24/2012 11:43 AM, Blair Lewis wrote: I'm new to LC and am I am looking for help with using DB's with LC. I am coming from Filemaker and I am unable to find a decent tutorial on how to use SQLite that is either complete or useful. Does anyone have a sample stack and DB that I can pull apart to learn. I'm particularly having difficulty with creating relationships for creating and retrieving data combining multiple tables. Something about lastrow ID keeps coming up but I'm a little lost Blair Hi Blair, This might be a good place to start. Read the whole thread. You'll find an example stack that was developed over the course of the thread. Good luck, Warren Well, it makes more sense if I include the link O.o http://forums.runrev.com/phpBB2/viewtopic.php?f=7t=7024hilit=sqlite+crud ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Newbie SQLite and LC learing problems
Hi Blair. I would search the web for sqLite syntax and sqLite primer. Tons of stuff out there. Be prepared for some kind of learning curve here, as SQL is like learning a new language, although not a very extensive one in the case of sqLite. Relationships are not what you would think coming from Filemaker. Relationships are created using Joins, and the data returned is not multiple cursors, but is actually a single cursor. It works, but it is not the parent-child pointer system you are used to. Livecode provides some basic commands and functions, one for connecting to a database (revOpenDatabase), one for getting data from a database as a string (RevDataFromQuery), one for getting data as a read only cursor (revQueryDatabase), one for executing a query that doesn't return any data at all, such as altering a table (revdb_execute) and of course one for closing a database (revCloseDatabase) all of which are described in the dictionary. Knowing all these will still not get you very far as you STILL have to learn how to form sql statements. There is however some good news! There are two utilities you can purchase, written by other livecode developers that for most queries eliminate the need to learn sql syntax! There is the new dbLib by Andre Garzia, and there is sqlYoga by Trevor Devore. Andre's is simpler to get started with. Trevor's is quite robust and covers just about anything you might want to do with an SQL database. Bob On Aug 24, 2012, at 9:43 AM, Blair Lewis wrote: I'm new to LC and am I am looking for help with using DB's with LC. I am coming from Filemaker and I am unable to find a decent tutorial on how to use SQLite that is either complete or useful. Does anyone have a sample stack and DB that I can pull apart to learn. I'm particularly having difficulty with creating relationships for creating and retrieving data combining multiple tables. Something about lastrow ID keeps coming up but I'm a little lost Blair ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Newbie SQLite and LC learing problems
Hi Blair, Others have provided you with some links and I will provide you with some more. First let me say that Petes software SQLiteAdmin is my favorite SQLite admin software and I am using it a lot. Recommended! I created a simple SQLite access library that will help you with the common database crud stuff. Most apps don't need anything more that a couple features. Those that need the complex stuff usually knows how to write it. You can check my library at http://andregarzia.com/page/dblib. When checking that, take your time and watch the video. It will show you both Petes SQLiteAdmin and how my library can be used. If you need further assistance or guidance related to DB Lib, hop by my little support forum at http://andregarzia.com/forum/ Let me also say that there is another database library available called SQL Yoga which is damn solid and full of features. It has a more steep learning curve but it is great. You can learn more about it at http://www.bluemangolearning.com/revolution/software/libraries/sql-yoga/ before creating my own DB Lib, I've shipped software using SQL Yoga and I think it is a great product. Welcome to the revolution! (oops, now we say welcome to LiveCode right?) cheers andre On Fri, Aug 24, 2012 at 3:04 PM, Peter Haworth p...@lcsql.com wrote: Hi Blair, Seems like you have two separate needs - figure out SQLite, then figure out how to use Livecode to access your SQLite database. Warren's link will show you hot to use Livecode with SQLite and as Bob mentioned, there are some LC add-ons that will help with that too. There are a number of online tutorials for SQLite, I'll detail a couple here but a Google search will likely bring up others. http://www.w3schools.com/sql/default.asp - more of a reference than a tutorial http://souptonuts.sourceforge.net/readme_sqlite_tutorial.html good tutorial, starts from the basics. Most of these tutorials are based around using the SQLIte command line tool, sqlite3 so you don't have to get into the Livecode side of things at all. And finally, in a shameless piece of self promotion, I would recommend getting my SQLiteAdmin program. It is written completely in Livecode and will give you a GUI interface to creating your SQLite schema and maintaining the data in it. You will find that SQLite itself provides only basic schema creation commands but SQLite will allow you to do much more, such as changing any of the properties of an existing table or row. SQLiteAdmin is available for $24.99 at http://www.lcsql.com/sqliteadmin.html . I wish you were starting on your project a couple of months from now. By then I will be in beta for liquidSQL, an interface between Livecode and SQL that will largely eliminate the need to write Livecode database access scripts or issue SQL statements. Pete lcSQL Software http://www.lcsql.com On Fri, Aug 24, 2012 at 9:43 AM, Blair Lewis ht...@hotmail.com wrote: I'm new to LC and am I am looking for help with using DB's with LC. I am coming from Filemaker and I am unable to find a decent tutorial on how to use SQLite that is either complete or useful. Does anyone have a sample stack and DB that I can pull apart to learn. I'm particularly having difficulty with creating relationships for creating and retrieving data combining multiple tables. Something about lastrow ID keeps coming up but I'm a little lost Blair ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode -- http://www.andregarzia.com -- All We Do Is Code. http://fon.nu -- minimalist url shortening service. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Newbie SQLite and LC learing problems
Andre's DBlib is cool. LIKE takes care of 99% of most simple database needs with a couple lines of code. On Fri, Aug 24, 2012 at 11:39 AM, Andre Garzia an...@andregarzia.comwrote: Hi Blair, Others have provided you with some links and I will provide you with some more. First let me say that Petes software SQLiteAdmin is my favorite SQLite admin software and I am using it a lot. Recommended! I created a simple SQLite access library that will help you with the common database crud stuff. Most apps don't need anything more that a couple features. Those that need the complex stuff usually knows how to write it. You can check my library at http://andregarzia.com/page/dblib. When checking that, take your time and watch the video. It will show you both Petes SQLiteAdmin and how my library can be used. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode