dbTalk Databases Forums  

how to insert a TIMESTAMP field using SSQLS

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss how to insert a TIMESTAMP field using SSQLS in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Stephen Povilaitis
 
Posts: n/a

Default how to insert a TIMESTAMP field using SSQLS - 01-18-2006 , 02:32 PM






------_=_NextPart_001_01C61C6E.270B27B4
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

MySQL++ Luminaries,

Hello again.

Could you please help me insert a timestamp into one of my table fields?

For simplicity lets say my table DDL is:

CREATE TABLE test (id BIGINT NOT NULL , systime TIMESTAMP);

then in my C++

sql_create_2(test, 1, 2, =20
int, num, =20
mysqlpp:ateTime, systime)

test row(1, "CURRENT_TIMESTAMP");

query.insert(row);
query.execute();

My code will compile and run, but when I view the table my systime value =
is always 0000-00-00 00:00:00.

If I do a query.preview the value that is substituted for =
"CURRENT_TIMESTAMP" is always '0000-00-00 00:00:00'.

How can I insert the current system time? Do I need to change my DDL to =
something other than TIMESTAMP? And what do I need to do on the C++ =
side?

thanks again,

Steve Povilaitis

------_=_NextPart_001_01C61C6E.270B27B4--

Reply With Quote
  #2  
Old   
Warren Young
 
Posts: n/a

Default Re: how to insert a TIMESTAMP field using SSQLS - 01-18-2006 , 03:38 PM






Stephen Povilaitis wrote:
Quote:
How can I insert the current system time?
SSQLS currently doesn't have this feature, but information about a
proposed implementation is on the Wishlist. Search for "NOW".

Patches thoughtfully considered.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.