I'm creating a web application with membership and such. And I have some problem figuring out how to store locale and culture data. My application needs to know the following three things for every user: country (or region), prefered language and their timezone. Now, the country and language can easily be stored as a CultureInfo string (such as "en-US" or "sv-SE"). However, i'm probably going to need two columns in my database if say a person lives in the US (and therefore applies to US registration fees, etc) but want the site displayed in swedish (my app implements global resources).
So i guess (if no one objects to the above) my question is how do I store the timezone-data? There is ofcourse a System.Timezone class, but I'm not sure how to implement it. I obviously want my site to display the correct local time (all datetimes are stored as universaltime though). Is there a "universal" timezone-standard?
Hi everyone, I am storing statistics for different affiliate and merchant sites, and I have a few questions about how to store it. My first idea was to create a serializable array and store it in a statistics column with the rest of the site information. I could even have two columns, one being an archive, and one being the current month. I know these arrays would get quite large, but they would only be retrieved when someone was looking at the statistics. Is this a viable way to do it? The other idea I had was to create tables for each site and ad and store the statistics as rows in each objects respective table. While easy, I didn't know if it was a bad idea to have a very large amount of tables, ie., one for every advertisement and site signed up for the affiliate program. Thanks for all your expertise in advance and I look forward to contributing to this great community. Dave
MS SQLJust to confirm, I need to store the number of hours a user has spent doing something, am I correct using the smalldatetime field for the MS SQL database?I will eventually need to be able to calculate totals using SQL Reporting Services so it's important that the hours add up correctly (to 60 minutes, not 100).ASP.NETI'm trying to find the correct sort of formatting to use? Short time stores the time as 9:50AM, which isn't what i'm after.I need to store the hours as in 1 hour, or 01:00:00 (1 hour, 0 minutes, 0 seconds) or just 01:00 for 1 hour. I do need minutes but seconds are not required.I can't find the right formatting for this, would Long time be more suited?
Hello, We are just setting up SQL Server 2000 and wanted to keep track of all our server settings(everything needed for worst case scenario). Does anybody have a standard template that we could follow to record all our info?
I have a windows application that can change the language of the application depends on the language preference of the user. My application can switch between chinese(zh-CHS) and english(en-US). I also have a report that also can change the language (hopefully) if user change their language preference in the framework of my application.
I already follow the step provided in this link. http://technet.microsoft.com/en-us/library/aa964130.aspx
While the code is at http://mhprofessional.com/product.php?isbn=0072262397&cat=112&promocode=
Since I want to apply it in windows application and C#, i already modified to make it suitable with my application. I can successfully deploy and view my report if user key in (for testing purpose) the language they want in the report interface.
My problem is, I actually want to retrieve the value automatically from the framework. I try to retrieve the current language from thread.
namespace Mynamespace.RSLanguage.MultiLanguage
{
public class MyReports
{
private static ResourceManager LocalizeRM;
static MyReports()
{
LocalizeRM = new ResourceManager("Mynamespace.RSLanguage.MultiLanguage.MyReports", System.Reflection.Assembly.GetExecutingAssembly());
}
[System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.Assert, Name = "FullTrust")]
public static string LocalizedString(string stringIdentifier, string language)
But, the getLanguage value still get the "en-US" from the thread even though user change their language preference to chinese. So, it still deploy the report in english. But if user key in "zh-CHS" into the interface, the report will display the report like correctly.
How can I actually retrieve the current value for the language?
You might just be able to save me downloading and installing SQL Server French...
I'm having localization problems with some .NET code - and I might be able to solve the problem if I know how SQL is parsed in different locales. Say my table MyTable contains a float column FloatColumn. In English, I would say SELECT * FROM MyTable WHERE FloatColumn = 2.3
If my locale was, say for argument's sake, French, would I have to write SELECT * FROM MyTable WHERE FloatColumn = 2,3 ???
"The specified locale is not supported on this operating system." The error is being thrown at line: int returnValue = this.Adapter.Fill(dataTable);
in the autogenerated code of SqlMobileDataSet.Designer.
My machine is Win XP SP2 (Hindi LIP installed). I am running VS 2005 and SQL 2005 (RTM). I am testing using DMA transport on Win Mobile 5.0 PPC Emulator.
Could someone suggest what steps do I need to take to solve this issue?
Is there a way to specify the locale for a report subscription?
I'm using the CreateSubsciption method through the web service and need to address the "User!Language" item within my reports. Currently, it's always en-US. If I manually access the report manager and set up a subscription in there, the locale is correctly taken from my browser settings. I would like to tap into this for subscriptions.
I am having a problem with date formats in reports.
I have a two servers, one setup as En-US and the other En-UK in Windows. I have various reports that are rendered using the report viewer control in local mode.
In my reports I have not set a language on any text boxes or on the report itself (using Default option in VS 2005). As I understand reporting services should therefore use the locale set in the browser, or else the locale of the report server.
However, when viewing the reports, both servers display date time values in American mm/dd/yyyy format!
I do not understand this as I am using the local machine to view the reports and the so the locale of the browser and the locale of the OS are En-US and En-UK respectively.
Please could somebody provide some information on how to localize reports correctly.
I am working on an application that uses ADO to retrieve data from SQL Server 2005. It may be used against various instances of databases and each instance contains floating point values that may used comma (',') or point ('.') as decimal. This is where the problem occurs. Depending on the database instance the strings containing floating point values also use comma or point as decimal separator.
Is there a way that by which I can force the database to return floating points with decimals separated by point? Doing a prelimimary google search, I found hints of including "Locale Identifier" in the connection string such as
Hello there,I just want to ask if storing data in dbase is much better than storing it in the file system? Because for one, i am currenlty developing my thesis which uploads a blob.doc file to a web server (currently i'm using the localhost of ASP.NET) then retrieves it from the local hostAlso i want to know if im right at this, the localhost of ASP.NET is the same as the one of a natural web server on the net? Because i'm just thinking of uploading and downloading the files from a web server. Although our thesis defense didn't require us to really upload it on the net, we were advised to use a localhost on our PC's. I'll be just using my local server Is it ok to just use a web server for storing files than a database?
My company is implementing a multilingual solution for our application, so naturally the reports must follow. Every report I create has 2 datasets. It seems to me that the first dataset translates appropriately based on the browser's language setting, but the second dataset disregards the locale and just displays things in en-US. I've even created a sample report that accesses the exact same columns from the exact same view and dataset1 returns the correct language, but dataset2 returns en-US.
The report's language is set to =iif( User!Language = "fr-CA", "fr-CA", "en-US"), but I've also tried just setting it to = User!Language or leaving it at Default just to see if that would work.
Has anyone come across this before and been able to find a work-around?
Could not load file or assembly 'Microsoft.DataWarehouse, version 9.0.242.0, Culture=neutral,publicKeyToken=89845dcd8080cc91' - the system cannot find the file specified.
I get this message when I try to do a forcast from the Data Mining - Forecast menu.
Forecast from Table Tools, Analyse, Forecast works perfect.
Running Vista and using the DMAddins_SampleData workbook.
Hi, I am currently working on SQL server reporting. I have created custom assemblies. I am loading the custom assebly in the rdl file. I am getting following exception
An error occurred while executing OnInit: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. (rsErrorInOnInit)
Please let me know if anyone knows the reason. Thanks in Advance.
My query produces accurate results just produces one instance for each sales region. I am needing it to only give me one instance of each sales region and give me total counts. What should I re-write?
Code: Select salesmanname, case when [state] IN ('GA', 'FL', 'AL', 'SC', 'NC', 'TN') Then 'South' when [state] IN ('CA', 'NV', 'WA', 'OR', 'TX') Then 'West' when [state IN ('NY', 'NJ', 'PA', 'DL', 'CT') Then 'NE' end As [Sales Region]
Hello,I just installed a SQL server and playing with it. I was reading up onCollation and tried rebuilding the master database after changing toLatin 1. After the master database was built, I looked at the regionalsettings and realized that it was still English. When I tried tochange the settings again using rebuild database, I saw that myselection was gone and replaced by the default setting. Iam a newbieand any help is appreciatedThanks!Sunder
Is there a way to adjust a date and time depending on the users locale before inserting into the database?
Users login in and their country of residence is stored in the database on signup. My server is in the US and I want to reset part of the users db record when it's the end of the day in their country so I need to enter the date and time into the db plus or minus the time difference, is there a function written to do this already or would i need to write my own?
4 app servers with regional date and time settings of locale A.
1 database server with locale settings B.
What is happening is that timestamps are being generated on the app servers, these are then in a sql command which fails on the database server since the timestamp format is invalid.
It was suggested that we change the regional locale settings of the database server, but will this not have serious implications , for example every current timestamp format in the datbase will become invalid?
In a nutshell is it safe to change a database servers regional date time locale settings ? Or are there serious implications?
I have SQL Server 2005 Developer Edition. And my operating system is Windows Vista.
I have written a procedure in C# and deployed it on SQL Server. However when i try to run it i get the following error. System.Data.SqlClient.SqlException: The locale identifier (LCID) 16393 is not supported by SQL Server
Also I tried using same procedure in Windows XP machine and it workd fine. Can anyone help me what could be the problem?
Reporting services is configured to use a custom security extension in the following Environment.
Windows xp
IIS 5.0
when i go to http://servername/reports , the UIlogon.aspx page loads fine and i enter username and password. but i get logon failed.
when i go to http://servername/reportserver , the logon.aspx does not load and i get the following error message :
"Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
I have some troubles with IBM WebSphere Application Server using MS SQL Server 2005 JDBC Driver. I always get the error e.g. java.lang.SecurityException: class "com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData"'s signer information does not match signer information of other classes in the same package
I found this Feedback but it seems to be closed.
A temporary solution for me was to delete the meta-inf directory of the JAR-File, but that can't be the solution.
conn.Open(); . Everything works fine when I run it from my computer. When I try to run it from a network share I get the following error,
Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
I am using Visual Studio 2005 and .Net framwork v2.0.50727.
I have a report that uses some embedded custom code. The embedded custom code is a function that execute some sql query on a sql server database.Everything works fine in Visual studio. The report gets deployed on the server successfully, however when running the report from report manager i get the following error message :
The Hidden expression for the table €˜table1€™ contains an error: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Public function get_field() as string Dim myConnection As System.Data.SqlClient.SqlConnection Dim myCommand As System.Data.SqlClient.SqlCommand Dim data_reader As System.Data.SqlClient.SqlDataReader Dim field(100) as string Dim i as integer Dim j as integer Dim sql_field as string Dim nbr_field as integer Dim rtn_string as string
i = 0 sql_field ="Select field from mytable" myConnection = New System.Data.SqlClient.SqlConnection("Datasource=xxx.xxx.xxx.xxmydatabase;Initial Catalog=mydatabase;User Id=user1;Password=password1;") myConnection.Open() myCommand = New System.Data.SqlClient.SqlCommand(sql_field, myConnection) data_reader = myCommand.ExecuteReader() While data_reader.Read() if data_reader.HasRows then field(i)= data_reader(0).ToString() end if nbr_field = nbr_field + 1 i= i+1 End While data_reader.Close() myConnection.Close()
for j = 0 to nbr_field -1 rtn_string = rtn_string + field(j) + "," Next j
rtn_string = left(rtn_string,rtn_string.length-1) return rtn_string 'return sql_cmd 'return yes_no 'return lkupfield end function
I need to store a user ID of whoever made the last change to a record in a table. I have added a field with a default set to 'suser_sid()'.
Is it wise to store SID's in a database table if you are using NT authentication? My concerns are that if the user is deleted by the NT system administrator then I lose data integrety also if the database is backed up and restored onto a different machine with different users it won't work at all.
Hi, can someone help me with this problem. I have recently downloaded VWD and have been playing around with it a bit. I was windering how do I add an image file to a SQL database. I have used SQL in the past but I have never store an image in it. I can add text data and so forth, but I need some pointers into adding images to the sql database. I want to be able to store the images and then retrieve them to a GridView. I have the images in an image folder within the website, but I do not know how to input the reference or link to the images in an sql table. A quick example, say I have a table called Images, with the following info:imgID (int)imgDesc (varchar(max)imgFile (img)imgTitle (varchar(20)) To input this in sql I would write Insert Into Images (imgDesc,imgFile,imgTitle) Values ("Large fishy", "", "The Big Fish") what would I need to put for imgFile? I would really appreciate if someone can point me in the right direction.
Hi all! I am back with a new problem. I am designing a database in which the booking is on an hourly basis instead of daily basis. So I want my colums in a table to be like this: ================================ID(PK)Date(In this table I want date only)TimeSlot(in this table I want time only)CourtNo(facility which is to be booked)Booking ID(FK to booking table)================================
The thing is that SQL server donot have a date only format. I am totally stuck on this one, please help! The database which I created will be ideal if I can just store the date! Regards, Taimoor