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 ...
-
Information technology is growing very fast in India. Bangalore, Chennai, Hyderabad, Pune and Noida are now IT hub of India. Every day man...
-
I want to share one puzzle which was asked to me in one technical interview. Puzzle - One camel owner want to transport 3000 Bananas to...
-
#Import the required module for text #to speech conversion from gtts import gTTS #This module is imported so that we can #play the converted...
No comments:
Post a Comment