Forum Themes:
Welcome !

 German/Spanish SQL Server installation problems

Author Message
Samuel

  • Total Posts : 11784
  • Reward points : 167750
  • Joined: May 23 '01
  • Status: offline
German/Spanish SQL Server installation problems Fri. Jul 1, '05 11:38 AM (permalink)
Q: When I install the software on the a German/Spanish SQL server, I get a lot of SQL errors about datetime value conversion, similar to the following:
converting datatype char to date-time, value out of range


A:In our software when we communicate with the database or whenever we need to use date literals, we standardize the format to ISO-8601 datetime format: yyyy'-'MM'-'dd HH:mm:ss However, certain versions of the SQL server do not understand this format, and so far they have been the German and Spanish versions.

Wolfram provided the following info that will solve this problem on the server side without having to modify our software at all (I slightly modified the info he provided):

Solution


When creating a new database on the SQL Server, it takes the default country settings - also when creating a new (security) user for the forum db. This means when creating the forum with the 'SQL Server Enterprise Manager' in a German environment, the 'datetime' fields of the tables will act in the format 'dd.MM.yyyy HH:mm:ss' - but the forum sw tries to write date/time information just like 'yyyy-MM-dd HH:mm:SS' - an exception is thrown.

To solve this problem, you have to change the default language of the (security) db user access to 'english' only. Here's the procedure to start a new installation if you are using the German version of the SQL Server:
  • start 'SQL Server Enterprise Manager'
  • select the sql server
  • select 'database': create a new database (example: 'dbForum')
  • select 'security / user': create a new database user (example: 'dbAdminForum') with 'SQL-Server authentification'
  • change 'Database' to the new database  name (example: 'dbForum')
  • change 'Language' to 'English'
  •  ignore the message box
  • select the new database (example: 'dbAdminForum')
  • add the new user to your database an select 'db_owner', 'db_accessadmin', 'db_securityadmin', 'db_ddladmin', 'db_backupoperator', 'db_datareader', 'db_datawriter' (actually you can get by with just 'db_datareader' and 'db_datawriter')
  • set the database permissions for the user (right click the new database entry, under 'Properties')
  • start 'SQL Query Analyser' for the new database
  • open the sql create script (for example: '2.5.5Unicode_Full.sql')
  • with F5 the script executes
  • close SQL Query Analyser and SQL Server Enterprise Manager
  • change the 'masterinclude.aspx' entries for the forum
  • start the 'default.aspx' in your forum folder

<message edited by Samuel on Thu. Jul 3, '08 11:25 PM>
ASPPlayground.NET
~ see our Version 4 plans here

 
#1
    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.9