Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Language and In...Language and In...forms Authentication, SQL Server, and Languageforms Authentication, SQL Server, and Language
Previous
 
Next
New Post
5/1/2009 12:11 PM
 

The way its setup right now, our DNN installation uses forms authentication for the website. But SQL Server is using a common SQL Login for everyone. Thus the database is still returning dates, errors, etc in English.

Is there a way to tie SQL Server connections into the forms authentication model so that the SQL Server connections match the locale of the user logged into the website?

If not, what are some of your solutions to getting SQL Server to recognize the locale of the logged in user when using forms authentication?

We have thought of always setting the "SET LANGUAGE Language" before each database command... but we would like to hear some more input on other alternatives.

Thank you


Dylan Barber http://www.braindice.com - Dotnetnuke development classes - skins and modules
 
New Post
5/1/2009 2:54 PM
 

Where are you having these issues, in custom modules?

If you output dates with the CurrentLocale options DNN should handle the conversions for you. As for SQL errors, do you really want to return those to end users anyways?


Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
5/1/2009 3:35 PM
 

We are trying to avoid future issues in our custom modules. Right now we do not have any multi-culture support for anything. I didn't mean to imply I care about the error messages, we do not pass the SQL error to the user. Ideally I will use "set dateformat dmy" instead of "set language Spanish" for example

The problem is we pass date strings straight into SQL, and SQL is expecting a USA DateTime (mdy) but a spanish string (dmy) is being passed in from the date picker on the screen: SQL throws conversion error.

Yea, we should have written our code differently to not pass strings into SQL.

Is there any clever way to get SQL to recognize the PreferredLocale of the DNN user?


Dylan Barber http://www.braindice.com - Dotnetnuke development classes - skins and modules
 
New Post
5/2/2009 9:38 AM
 

Dylan,

you should pass number and datetime values as parameter to stored procedures, not text, which needs to be interpreted in the database - and same vv. formatting / interpretation of user input shall be done in UI according to user settings. Thus you avoid any language problems in sql code and are able to cache  data. Ditto, to avoid timezone issues use UTC for all timestamps and adjust according to user settings in UI layer.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Language and In...Language and In...forms Authentication, SQL Server, and Languageforms Authentication, SQL Server, and Language


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out