I am using Visual C++ 6.0 in Windows 2000.  I am able to compile
successfully. The following code(s) does not give output as documentation
specified.

Problem1 :

For documentation, please look at
http://www.mysql.com/documentation/mysql++/7_Specialized.html (7.7
sql_create)

For example documentation says "equal_list() returns a comma separated list
with the format field name = value. The field name is not quoted or escaped
and value is escaped or quoted as needed. "

But quotes are not added for strings.

-----------------------------------------------------------------

#include <sqlplus.hh>
#include <custom.hh>

sql_create_5(stock, 1, 5, string, item, int, num,
      double, weight, double, price, Date, sdate)

int main()
{
 stock s("Dinner Roles",75,0.95,0.97,"1998-05-25");
 cout << "Value List: " << s.value_list() << endl;
 cout << "Field List: " << s.field_list() << endl;
 cout << "Equal List: " << s.equal_list() << endl;
 return 0;
}
-------------------------------------------------------

Problem 2:
In the documentation, 4.7 Template Queries, (
http://www.mysql.com/documentation/mysql++/4_Tutorial.html#SECTION0317000000
0000000000)

The below line is wrong in the sample.
query << "insert into %5:table values (%q0, %q1, %2, %3, %q4)";

It should be changed to
query << "insert into %5:table values (%0q, %1q, %2, %3, %4q)";
--------------------------------------------------------------------

Can you please somebody update the document?

Radha

----- Original Message -----
From: "Sinisa Milivojevic" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, March 12, 2002 12:23 PM
Subject: Re: MySQL++ samples are not working?


> Radhakrishna Mohan Tadepalli writes:
> > Thanks for your reply. I do not have any problem in compilation. My
problems
> > are with double quote characters, single quote characters and
insufficient
> > help. Is there any way I can supress exceptions?
> >
> > Here is one of the problems I am facing when try to run a sample.
> >
> >  The sample compiles with 0 errors. When I run the sample it gives
> > error message "Error: You have an error in your SQL syntax near '%q0,
%q1,
> > 1.25, 1.1, %q4)' at line 1."
> >
> > Then I removed 'q's. Still it is giving run time error. Also there is no
> > help on execute().
> >
> > Thanks,
> > Radha
> >
>
> You must escape your strings that contain quotes.
>
> What compiler do yo uuse ??
>
> --
> 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


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.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

Reply via email to