c api mysql_query to insert into a column of type datetime.....

2004-06-01 Thread Bono, Saroj AA R62
I am using mysql_query to insert into a column which is of type datetime. My variable is stored in a char string. I need to put it into the query in a way that it can be inserted: myDate = "98-12-12".this is what I have. sprintf (myquery, '%what here? ', myDate); ..

mysql_server_init

2004-06-01 Thread Bono, Saroj AA R62
I have the call to mysql_server_init() cided exactly as it appears in the mysql manual sample. It returns 0 (success), yet the server is never sarted . I check that its not running by trying to type in the mysql command line (I had started the server normally before, started mysql, shutdown the ser

mysql_qury returns -1!

2004-05-28 Thread Bono, Saroj AA R62
Non zero indicates an error but the possible values are (from errmsg.h) Return Values Zero if the query was successful. Non-zero if an error occurred. Errors CR_COMMANDS_OUT_OF_SYNC Commands were executed in an improper order. CR_SERVER_GONE_ERROR The MySQL server has gone away. CR_SERVER_LO

location of created database

2004-05-28 Thread Bono, Saroj AA R62
When I created a database (directly in mysql) from some random dir where I started mysql, I found that it got created in the /var/lib/mysql dir. I ran mysql from a dir where my C++ program is. I wanted to create a database using mysql_query so I did mysql_query( &mysql, "CREATE DATABASE IF NOT E

query to see if db exists...........mysql_query( myQuery)

2004-05-27 Thread Bono, Saroj AA R62
I am going to use mysql_query() and want to find out if a certain database exists. If mysql_real_connect() fails there are many errors that could account for this. The database may exist , and I cant take the error returned from the failed query to mean the db isnt there and should be created. S

mysql_install_db problem

2004-05-26 Thread Bono, Saroj AA R62
I'm on Linux and had to install the myself server since that didn't work from the Linux install cd. When I run mysql_install_db I get "host name lookup failure" . Please configure the hostname. However in my Linux hosts table I DO have the localhost address. and if I do resolveip localhost from

mySQL on Win2K Need Assistan

2001-06-20 Thread Aa
and looking forward for your assiatance. regards Aa