Databases :: Case Sensitive Sorting When Running A Query?
Mar 4, 2010
When doing a query e.g. "select ID from myTable order By SomeStringField" from SQL Developer my data the data are sorted correctly according to database settings:
Abc
abc
Bcd
bcd
But when using the System.Data.OracleClient namespace and a DbProviderFactory to create a DbCommand and use that to create a DbDataReader, the data is sorted case sensitive:
Abc
Bcd
abc
bcd
Is there some setting on the command which needs to be set? Can you even change the case sensitivity in the .net framwork, overriding the database settings?
I am using ASP.NET 2.0 and C#. I would like to know if the Session variables are Case-sensitive.
Is Session["StudentId"] and Session["StudentID"] considered the same.
Which would be the proper way to access the session details, when in a page someone passes data as Session["StudentId"] and somebody else passes as Session["StudentID"]?
we are making a project to run in ASP.Net on Mono/*nix Our problem is that we develop on Windows, and we just build and test it every so often on Mono. So we have been having a lot of trouble recently with case sensitive filenames. Everything seems to work good in Windows and then we move to Mono and it's silently broken.(as in, it builds but won't run or parts of it don't work)
How would you recommend that I detect this while we are developing on Windows? Basically, how do we make the case-sensitive filenames look wrong in our code where the code works on Windows but not *nix?
To start with then we have a LinkButton whose text is actually an image tag. The image it links to is a Png and resides in a folder in the web directory. This is IIS V6 and win Server 2003.
The path is [URL]
Admin is a virtual directory configured in IIS.
The above url doesn't work but if you change it to [URL] (lowers case 'a') then the image is served, change it back to 'A' and it takes you to login, you log in and it loops back to log in. change to 'a' and voila the image is served. Weirdly this problem doesn't always occur and I have hunted for a resolution for days to no avail.
I have a validator on a textbox that validates against a list to ensure that the user doesn't input the same name. When testing it, if I type in the same name including the same case structure, it returns an error. If I change one letter to a different case, it doesn't return an error but rather my SQL server returns a duplicate error. How do I change the server-side validator so that it picks up duplicate names regardless of case?
i'm trying to host an .net framework4.0 application in IIS7. i got an error while clicking on the manage module in modules .like ("Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive. ") .I changed my application poll to .net4.0.I am able to browse my application
I installed Microsoft Visual Studio 2010 Ultimate Trial and converted existing asp.net 2.0 web application and I am getting this error: znrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive. It's coming from this section in the web.config which was auto-generated by VS2010 when I converted the project:
I am executing a long-running Oracle stored procedure from .NET. The procedure takes about three hours to run. Ideally, the user should be able to kick off the procedure, close the browser, and come back later to check the results.
The problem is that the connection to the Oracle procedure is lost after exactly an hour. As you would expect, the Oracle procedre runs to completion if it is executed from SQL Plus. Strangely enough, it will also run to completion if I run in debug mode on my local machine (I start two threads, one of which executes the procedure. I set a breakpoint on the second thread).
Here is my connection string:
data source= (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=serverx)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=TestSID)))
I am a biggner in SQL DB . but i started a complicated and painfull work in SQL SERVER 2008. the problem convert Oracle hierarchical query to SQL query. the query
SELECT DISTINCT LEVEL LVL, SCH.NSCHEDULE_SL, SCH.NSCHEDULE_SL_FM, SCH.CSHED_CNAME FROM FA_SCHEDULES SCH WHERE LEVEL = 1 AND NSCHEDULE_SL_FM IS NULL AND NBRANCH_SL = 2 CONNECT BY PRIOR SCH.NSCHEDULE_SL_FM = SCH.NSCHEDULE_SL AND NBRANCH_SL = 2
I have my project set up with the virtual path "/MyVirtualPath", create the virtual directory in IIS 6 (W2003) and everything works fine. Then to work better with Google Analytics I change the virtual path "/myvirtualpath" and change all redicecciones and links to lowercase. also applies the class "lowercase route urls in aspnet mvc" and works perfectly.
The problem I had to modify the virtual directory in IIS, delete virtual path "/MyVirtualPath" and I created the new "/myvirtualpath", but in all cases I use tilde "~" or where I make a "RedirecToAction" (which should take "LowercaseRoute"), continues to maintain the virtual path "/MyVirtualPath". For example, if I see the HTML source code in the browser, see "/MyVirtualPath/Content/Site.css" instead of "/myvirtualpath/Content/Site.css. "
I am trying to return an object from a web service and having trouble with the sorting. See the code below where the Order By is a.Account_Number. I need to be able to replace that with a the dynamic value strSort that is being passed to the function.
I want to test the Oracle and SQL servers running are Up or Down. Currently, I am using the following way to check the connection.. for example Oracle connection as ..
Dim cn As OracleConnection cn = New OracleConnection(ConnStr) cn.Open()
This is working fine. But, is there any other way to check the DB up status like Ping.
I have a sql datasource with the ControlParameter called ddlDropDownList.
2 questions:
1. Is my syntax below ok, I am getting a runttime error that the syntax is incorrect.
2. I have the select statement set up the control parameter to get the selected value from the dropdownlist as shown below, is that syntax correct? especially the "selectedItem.value" for the propertyname property.
there is broblum for uploading excel sheet when my application runing on local host but there is no problum on vs enviroment . i am using the following connection string code
What should i research in order to accomplish this task?
I am using MS-SQL & VB.Net
I have a SQL table that stores startdate and enddate. I want to run a query on that table every 10 minutes in order to check if the enddate is greater than today and if it is I would like to add a 1 to another column if it is not I would like to add a 0.
I've been having an issue with running an SQL select statement with a button. At the moment, my page has two buttons and allows both to run the gridview where my SQL data displays. In my asp page I have:
In the C# code, I have methods for OnLoad and btnGo1_Click, but I'm pretty new to programming and don't know how to link the methods to the button I created.
The below SQL query is running extremely slow. Im using this query on other tables and its processing about 5 rows per second. The below version is running 1 row every 10 seconds when @SQLNew is executed.
I have a datasource (which is a query) that could run more than 30 secs. I want to show to a user an animated icon (I have it already) while the Gridview is waiting to return data.
I studied several tutorials and textbooks but all just "thoerectically" use a timer to simulate, without much application to real example above. How should I code it in the above real scenario ? In which event handler to put the code and what control (Update panel) to use and any sample code ?
I want to start a new thread to query a database while my web application continues running. I was under the impression that by using threads I can run the querying process independently while the normal web application page cycle carries on, but I could be wrong.
public class DbAsyncQuery { Dictionary<string, object> serviceResults = new Dictionary<string, object>(); public void UpdateBillingDB() { QueryAllServices(); foreach (KeyValuePair<string, object> p in serviceResults) { IEnumerable results = (IEnumerable)p.Value; IEnumerable<object> sessions = results.Cast<object>(); DbUtil.MakeBillingDBEntry(sessions, p.Key); } } public static string[] servicesToQuery = new string[] // Must go in config file ultimately { "xxx.x.xxx.xx" }; public delegate void Worker(); private Thread worker; public void InitializeThread(Worker wrk) { worker = new Thread(new ThreadStart(wrk)); worker.Start(); } public void InitializeQuery() { Worker worker = QueryAllServices; InitializeThread(worker); } private void QueryAllServices() { Dictionary<string, DateTime> lastEntries = DbUtil.GetLastEntries(); foreach (string ip in servicesToQuery) { string fullServicePath = "http://" + ip + ":800/MyWebService.asmx"; //object[] lastEntry = new object[] { lastEntries[ip] }; object[] lastEntry = new object[] { new DateTime(2011, 1, 1, 0, 0, 0) }; object obj = WebServiceHandler.CallWebService (fullServicePath, "MyWebService", "GetBillingDBEntries", lastEntry); serviceResults.Add(ip, obj); } } }
It seems to basically stall and wait to finish the query before loading the page (which can be thousands of rows, so it takes awhile). I put this in the following section of Global.asax:
This is one of my first web pages, and I'm new to threading. I understand there is a difference between creating your own thread and using the ThreadPool. In this method, I am using my own thread, I think. Not sure if that's the best way. The querying process can be completely independent, and its only going to occur on scheduled intervals (every 8 hours or so). The user doesn't need to have up to the minute data, so it can take awhile. I just don't want the site to wait for it to finish, if that's possible.
I have one query which is not responding even after 4 minutes. But same query is when called from asp.net pages (though stored procedure), responds within 10 seconds. My Query:
[Code]....
I don't want to know the ways to optimize the query as I have already changed the query and now it responds within fraction of second. I just want to know that, why it was not reponding after 4 minutes in SQL Management Studio and responds in just 10 seconds when run from asp.net through stored procedure. I am using SQL 2008 Express with Advanced services and .NET 3.5.