Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

StoredProcedures On MySQL

New Here ,
Apr 06, 2009 Apr 06, 2009

EU criei duas StoredProcedures no MySQL 5.0.5 que funcionam perfeitamente bem quando eu as acesso via PHP, mas dá erro no ColdFusion e eu não sei porque... gostaria de ter ajuda.

TOPICS
Database access
804
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 07, 2009 Apr 07, 2009

I create 2 StoredProcedures in MySQL  5.0.51b that works very well with PHP, but dont works with ColdFusion. Why? I need help, please!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 11, 2009 Apr 11, 2009
LATEST

If I remember well, stored procedures started with MySQL 5. The JDBC driver of the MySQL version that comes with your Coldfusion version may therefore be older than the one your procedure requires. To test this, install a new driver, as follows:

1) Download the MySQL 5.0.51 JDBC driver or, preferably, the most recent community version, 5.0.77.

2) Stop Coldfusion. Go to the folder {CF_wwwroot}/WEB-INF/lib/ and move any file of type mysql-connector-java-x.x.x-bin.jar to your documents directory. Should anything go wrong, you will have to restore this file back to its original location.

3) Unpack the zip file you downloaded in step 1. Copy the JAR file to the directory {CF_wwwroot}/WEB-INF/lib/

4) Restart ColdFusion
5) In the ColdFusion Administrator, add a new data source for your stored procedure, using the driver option Other
6) Enter the JDBC URL. It should be something like
jdbc:mysql://localhost:3306/myDatabaseName
7)Enter the Driver Class:
com.mysql.jdbc.Driver

8) Enter the MySQL username and password

9) Press the button to verify the settings

10) Run the code containing the stored procedure

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources