<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>bobpeers -&#62; blog &#187; timestamp</title>
	<atom:link href="http://blog.bobpeers.com/tag/timestamp/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.bobpeers.com</link>
	<description>Better late than never</description>
	<lastBuildDate>Mon, 14 Jun 2010 12:19:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Insert TimeStamp Into Access Using C#.NET and C++.NET</title>
		<link>http://blog.bobpeers.com/2009/11/11/insert-timestamp-into-access-using-c-hash-net-and-cpp-net/</link>
		<comments>http://blog.bobpeers.com/2009/11/11/insert-timestamp-into-access-using-c-hash-net-and-cpp-net/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 08:02:35 +0000</pubDate>
		<dc:creator>Bob Peers</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[c++.net]]></category>
		<category><![CDATA[timestamp]]></category>

		<guid isPermaLink="false">http://blog.bobpeers.com/2009/11/11/insert-timestamp-into-access-using-c-hash-net-and-cpp-net/</guid>
		<description><![CDATA[There&#8217;s a rather strange difference between using C#.NET and C++.NET when using a parameter query to insert a TimeStamp into an MS Access database (field type Date/Time). The following C# code works perfectly. OleDbCommand cmd = new OleDbCommand(); cmd.Parameters.Add("@login_timestamp", OleDbType.DBTimeStamp).Value = DateTime.Now.ToString(); cmd.CommandText = "insert into myTable values (?)"; However when converting the same code [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a rather strange difference between using C#.NET and C++.NET when using a parameter query to insert a TimeStamp into an MS Access database (field type Date/Time).</p>
<p>The following C# code works perfectly.</p>
<pre>OleDbCommand cmd = new OleDbCommand();
cmd.Parameters.Add("@login_timestamp", OleDbType.DBTimeStamp).Value = DateTime.Now.ToString();
cmd.CommandText = "insert into myTable values (?)";
</pre>
<p>However when converting the same code to C++ you cannot just use OleDbType::DBTimeStamp as this results in an error when inserting the data, instead you have to use OleDbType::Date so the code looks like this.</p>
<pre>OleDbCommand ^cmd;
cmd=gcnew OleDbCommand();
cmd->Parameters->Add("@login_timestamp", OleDbType::Date)->Value = DateTime::Now;
cmd->CommandText = "insert into myTable values (?)";
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.bobpeers.com/2009/11/11/insert-timestamp-into-access-using-c-hash-net-and-cpp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
