It's just a simple insert into table (columns) values (values)....
<cffunction name="create" access="public" output="false" returntype="boolean">
<cfargument name="bill" required="true" type="Bills" hint="Bills bean" />
<cfset var qCreateBill = "" />
<cfquery name="qCreateBill" datasource="#variables.DSN#">
INSERT INTO
BILLS
(
PAYEEID,
PAYEE,
MINIMUMDUE,
DUEDAY,
ISCC,
ISACTIVE,
AMOUNTOWED,
APR
)
VALUES
(
<cfqueryparam
value="#arguments.bill.getPayeeID()#"
cfsqltype="cf_sql_numeric" />,
<cfqueryparam
value="#arguments.bill.getPayee()#"
cfsqltype="cf_sql_longvarchar" />,
<cfqueryparam
value="#arguments.bill.getMinimumDue()#"
cfsqltype="cf_sql_numeric" />,
<cfqueryparam
value="#arguments.bill.getDueDay()#"
cfsqltype="cf_sql_longvarchar" />,
<cfqueryparam
value="#arguments.bill.getIsCC()#"
cfsqltype="cf_sql_numeric" />,
<cfqueryparam
value="#arguments.bill.getIsActive()#"
cfsqltype="cf_sql_numeric" />,
<cfqueryparam
value="#arguments.bill.getAmountOwed()#"
cfsqltype="cf_sql_numeric" />,
<cfqueryparam
value="#arguments.bill.getAPR()#"
cfsqltype="cf_sql_numeric" />
)
</cfquery>
<cfreturn true />
</cffunction>
and the DB looks like..
CREATE TABLE bills
(
payeeid integer primary key,
payee TEXT,
minimumdue numeric,
apr numeric,
amountowed real,
iscc numeric DEFAULT 1,
dueday TEXT,
isactive numeric DEFAULT 1
)
On Mon, Sep 1, 2008 at 10:24 AM, P Kishor <[EMAIL PROTECTED]> wrote:
> On 9/1/08, Greg Morphis <[EMAIL PROTECTED]> wrote:
>> I understand this is a sqlite list, I had hoped that I wasnt the only
>> one using it or trying to use it with ColdFusion..
>> I've also asked this on a CF list, just hoping somewhere out there is
>> the answer..
>
> No, no... don't get me wrong. There is no problem with describing the
> tools you are using (CF and JDBC driver, in this case). However, you
> have given no other context... no db schema, no example code, the
> query you are executing, etc. There is little here for anyone to try
> and help, other than if there happens to be another CF/SQLite/JDBC
> user.
>
> Just offer more details, and you have a slightly better chance of
> getting a meaningful reply.
>
>>
>> Anyways, as I just posted the problem seems to be around the
>> <cfqueryparam tag.. or at least that's part of it.
>>
>> I suppose since this is a local app, I don't need the <cfqueryparam
>> tags, just looking for answers...
>>
>> Thanks
>>
>>
>>
>> On Mon, Sep 1, 2008 at 10:03 AM, P Kishor <[EMAIL PROTECTED]> wrote:
>> > On 9/1/08, Greg Morphis <[EMAIL PROTECTED]> wrote:
>> >> To further complicate things.. I removed all of the <cfqueryparam>s
>> >> and the code works.. I readd them and I get the same
>> >>
>> >>
>> >> Error Executing Database Query.
>> >> statement is not executing
>> >>
>> >>
>> >> The error occurred in
>> >>
>> C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\testCF\cfc\myApp\appDAO.cfc:
>> >> line 92
>> >>
>> >> The Stack Trace looks like :
>> >>
>> >> java.sql.SQLException: statement is not executing
>> >> at org.sqlite.Stmt.checkOpen(Stmt.java:41)
>> >> at org.sqlite.PrepStmt.getUpdateCount(PrepStmt.java:86)
>> >> at
>> coldfusion.server.j2ee.sql.JRunStatement.getUpdateCount(JRunStatement.java:277)
>> >> at coldfusion.sql.Executive.getRowSet(Executive.java:513)
>> >> at coldfusion.sql.Executive.executeQuery(Executive.java:1205)
>> >> at coldfusion.sql.Executive.executeQuery(Executive.java:1008)
>> >> at coldfusion.sql.Executive.executeQuery(Executive.java:939)
>> >> ...
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> On Sun, Aug 31, 2008 at 6:03 PM, Greg Morphis <[EMAIL PROTECTED]> wrote:
>> >> > I think it has to do with the JDBC driver I'm using.. I updated to
>> >> > v053 of the sqlitejdbc driver and am still getting the error..
>> >> >
>> >> >
>> >> > On Sun, Aug 31, 2008 at 5:27 PM, Greg Morphis <[EMAIL PROTECTED]>
>> wrote:
>> >> >> I've got ColdFusion 8 connecting to my SQLite3 database..
>> >> >>
>> >> >> When I run an insert using CFCs I get the error :
>> >> >> Error Executing Database Query.
>> >> >> statement is not executing
>> >> >>
>> >> >>
>> >> >> What's odd is that the row gets inserted into the table...
>> >> >> If I hit refresh in the browser I get the error that the Primary Key
>> >> >> must be unique..
>> >> >>
>> >> >> Anyone ever seen this?
>> >> >>
>> >> >
>> >
>> >
>> > Hi Greg,
>> >
>> > (a long time ago I used to use CF circa version 2 and 3).
>> >
>> > As you have yourself identified, the problem seems to be either with
>> > your own queries, examples of which you have not provided in any of
>> > your emails, or in the JDBC driver. Since neither CF nor the JDBC
>> > driver are the focus of this list, you are unlikely to get much
>> > response here... after all, this is a SQLite list, and SQLite seems to
>> > be working fine.
>> >
>> > Perhaps if you were to provide example of your code, the query you are
>> > doing, perhaps someone might be able to point out possible
>> > logic/syntax errors, but other than that, you will likely get more
>> > mileage from either CF list or from the provider of the JDBC driver.
>> >
>> > Fwiw, I have found that the JDBC driver does work fine, but most of my
>> > queries have been rather simple via straight-ahead Java.
>> >
>> >
>> >
>> > --
>> > Puneet Kishor http://punkish.eidesis.org/
>> > Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
>> > Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/
>>
>> > _______________________________________________
>> > sqlite-users mailing list
>> > [email protected]
>> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>> >
>>
>
>
> --
> Puneet Kishor http://punkish.eidesis.org/
> Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
> Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users