Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,160,564 members, 7,843,767 topics. Date: Wednesday, 29 May 2024 at 10:49 AM

PYTHON: Please If You've Used The Python Sqlite3 Module Successfully, Help Me - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / PYTHON: Please If You've Used The Python Sqlite3 Module Successfully, Help Me (1280 Views)

If You've Always Wanted To Learn Programming But Failed, Be Here!!! / Development Agencies The Best Magento Marketplace Multi Vendor Module - Magebay. / The Best Magento Marketplace Multi Vendor Module Only $299 By Magebay.com (2) (3) (4)

(1) (Reply) (Go Down)

PYTHON: Please If You've Used The Python Sqlite3 Module Successfully, Help Me by badthinds: 3:41am On Jul 09, 2016
I hav'nt considered sqlite, but now I think I will be needing it for some of my android apps. There is this our family computer (windows xp ) with python 3.3.3 running on it.

I import sqlite3, and try to create a simple database but not working... so please if you've ever created any successfully drop the code here. In otherwords, drop a working code for creating a simple database with the sqlite3 module.

Thanks.
Re: PYTHON: Please If You've Used The Python Sqlite3 Module Successfully, Help Me by badthinds: 11:22am On Jul 09, 2016
Nobody?
Re: PYTHON: Please If You've Used The Python Sqlite3 Module Successfully, Help Me by sleepingdemon: 1:11pm On Jul 09, 2016
badthinds:
I hav'nt considered sqlite, but now I think I will be needing it for some of my android apps. There is this our family computer (windows xp ) with python 3.3.3 running on it.

I import sqlite3, and try to create a simple database but not working... so please if you've ever created any successfully drop the code here. In otherwords, drop a working code for creating a simple database with the sqlite3 module.

Thanks.
i dont see why there should be a problem comnecting python with sqlite, although i havnt tried it in python 3, im sure of 2.7. however, you cannot just ask to be helped without showing the code you have actually tried, while we go through it and tell you your errors .
however, the normal syntax should be

#!/usr/bin/python
import sqlite3
conn = sqlite3.connect('test.db')
Re: PYTHON: Please If You've Used The Python Sqlite3 Module Successfully, Help Me by umaryusuf(m): 1:19pm On Jul 09, 2016
A Google search would answer your question.
Re: PYTHON: Please If You've Used The Python Sqlite3 Module Successfully, Help Me by logicalhumour: 6:03pm On Jul 09, 2016
sleepingdemon:

i dont see why there should be a problem comnecting python with sqlite, although i havnt tried it in python 3, im sure of 2.7. however, you cannot just ask to be helped without showing the code you have actually tried, while we go through it and tell you your errors .
however, the normal syntax should be

#!/usr/bin/python
import sqlite3
conn = sqlite3.connect('test.db')
Umm.. I think I have thesame problem with OP. now with test.db how do you store maybe a name and password there?
Re: PYTHON: Please If You've Used The Python Sqlite3 Module Successfully, Help Me by adejumoadeoluwa(m): 9:08pm On Jul 09, 2016
conn.write("name: this is my name"wink
type conn. Then hit ctrl + space bar, you will see all available methods.
Re: PYTHON: Please If You've Used The Python Sqlite3 Module Successfully, Help Me by sleepingdemon: 10:20pm On Jul 09, 2016
logicalhumour:
Umm.. I think I have thesame problem with OP. now with test.db how do you store maybe a name and password there?
to store a username or password, you would have to first of all create a database table inside the test.db with coloums username and password using the create table if not exist command as you would do in normal mysql
Re: PYTHON: Please If You've Used The Python Sqlite3 Module Successfully, Help Me by furthest(m): 4:34pm On Aug 22, 2016
pls any python whatsapp group..here's my number 08178275529
Re: PYTHON: Please If You've Used The Python Sqlite3 Module Successfully, Help Me by foldl: 11:08pm On Aug 23, 2016
Please read about Python's DB API specification at https://www.python.org/dev/peps/pep-0249/
.

It is a uniform API for all standards compliant database adapters for Python.

(1) (Reply)

Please Dont Open / Yes / Geodjango :any Python Programmer That Has Worked With Geodjango, Come In

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 12
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.