|
-
November 10th, 2008, 01:53 AM
#1
Conversion DateTime datatype failed Sql Server 2008
Hello All,
I am getting this error "Conversion failed to when converting datetime string to smalldatetime data type" in Sql Server 2008 and my string is 20081110072938 .....I also tried with datetime data type in Sql server but same error.
Exception comes at query
sql.Format("Insert into trade values('%s','%s','%s','%s','%s','%ld')",
m_sTimeStamp,m_sTradeStatus, m_sTradeType, m_sTradeXML, m_sTradeKcc, m_nTrdNumber);
here m_sTimeStamp has the value 20081110072938 .
.. whereas same string is getting converted to datetime format in MySQL ... and working fine with MySQL...
I am doing all this in VC++.
Can anybody help me out of this...
Thanks
Last edited by param_joshi; November 10th, 2008 at 02:48 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|