Hi there,
I hope somebody here can help me, as I have run out of ideas.
I am trying to export some data to SQL Server 2005 via ODBC. The data
consists, for testing purposes, of a single row and a single column. The
value itself is time, i.e. 08:20:54 (hh:mm:ss). I have created a test table
in SQL Server with a column of type DateTime. In the C++ application, I am
calling the SQLBindParameter() function and I pass the ValueType parameter
(4th parameter) as SQL_C_TYPE_TIME.
Since I pass only the time, and not the data, SQL Server automatically
inserts the current date. But the problem is that the seconds are always
stored as 00, rather than what I pass. So, if I were to pass 08:20:54, SQL
Server would insert the following: 10/11/2006 08:20:00. The same code works
fine when I export the same data to Oracle, in the sense that seconds are
stored correctly.
I set the DecimalDigits parameter of SQLBindParameter() to 0. I thought that
this might be the cause, so I tried setting it to other (higher) values, but
I still only seem to get 0 for the seconds.
Any advice?
Thanks,
--
Vlad Gerchikov
Software Developer
Angoss Software Corporation
416-593-1122 ext.2482
vgerchikov@angoss.com
Better Business Decisions. Every Day.T
www.angoss.com/products/strategybuilder.php Transform data mining into actionable marketing, sales and risk strategies
that drive revenues and lower costs
www.angoss.com/solutions/telemarketing.php Learn why telecom market leaders are selecting Angoss predictive analytics
systems for their B2B segmentation, targeting and bundle acceleration
www.angoss.com Visit us to register for Angoss Webinars, Evaluation Software, Whitepapers,
and industry Best Practices
This message contains information that may be privileged or confidential and
is the property of Angoss Software Corporation. It is intended only for the
person(s) to whom it is addressed. If you are not the intended recipient,
you are not authorized to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you received this
message in error, please notify the sender immediately and delete all copies
of this message.