PC Review


Reply
Thread Tools Rate Thread

DirectX interferes with ODBC?

 
 
=?Utf-8?B?Tm9ycnRvcnBldA==?=
Guest
Posts: n/a
 
      12th Apr 2005
I have noticed a very strange effect that DirectX has on ODBC data storage.
Storing a DateTime object in a database is normally not a problem, but once a
Direct3D device is created the stored times only have a 5 minute resolution!

A few steps are required to reproduce the problem. First create a Microsoft
Access ODBC data source. Connect to it in the following way:

OdbcConnection connection = new OdbcConnection( "DSN=TestDB" );
connection.Open();

Add a table with a single DateTime column:

OdbcCommand cmd = new OdbcCommand( "CREATE TABLE TestData ( Stamp DATETIME
)", connection );
cmd.ExecuteNonQuery();

Insert the current time:

OdbcCommand cmd = new OdbcCommand( "INSERT INTO TestData(Stamp) VALUES (?)",
connection );
cmd.Parameters.Add( new OdbcParameter( "Stamp", OdbcType.DateTime ) );
cmd.Parameters["Stamp"].Value = DateTime.Now;
cmd.ExecuteNonQuery();

So far everything works as expected. Now create a Direct3D device:

PresentParameters para = new PresentParameters();
para.Windowed = true;
para.SwapEffect = SwapEffect.Discard;
Device dev = new Device( 0, DeviceType.Hardware, this,
CreateFlags.SoftwareVertexProcessing, para );

Insert a new date/time in the database and you will notice that the stored
time is no longer correct.
Does anyone have a clue about what is going on?

For the record: I'm using Framework 1.1 and DirectX 9.0c.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I install DirectX 9.0c over DirectX 9.0b (my current versio KiotieII Windows XP Games 2 7th Apr 2009 09:31 PM
DirectX SDK and References: using Microsoft.DirectX Diego_Atos Microsoft C# .NET 2 14th Sep 2004 04:42 PM
Backing out directx 9 to directx by re-installing Ginny Microsoft Windows 2000 Multimedia 0 8th Nov 2003 09:45 PM
DirectX question: how resolve: using Microsoft.DirectX; dave Microsoft C# .NET 1 10th Oct 2003 06:06 PM
DirectX 9.0A end-user runtime and Managed DirectX. Tom Microsoft Dot NET 0 3rd Jul 2003 03:40 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:25 PM.