Getting operational error out of a insert SQLLite3How to get the ASCII value of a character?Does Python have a ternary conditional operator?How to get the current time in PythonGetting the class name of an instance?Getting the last element of a list in PythonHow to make a flat list out of list of lists?Behaviour of increment and decrement operators in PythonHow do I get the number of elements in a list in Python?How to put the legend out of the plotfatal error: Python.h: No such file or directory
Dragon forelimb placement
What would happen to a modern skyscraper if it rains micro blackholes?
Problem of parity - Can we draw a closed path made up of 20 line segments...
Minkowski space
Smoothness of finite-dimensional functional calculus
Can a Warlock become Neutral Good?
Why not use SQL instead of GraphQL?
Can I ask the recruiters in my resume to put the reason why I am rejected?
Have astronauts in space suits ever taken selfies? If so, how?
What do you call a Matrix-like slowdown and camera movement effect?
How much RAM could one put in a typical 80386 setup?
Why are 150k or 200k jobs considered good when there are 300k+ births a month?
Why can't I see bouncing of a switch on an oscilloscope?
What defenses are there against being summoned by the Gate spell?
Example of a continuous function that don't have a continuous extension
How do I create uniquely male characters?
Email Account under attack (really) - anything I can do?
Do VLANs within a subnet need to have their own subnet for router on a stick?
Font hinting is lost in Chrome-like browsers (for some languages )
Does the fruit of Mantra Japa automatically go to Indra if Japa Samarpana Mantra is not chanted?
Is it legal for company to use my work email to pretend I still work there?
Is it important to consider tone, melody, and musical form while writing a song?
strToHex ( string to its hex representation as string)
Why does Kotter return in Welcome Back Kotter?
Getting operational error out of a insert SQLLite3
How to get the ASCII value of a character?Does Python have a ternary conditional operator?How to get the current time in PythonGetting the class name of an instance?Getting the last element of a list in PythonHow to make a flat list out of list of lists?Behaviour of increment and decrement operators in PythonHow do I get the number of elements in a list in Python?How to put the legend out of the plotfatal error: Python.h: No such file or directory
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
def insert(BookID,Author,BookFormatID,Title,BookStatus,Category,RedemptionCode,StudentAssignedId):
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
db_path = os.path.join(BASE_DIR, "AVDatabase.db")
conn=sqlite3.connect(db_path)
cur=conn.cursor()
cur.execute("INSERT INTO Books(BookID,Author,BookFormatID,Title.BookStatus,Category,RedemptionCode,StudentAssignedId) VALUES(?,?,?,?,?,?,?,?)", (BookID,Author,BookFormatID,Title,BookStatus,Category,RedemptionCode,StudentAssignedId))
conn.commit()
conn.close()
view()
which is called by this event on a button:
def add_command():
back.insert(BookId_text.get(),Author_text.get(),Book_Format_Id_text.get(),Book_Title_text.get(),Book_Status_text.get(),Category_text.get(),Redemption_Code_text.get(),Student_Assigned_Id_text.get())
list1.delete(0,END)
list1.insert(END,(BookId_text.get(),Author_text.get(),Book_Format_Id_text.get(),Book_Title_text.get(),Book_Status_text.get(),Category_text.get(),Redemption_Code_text.get(),Student_Assigned_Id_text.get()))
So basic entry widgets and im about to pull my hair.
python
add a comment |
def insert(BookID,Author,BookFormatID,Title,BookStatus,Category,RedemptionCode,StudentAssignedId):
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
db_path = os.path.join(BASE_DIR, "AVDatabase.db")
conn=sqlite3.connect(db_path)
cur=conn.cursor()
cur.execute("INSERT INTO Books(BookID,Author,BookFormatID,Title.BookStatus,Category,RedemptionCode,StudentAssignedId) VALUES(?,?,?,?,?,?,?,?)", (BookID,Author,BookFormatID,Title,BookStatus,Category,RedemptionCode,StudentAssignedId))
conn.commit()
conn.close()
view()
which is called by this event on a button:
def add_command():
back.insert(BookId_text.get(),Author_text.get(),Book_Format_Id_text.get(),Book_Title_text.get(),Book_Status_text.get(),Category_text.get(),Redemption_Code_text.get(),Student_Assigned_Id_text.get())
list1.delete(0,END)
list1.insert(END,(BookId_text.get(),Author_text.get(),Book_Format_Id_text.get(),Book_Title_text.get(),Book_Status_text.get(),Category_text.get(),Redemption_Code_text.get(),Student_Assigned_Id_text.get()))
So basic entry widgets and im about to pull my hair.
python
What is the error you are getting--can you add the full error text to your question please?
– C. Peck
Mar 22 at 0:37
add a comment |
def insert(BookID,Author,BookFormatID,Title,BookStatus,Category,RedemptionCode,StudentAssignedId):
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
db_path = os.path.join(BASE_DIR, "AVDatabase.db")
conn=sqlite3.connect(db_path)
cur=conn.cursor()
cur.execute("INSERT INTO Books(BookID,Author,BookFormatID,Title.BookStatus,Category,RedemptionCode,StudentAssignedId) VALUES(?,?,?,?,?,?,?,?)", (BookID,Author,BookFormatID,Title,BookStatus,Category,RedemptionCode,StudentAssignedId))
conn.commit()
conn.close()
view()
which is called by this event on a button:
def add_command():
back.insert(BookId_text.get(),Author_text.get(),Book_Format_Id_text.get(),Book_Title_text.get(),Book_Status_text.get(),Category_text.get(),Redemption_Code_text.get(),Student_Assigned_Id_text.get())
list1.delete(0,END)
list1.insert(END,(BookId_text.get(),Author_text.get(),Book_Format_Id_text.get(),Book_Title_text.get(),Book_Status_text.get(),Category_text.get(),Redemption_Code_text.get(),Student_Assigned_Id_text.get()))
So basic entry widgets and im about to pull my hair.
python
def insert(BookID,Author,BookFormatID,Title,BookStatus,Category,RedemptionCode,StudentAssignedId):
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
db_path = os.path.join(BASE_DIR, "AVDatabase.db")
conn=sqlite3.connect(db_path)
cur=conn.cursor()
cur.execute("INSERT INTO Books(BookID,Author,BookFormatID,Title.BookStatus,Category,RedemptionCode,StudentAssignedId) VALUES(?,?,?,?,?,?,?,?)", (BookID,Author,BookFormatID,Title,BookStatus,Category,RedemptionCode,StudentAssignedId))
conn.commit()
conn.close()
view()
which is called by this event on a button:
def add_command():
back.insert(BookId_text.get(),Author_text.get(),Book_Format_Id_text.get(),Book_Title_text.get(),Book_Status_text.get(),Category_text.get(),Redemption_Code_text.get(),Student_Assigned_Id_text.get())
list1.delete(0,END)
list1.insert(END,(BookId_text.get(),Author_text.get(),Book_Format_Id_text.get(),Book_Title_text.get(),Book_Status_text.get(),Category_text.get(),Redemption_Code_text.get(),Student_Assigned_Id_text.get()))
So basic entry widgets and im about to pull my hair.
python
python
asked Mar 22 at 0:07
SQLAstroSQLAstro
103
103
What is the error you are getting--can you add the full error text to your question please?
– C. Peck
Mar 22 at 0:37
add a comment |
What is the error you are getting--can you add the full error text to your question please?
– C. Peck
Mar 22 at 0:37
What is the error you are getting--can you add the full error text to your question please?
– C. Peck
Mar 22 at 0:37
What is the error you are getting--can you add the full error text to your question please?
– C. Peck
Mar 22 at 0:37
add a comment |
1 Answer
1
active
oldest
votes
In the insert
function, Title.BookStatus
should be Title, BookStatus
.
You might have better luck avoiding this kind of error if you use multiline strings
for long SQL:
cur.execute("""INSERT INTO Books(BookID
, Author
, BookFormatID
, Title
, BookStatus
, Category
, RedemptionCode
, StudentAssignedId) VALUES (?,?,?,?,?,?,?,?)""",
(BookID, Author, BookFormatID, Title,
BookStatus, Category, RedemptionCode, StudentAssignedId))
thank you may the gods shine upon you forever. :)
– SQLAstro
Mar 22 at 0:14
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55290990%2fgetting-operational-error-out-of-a-insert-sqllite3%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
In the insert
function, Title.BookStatus
should be Title, BookStatus
.
You might have better luck avoiding this kind of error if you use multiline strings
for long SQL:
cur.execute("""INSERT INTO Books(BookID
, Author
, BookFormatID
, Title
, BookStatus
, Category
, RedemptionCode
, StudentAssignedId) VALUES (?,?,?,?,?,?,?,?)""",
(BookID, Author, BookFormatID, Title,
BookStatus, Category, RedemptionCode, StudentAssignedId))
thank you may the gods shine upon you forever. :)
– SQLAstro
Mar 22 at 0:14
add a comment |
In the insert
function, Title.BookStatus
should be Title, BookStatus
.
You might have better luck avoiding this kind of error if you use multiline strings
for long SQL:
cur.execute("""INSERT INTO Books(BookID
, Author
, BookFormatID
, Title
, BookStatus
, Category
, RedemptionCode
, StudentAssignedId) VALUES (?,?,?,?,?,?,?,?)""",
(BookID, Author, BookFormatID, Title,
BookStatus, Category, RedemptionCode, StudentAssignedId))
thank you may the gods shine upon you forever. :)
– SQLAstro
Mar 22 at 0:14
add a comment |
In the insert
function, Title.BookStatus
should be Title, BookStatus
.
You might have better luck avoiding this kind of error if you use multiline strings
for long SQL:
cur.execute("""INSERT INTO Books(BookID
, Author
, BookFormatID
, Title
, BookStatus
, Category
, RedemptionCode
, StudentAssignedId) VALUES (?,?,?,?,?,?,?,?)""",
(BookID, Author, BookFormatID, Title,
BookStatus, Category, RedemptionCode, StudentAssignedId))
In the insert
function, Title.BookStatus
should be Title, BookStatus
.
You might have better luck avoiding this kind of error if you use multiline strings
for long SQL:
cur.execute("""INSERT INTO Books(BookID
, Author
, BookFormatID
, Title
, BookStatus
, Category
, RedemptionCode
, StudentAssignedId) VALUES (?,?,?,?,?,?,?,?)""",
(BookID, Author, BookFormatID, Title,
BookStatus, Category, RedemptionCode, StudentAssignedId))
answered Mar 22 at 0:09
unutbuunutbu
562k10512111265
562k10512111265
thank you may the gods shine upon you forever. :)
– SQLAstro
Mar 22 at 0:14
add a comment |
thank you may the gods shine upon you forever. :)
– SQLAstro
Mar 22 at 0:14
thank you may the gods shine upon you forever. :)
– SQLAstro
Mar 22 at 0:14
thank you may the gods shine upon you forever. :)
– SQLAstro
Mar 22 at 0:14
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55290990%2fgetting-operational-error-out-of-a-insert-sqllite3%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What is the error you are getting--can you add the full error text to your question please?
– C. Peck
Mar 22 at 0:37