import sqlite3
try:
sqliteConnection = sqlite3.connect('SQLite_Python.db')
cursor = sqliteConnection.cursor()
print("Database created and Successfully Connected to SQLite")
sqlite_select_Query = "select sqlite_version();"
cursor.execute(sqlite_select_Query)
record = cursor.fetchall()
print("SQLite Database Version is: ", record)
cursor.close()
except sqlite3.Error as error:
print("Error while connecting to sqlite", error)
finally:
if (sqliteConnection):
sqliteConnection.close()
print("The SQLite connection is closed")
Python SQLite Connection
Subscribe to:
Post Comments (Atom)
-
Puzzle - There are 3 temples and 3 rivers. The river and the temple are alternatively. Like - River Temple River Temple River Temple ...
-
First discuss about what is bits toggling? Number 12 is represented as 1100 in binary format. Mathematical representation like (12) 1...
-
In this article we will about study C-style array vs std::array . A std::array should have same run-time performance as a c-style array....
-
First discuss about what is bits clearing? Number 12 is represented as 1100 in binary format. Mathematical representation like (12) 1...
No comments:
Post a Comment