[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

nexes

3/1/2008 4:59:00 PM

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?
3 Answers

Diez B. Roggisch

3/1/2008 5:54:00 PM

0

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

Aaron Brady

3/1/2008 6:02:00 PM

0

On Mar 1, 11:54 am, "Diez B. Roggisch" <de...@nospam.web.de> wrote:
> 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'.

Daniel Fetchinson

3/3/2008 6:33:00 AM

0

> > > 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.