Re: C++ programming with MySQL
Posted by: Michael Griffith
Date: August 25, 2010 06:16PM

I'm having a problem with mysql_real_query. I have it executing the following SQL command:
source ./filename.sql
When I have it run that as the const char* the error says: 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 'source ./filename.sql' at line 1

When I run the same query inside mysql it executes fine. I decided to change the command to:
use databasename
And upon doing so it executed fine. Why can't I run source with mysql_real_query or mysql_query? Am I doing something wrong? Thanks.

Options: ReplyQuote


Subject
Views
Written By
Posted
896
August 25, 2010 09:34AM
364
August 25, 2010 11:58AM
337
August 25, 2010 12:18PM
Re: C++ programming with MySQL
482
August 25, 2010 06:16PM
363
August 25, 2010 09:08PM
444
August 26, 2010 08:04AM
445
August 26, 2010 08:52AM
489
September 01, 2010 04:39PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.