471,075 Members | 916 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,075 software developers and data experts.

SQLLITE

Hello All,
I am having a minor problem when I try and do this:
c.execute("insert into [tblTranscripts] (MovieID,Transcript)
Values(" + movieID + ",'" + formatText + "');") (don't even bother
commenting of the sql style I know its bad form but this is a simple
script). Whenever I try and do the insert I get table not found,
however when I perform the sql through sqlite's command line program
(the sql is outputted via a print statement) it works fine. Any ideas?
Mar 1 '08 #1
3 2259
nexes schrieb:
Hello All,
I am having a minor problem when I try and do this:
c.execute("insert into [tblTranscripts] (MovieID,Transcript)
Values(" + movieID + ",'" + formatText + "');") (don't even bother
commenting of the sql style I know its bad form but this is a simple
script). Whenever I try and do the insert I get table not found,
however when I perform the sql through sqlite's command line program
(the sql is outputted via a print statement) it works fine. Any ideas?
No, and without more context nobody will have. Does working with the
table with other statments work, how do you connect the DB, are you sure
you really use the same DB-file and so forth.

Diez
Mar 1 '08 #2
On Mar 1, 11:54*am, "Diez B. Roggisch" <de...@nospam.web.dewrote:
nexes schrieb:
Hello All,
* *I am having a minor problem when I try and do this:
* * * c.execute("insert into [tblTranscripts] (MovieID,Transcript)
Values(" + movieID + ",'" + formatText + "');") * (don't even bother
commenting of the sql style I know its bad form but this is a simple
script). Whenever I try and do the insert I get table not found,
however when I perform the sql through sqlite's command line program
(the sql is outputted via a print statement) it works fine. *Any ideas?

No, and without more context nobody will have. Does working with the
table with other statments work, how do you connect the DB, are you sure
you really use the same DB-file and so forth.

Diez
There's a number of things it could be-- narrow it down a little more
(for the reader). Beginner stuff is usually forgetting 'use
moviedata'.
Mar 1 '08 #3
I am having a minor problem when I try and do this:
c.execute("insert into [tblTranscripts] (MovieID,Transcript)
Values(" + movieID + ",'" + formatText + "');") (don't even bother
commenting of the sql style I know its bad form but this is a simple
script). Whenever I try and do the insert I get table not found,
however when I perform the sql through sqlite's command line program
(the sql is outputted via a print statement) it works fine. Any ideas?
No, and without more context nobody will have. Does working with the
table with other statments work, how do you connect the DB, are you sure
you really use the same DB-file and so forth.
Beginner stuff is usually forgetting 'use moviedata'.
This is not needed for sqlite. The database is defined by the file the
sqlite executable is working on.
Mar 3 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Lothar Scholz | last post: by
reply views Thread by lawrence | last post: by
1 post views Thread by Simon Roses Femerling | last post: by
4 posts views Thread by pet100us | last post: by
33 posts views Thread by Will McGugan | last post: by
2 posts views Thread by mir nazim | last post: by
1 post views Thread by jeanmarc | last post: by
2 posts views Thread by rohitskapoor | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.