Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, November 22, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 External Development Forums - SalesLogix OLEDB Provider
Forum to discuss using the SalesLogix OLE DB Provider from external applications (including usage of built-in provider procedures). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix OLEDB Provider | New ThreadView:  Search:  
 Author  Thread: DST problem with SLX OleDb Provider
Dave N
Posts: 13
 
DST problem with SLX OleDb ProviderYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 Oct 08 4:16 PM
We are having a very strange problem with the OleDb provider. It seems to not be adjusting for DSt correctly. Here's a code snippet:

System.Data.OleDb.OleDbCommand oleDbCommand = new System.Data.OleDb.OleDbCommand("INSERT INTO C_TIME_TEST (C_TIME_TESTID, DateTimeField) VALUES (?, ?)", connection);
DateTime value = DateTime.Now;
//value = new DateTime(value.Year, value.Month, value.Day, value.Hour, value.Minute, value.Second);
oleDbCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("@TestId", System.Data.OleDb.OleDbType.VarChar, TestId.Length, "C_TIME_TESTID")).Value = TestId;
oleDbCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("@DateTimeField", System.Data.OleDb.OleDbType.DBTimeStamp, 8, "DateTimeField")).Value = value;

oleDbCommand.Connection.Open();
try
{
oleDbCommand.ExecuteNonQuery();
}
catch (Exception exc)
{
response.Writeline(exc.Message);
}
finally
{
oleDbCommand.Connection.Close();
}

Pretty simple. Here's what I am seeing:
1. the date is being shifted incorrectly. If 'Adjust for DST' is set on the computer then dates before Nov.2 are shifted forward one hour. If 'Adjust for DST' is not set then the dates are fine
2. if I create the date manually from DateTime.now everything works. See commented code above.

It really seems that there is a bug in the SLX OleDb provider. Any advice?

Dave
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: DST problem with SLX OleDb ProviderYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 Oct 08 3:24 PM
DateToISO for SQL Statements......
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/22/2024 5:15:51 PM