@Colstonewall I have a text editor with the commands and script sitting next to the terminal window. My screen cast software only captures the terminal window. D'oh! I have just given away my secret sauce.
@jbraunia Honestly, I don't know. I just learned just enough Python to actually get this little program to work. A quick look at Python syntax says that square brackets means it is a Python list, and round bracket means that it is a Python tuple. I'm going to guess that if you have a query with many parameters, you present it as a list. to c.execute().
@Gearoidmacgiolla Did you try it out and see? I only ask, because most SQLite APIs assume that all queries are transactions unless explicitly told. However, I didn't try it out, so I can't say for sure.
@Jaynonymous1 Yeah I tried it - it is necessary. I read up on it (I am only beginning to use sqlite) and it seems that it is something to do with python opening transactions for insert commands. It seems that it autocommits for non-query commands such as create. You can set the keyword isolation_level to None when opening the db and it will autocommit the queries you make.
@Gearoidmacgiolla Thanks for the heads-up. That's good to know. I'll be honest. I'm not a python programmer. I only got enough of Python up & running to do this tutorial. :)
@Jaynonymous1 I'm no expert, but I'll take Python over Ruby ANY DAY! Just my opinion, however, Python wasn't named 'most popular' by Linux Journal for no reason. . .And thanks for the great video Jay. Hope you keep them coming!
@Colstonewall I like Python because it is very easy to read, especially if you are a C++ or Java person. With no knowledge, I was able to easily tweak some Python scripts many years ago. Ruby takes some getting used to, but I find that the flexibility Ruby gives with Module mixins and closures gives it more programming power than Python. Also, I was able to advance further and faster as a web programmer using Ruby. To each his own.
Thanks for the HOWTO. I have the basics now thanks to your tutorial and will be continuing to research. I followed along with great results with Python 2.6. There is one loose end that you did not cover: when is it appropriate to close a db connection. I'll be researching that. Maybe you cover it in one of your great HOWTOs that I'll be viewing later to night ;-) Thanks!
When Inserting the data into the table, you do something to copy the line to the next line. How did you do that!!!???
Colstonewall 1 month ago
@Colstonewall I have a text editor with the commands and script sitting next to the terminal window. My screen cast software only captures the terminal window. D'oh! I have just given away my secret sauce.
Jaynonymous1 1 month ago
What are the squarebrackets around [newname] for in the last select statement?
jbraunia 2 months ago
@jbraunia Honestly, I don't know. I just learned just enough Python to actually get this little program to work. A quick look at Python syntax says that square brackets means it is a Python list, and round bracket means that it is a Python tuple. I'm going to guess that if you have a query with many parameters, you present it as a list. to c.execute().
Jaynonymous1 2 months ago
@Jaynonymous1 Sounds reasonable :)
jbraunia 2 months ago
Good video, very informative - one comment, I think you would have to do conn.commit() in order for you additions to the table to be saved.
Gearoidmacgiolla 4 months ago
@Gearoidmacgiolla Did you try it out and see? I only ask, because most SQLite APIs assume that all queries are transactions unless explicitly told. However, I didn't try it out, so I can't say for sure.
Jaynonymous1 4 months ago
@Jaynonymous1 Yeah I tried it - it is necessary. I read up on it (I am only beginning to use sqlite) and it seems that it is something to do with python opening transactions for insert commands. It seems that it autocommits for non-query commands such as create. You can set the keyword isolation_level to None when opening the db and it will autocommit the queries you make.
Gearoidmacgiolla 4 months ago
@Gearoidmacgiolla Thanks for the heads-up. That's good to know. I'll be honest. I'm not a python programmer. I only got enough of Python up & running to do this tutorial. :)
Jaynonymous1 4 months ago
thank you for an easy to understand video
pwarawit 5 months ago
Hey I'm starting to learn programming(as in from scratch) is python a good program to start out with? I have heard good things about it.
gbsons 6 months ago
@gbsons In my opinion, Ruby is better. But Python is good. Try the SQLite Programming with Ruby video that I put up and see what you like better.
Jaynonymous1 6 months ago
@Jaynonymous1 I'm no expert, but I'll take Python over Ruby ANY DAY! Just my opinion, however, Python wasn't named 'most popular' by Linux Journal for no reason. . .And thanks for the great video Jay. Hope you keep them coming!
Colstonewall 1 month ago
@Colstonewall I like Python because it is very easy to read, especially if you are a C++ or Java person. With no knowledge, I was able to easily tweak some Python scripts many years ago. Ruby takes some getting used to, but I find that the flexibility Ruby gives with Module mixins and closures gives it more programming power than Python. Also, I was able to advance further and faster as a web programmer using Ruby. To each his own.
Jaynonymous1 1 month ago
Thanks for the video.
napo153 6 months ago
Thanks for the HOWTO. I have the basics now thanks to your tutorial and will be continuing to research. I followed along with great results with Python 2.6. There is one loose end that you did not cover: when is it appropriate to close a db connection. I'll be researching that. Maybe you cover it in one of your great HOWTOs that I'll be viewing later to night ;-) Thanks!
t0nyfr33man 7 months ago
@t0nyfr33man connection.close()
Jaynonymous1 7 months ago
This was a great use of my 10 minutes. Gonna fire up Python now and get to work.
sigep311 8 months ago
It's a great video, but Is there other way to access a database? where just it is necessary to send an object??
estuardogt 8 months ago
Dude, you rock! Thanks a lot for the refresher
anzwertree 11 months ago
Great video...very helpful and a good point to start with.
Thanks :-)
mra122 1 year ago
Nice video. Thanks for uploading.
psankar 1 year ago
Thank you Jay, Kay and Ray!
madTube1 1 year ago
Thanks, just what I was looking for. Very informative.
Myndara 1 year ago
Dude! This is awesome, thanks
anzwertree 1 year ago
Thanks very much. Very straight forward.
JOHNKDUFFY 1 year ago
@JOHNKDUFFY I'm glad you found it useful.
Jaynonymous1 1 year ago