RE: Running a script using MySQL++

2002-03-12 Thread Roger Baklund

* Thi Cao 
 dropt database if exists sample;
  ^
Don't know if this is the reason for your problem, but it should be 'drop'.

-- 
Roger
query

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Running a script using MySQL++

2002-03-12 Thread Thi Cao

sorry, careless typing, but that's just a typo

-Original Message-
From: Thi Cao [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 12, 2002 10:48 AM
To: MySQL
Subject: Running a script using MySQL++


All,

I tried to run a script using MySQL++, but the procedure threw an exception
stating that there's something wrong with the syntax.  I did the following:

Connection conn;
Query query(conn);
Result result;

conn.connect(dbase,host,user,passwd);
query  source batch.sql;  //most likely the problem
result = query.store();

That's pretty much it, for the most important parts.  Below are the contents
of the batch.sql script:

dropt database if exists sample;
create database sample;
use sample;
create table one(col1 int, col2 int);

Am I not allowed to run a script using MySQL++ or did I execute the
procedure incorrectly?  Once again, thanks for your assistance.


Thi

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Running a script using MySQL++

2002-03-12 Thread Thi Cao

that's just a typo in the email message, however the script itself is
correct

-Original Message-
From: Thi Cao 
Sent: Tuesday, March 12, 2002 11:00 AM
To: Thi Cao; MySQL
Subject: RE: Running a script using MySQL++


sorry, careless typing, but that's just a typo

-Original Message-
From: Thi Cao [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 12, 2002 10:48 AM
To: MySQL
Subject: Running a script using MySQL++


All,

I tried to run a script using MySQL++, but the procedure threw an exception
stating that there's something wrong with the syntax.  I did the following:

Connection conn;
Query query(conn);
Result result;

conn.connect(dbase,host,user,passwd);
query  source batch.sql;  //most likely the problem
result = query.store();

That's pretty much it, for the most important parts.  Below are the contents
of the batch.sql script:

dropt database if exists sample;
create database sample;
use sample;
create table one(col1 int, col2 int);

Am I not allowed to run a script using MySQL++ or did I execute the
procedure incorrectly?  Once again, thanks for your assistance.


Thi

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Running a script using MySQL++

2002-03-12 Thread Sinisa Milivojevic

Thi Cao writes:
 All,
 
 I tried to run a script using MySQL++, but the procedure threw an exception
 stating that there's something wrong with the syntax.  I did the following:
 
 Connection conn;
 Query query(conn);
 Result result;
 
 conn.connect(dbase,host,user,passwd);
 query  source batch.sql;  //most likely the problem
 result = query.store();
 
 That's pretty much it, for the most important parts.  Below are the contents
 of the batch.sql script:
 
 dropt database if exists sample;
 create database sample;
 use sample;
 create table one(col1 int, col2 int);
 
 Am I not allowed to run a script using MySQL++ or did I execute the
 procedure incorrectly?  Once again, thanks for your assistance.
 
 
 Thi
 

Hi!

MySQL++ is C++ API and it can not run scripts.

The above string should contain a valid SQL command.

-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Fulltime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   ___/   www.mysql.com


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php