KonaKart Community Forum

Installation / Configuration => Installation of KonaKart => Topic started by: Geetha on January 18, 2008, 07:32:57 am

Title: AT installation SQL execution failed.
Post by: Geetha on January 18, 2008, 07:32:57 am


HI,

I have a problem in installation, i am using mysql database connection is successful. after that i have an error "SQL execution failed."

          " Message:   You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS KK_IF' at line 1
SQLState:  42000
ErrorCode: 1064"

pls help me to resolve this error............
Title: Re: AT installation SQL execution failed.
Post by: kate on January 18, 2008, 08:10:17 am
Hi,

Which version of MySQL are you using?

Kate
Title: Re: AT installation SQL execution failed.
Post by: Geetha on January 18, 2008, 09:33:20 am
Hi,
        I am using MySQL Server 4.1 for database.........
Title: Re: AT installation SQL execution failed.
Post by: kate on January 18, 2008, 10:18:32 am
Hi,

Up until v2.2.0.7 and from release v2.2.1.0, MySQL 4.1 is supported.  Are you using KonaKart 2.2.1.0?

If so, there are three options I can think of:

* Upgrade to a new version of MySQL - 5 or above, ideally, and re-run the installation

* Use one of the other supported databases (Oracle, PostgreSQL, DB2, MS SQL Server)

* Continue with MySQL 4.1 but load the tables manually after the installation


If you decide to load the tables and data manually you will have to modify the script at database/MySQL/konakart_demo.sql by modifying the "IF EXISTS" statements which MySQL 4.1 doesn't like.  Once the modified script is executed successfully, KonaKart will run fine on MySQL 4.1

Regards,
Kate



Title: Re: AT installation SQL execution failed.
Post by: Geetha on January 18, 2008, 01:10:55 pm
hi,

      I find the query in database/MYSQL/konakart-demo.sql.
     "{ Create a KK_IF function which for MySQL is a wrapper around the IF function (but we can't use IF on all databases)
DROP FUNCTION IF EXISTS KK_IF;
#CREATE FUNCTION KK_IF (test int, a decimal(15,4), b decimal(15,4)) RETURNS decimal(15,4) deterministic return IF(test, a, b)"  }"

now, what have to do? by deleting this or i have to change something in this query...

thanks and regards,
geetha
Title: Re: AT installation SQL execution failed.
Post by: Geetha on January 18, 2008, 01:13:01 pm
Quote from: Geetha on January 18, 2008, 01:10:55 pm
hi,

      I find the query in database/MYSQL/konakart-demo.sql.
     "{ Create a KK_IF function which for MySQL is a wrapper around the IF function (but we can't use IF on all databases)
DROP FUNCTION IF EXISTS KK_IF;
#CREATE FUNCTION KK_IF (test int, a decimal(15,4), b decimal(15,4)) RETURNS decimal(15,4) deterministic return IF(test, a, b)"  }"

now, what have to do? by deleting this or i have to change something in this query...

thanks and regards,
geetha
Title: Re: AT installation SQL execution failed.
Post by: kate on January 18, 2008, 01:18:08 pm
For MySQL, you no longer need the KK_IF function
Kate
Title: Re: AT installation SQL execution failed.
Post by: Geetha on January 19, 2008, 04:35:57 am

Hi,

          Thank you, now my Konakart application working well. I install my db successfully.......

Thanks & Regards,
    Geetha..............
Title: Re: AT installation SQL execution failed.
Post by: kate on January 19, 2008, 06:02:53 am
Good news!
Thanks for letting us know,
Kate
Title: installation SQL execution failed while using db2 database
Post by: ajx on November 13, 2008, 05:54:38 pm
Hi,
        Can any1 help me plz.....
        I got sql exception after successfully connecting to database from db2.but after that it gives error while executing sql quaries.
        I'm using Db2 9 on vista.
        Plzzz help me i'm in trouble.... :(
         Thanks In Advance....
Title: Re: AT installation SQL execution failed.
Post by: greg on November 13, 2008, 06:14:55 pm
Hi,

We test on DB2 9.5 as one of our QA platforms so I'm not sure why you're seeing exceptions.

What exceptions are you seeing, you didn't say?

How did you install?

Greg