Does this fix it?
 insert into each_transaction(datetime) values(datetime('now'));


--- teoh <[EMAIL PROTECTED]> wrote:

> 
> create table each_transaction(datetime int);
> 
> insert into each_transaction values( datetime('%s',
> 'now'));
> 
> this is how I create table and insert the
> strftime('%s', 'now'). But when I did query with
> sql3_plus. 
> 
> sqlite3::reader reader=con.executereader("select *
> from each_transaction;");
> while(reader.read())
> {cout << reader.getcolname(0) << ": " <<
> reader.getstring(0) << endl;  }
> 
> 
> I get output like this:
> 
> datetime: á "     <----- invalid 
> 
> 
> Any idea?  coz If I change to
> datetime('now','localtime');
> everything is ok. I only cannot use strftime('%s',
> 'now') for "insert" statement.
> 
> I tried out the pre-compiled command-prompt sqlite but
> doesn't faced with this problem. The sql_lite that i'm
> using to do the above test was static lib compiled by
> me using dev-cpp. I even tried out linking directly
> with .dll but the result still the same, unexpected
> output. 
> 
> thakn you for reading and clarifying my mistake.
> 
> 
> 
> 
> 
>               
> __________________________________ 
> Do you Yahoo!? 
> Yahoo! Mail - Helps protect you from nasty viruses. 
> http://promotions.yahoo.com/new_mail
> 


=====

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

"Lord Tarlington gazed upon the crazed Egyptian hieroglyphics on the walls of 
the ancient tomb of the petrified pharaoh, he vowed there would be no curse on 
him like on that other Lord, unless you count his marriage to Lady Tarlington 
who, when the lost treasure was found, will be dumped faster than that basket 
in the bulrushes."
  Melissa Rhodes
---------------------------------

The Castles of Dereth Calendar: a tour of the art and architecture of Asheron's 
Call
http://www.lulu.com/content/77264


                
__________________________________ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 

Reply via email to