.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

SQLSRV PHP returning "Changed language setting to us_english"

Posted By:      Posted Date: September 18, 2010    Points: 0   Category :Sql Server
We are getting an intermittent error and I hoping someone can help determine the cause or a workaround. We are calling sqlsrv_query() to execute a stored procedure. Sometimes the function returns false and sqlsrv_errors() returns this message: [Microsoft][SQL Server Native Client 10.0][SQL Server]Changed language setting to us_english. In the last 5 months, this has happened 6 times when calling 3 different stored procedures. The web site that does the database access is fairly busy, so you can see that this is very intermittent. I have seen a number of Internet sites that say that this is just information and can be ignored. But how can I ignore? sqlsrv_query() returns false. We are using: Windows Server 2008 and IIS 7 Microsoft Drivers for PHP for SQL Server v1.1 PHP v5.3.3 (was 5.3.2) FastCGI (these errors did not appear before switching from standard CGI about 5 months ago)

View Complete Post

More Related Resource Links

Returning a DataSet From a Web Services: Step-by-Step

This Example Shows how to create a webservice which returns a DataSet and a Client Which displays the DataSet in a Grid.


This Example Shows how to create a webservice which returns a DataSet and a Client Which displays the DataSet in a Grid.

Returning datas from two excel file



I used the below code to return the datas from one excel file. My question is if i suppose need to get the records from morethan one excel file using joins, how it is possible.

   string connString = ConfigurationManager.ConnectionStrings["xls"].ConnectionString;
        // Create the connection object 
        OleDbConnection oledbConn = new OleDbConnection(connString);
         // Open connection
            // Create OleDbCommand object and select data from worksheet Sheet1
            OleDbCommand cmd = new OleDbCommand("SELECT * FROM [Sheet1$]", oledbConn);
            // Create new OleDbDataAdapter 
            OleDbDataAdapter oleda = new OleDbDataAdapter();
            oleda.SelectCommand = cmd;
            // Create a DataSet which will hold the data extracted from the worksheet.
            DataSet ds = new DataSet();
            // Fill the DataSet from the data extracted from the worksheet.
            oleda.Fill(ds, "Employees");




Entity Data Model and database view returning the same columns as there are in a table


When adding a stored procedure into the Entity Data Model I can select whether the procedure returns a scalar, a (new) complex type or one of the entity types I already defined. 

How do I do something similar for a view?

I mean assuming I have a view like this

CREATE VIEW FilteredFoos as SELECT Foo.* FROM Foo join ... WHERE ...

(that is a view that implements some involved filtering, but returns all columns from one table) how do I add it to the project so that I can use the entity set, but get the Foo objects, not some new FilteredFoo objects.

var foos = myDB.FilteredFoos.Include("Bar").ToList();

foreach (Foo foo in foos) { ...

Thanks, Jenda

SPDataSource returning 0 results when used in CrossList Mode



I'm writing a web part in C# to query several document libraries, using a SPDataSource with the results going to a SPGridView.

I got the query to work just fine with a single document library, but when I switched the SPDataSource to CrossList mode (and added the "Web" and "Lists" tags to the query), I end up with no results. I've done a lot of digging around on the web for examples of how to do this correctly, but always end up with the same result, no hits.

These are the only properties I'm setting on the data source:


ds.DataSourceMode = SPDataSourceMode.CrossList;

ds.UseInternalName = true;

ds.SelectCommand = queryString;

The query string looks like this (I added the formatting for readability... the actual query string is all a single line):

<Webs Scope='SiteCollection'></Webs

Control Values When Returning to Page


Why do controls value not persist when returning to a page (e.g. via browser back button)?  If I set control values without utilizing a post back the controls will maintain their last value when I return to the page.  If I set a control value and then call a post back, the control value is reset to the default value when returning.

I have many pages with a gridview, and a textbox which is used to filter the gridview contents.  I set the filter textbox, filter the gridview (postback), go to another page, and when I return to the gridview page (via back button), my filter textbox is reset empty, and the gridview is the original (unfiltered) data.

What concept am I missing here?

Thanks in advance...

Action method returning an ActionResult used in a Action method


Hell all,

I have the Index action method calling a method that itself is an action method.

Example :

public ActionResult Index()
   //do stuff
   ActionResult result = MethodB();
   // ?? what to return here ??

public ActionResult MethodB()
   //do stuff

  return View("Index);

What to do in this case ?

VS2010 designer problems with custom markup extensions returning FontFamily

App.xaml: <Application x:Class="CustomMarkup.App"              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"              xmlns:int="clr-namespace:CustomMarkup"              xmlns:ext="clr-namespace:ExternalMarkupExt;assembly=ExternalMarkupExt"              StartupUri="MainWindow.xaml">     <Application.Resources>         <Style x:Key="MyStyle">             <Setter                  Property="Control.FontFamily"                  Value="{ext:ExtMarkupExt {x:Static int:Resources.FONTFAMILY_NAME}}"/>         </Style>     </Application.Resources> </Application> MainWindow: <Window x:Class="CustomMarkup.MainWindow"         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"         xmlns:x=&quo

EnumAvailableSqlServers() not returning version information

I am unable to consistently get full information from the smo call EnumAvailableSqlServers. If SQL Browser is running, it returns version info only for the local machine, never a remote machine. I've tested this from several different servers. It IS NOT a firewall issue, there is not firewall or any other restrictive apparatus/software between the servers. #load SMO assembly $v = [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SMO') # need version to load version specific SMO , makes code universal # credit to Allen White .. sqlblog.com $p = $v.FullName.Split(',') $p1 = $p[1].Split('=') $p2 = $p1[1].Split('.') if ($p2[0] -ne '9') { [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SMOExtended') | out-null [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SQLWMIManagement') | out-null } ################ [Data.DataTable]$instances = [Microsoft.SqlServer.Management.Smo.SmoApplication]::EnumAvailableSqlServers() $instances

WebFaultException throwing a "not handled by user code" error and returning an HTTP 500 to the clien

I am trying to return a BadRequest and simple message when implentation throws an error in a WCF REST service, but the WebFaultExcption itself is throwing an exception and returning an HTTP 500 instead. Any ideas on why this might be happening? Here is a short code snippet: [WebDispatchFormatter] [WebHelp(Comment="Initiate an immediate or callback appoinment request")] [WebInvoke(UriTemplate = "InitiateContact", Method = Verbs.Post)] public string InitiateContact(AppointmentRqst rqst) {      string ret = string.Empty;      rqst.DeviceId = Helper.GetHttpAuthHdrDeviceId();      try      {          ret = impl.InitiateContact(rqst);      }      catch (Exception ex)      {          throw new WebFaultException<string>(ex.Message, HttpStatusCode.BadRequest);      }      return ret; }

Returning custom error messages with an UserNamePasswordValidator

Ok, my head hurts from banging it against the wall. I'm new to WCF, I have searched for a solution for days, please help a desperate fellow programmer if you can :-( I have a WCF service hosted in IIS, I implemented a UserNamePasswordValidator, and it seems impossible to find a way to return a custom error message to the client when the user is not allowed in, this blows my mind. I have searched everywhere, many are asking the same question since 2006 and so far I haven't found an answer that works. If you are thinking of replying that it is not secure to return a custom error message to an unauthenticated client, please save yourself some time and don't do it. There are multiple enterprise business scenarios that this is required. Just in our organization an account could be locked out, in which case the user must be directed to the IT department to get it unlocked, it could be that the credentials are correct but the user hasn't paid their fees in which case they must be directed to the appropriate department, or it could even be that the user tried to access the service during a time of the day in which the service is not available. From searching around, I have tried doing the things below in the Validate method, however the client always receives a MessageSecurityException, which contains none of the custom messages that were originally thrown, neither in the object,

Error calling WCF service that is returning list.".Debugging resource strings are unavailable ......

Ok.this is just making me frustrated... Here is step by step of what I am trying to do (& not able to) 1. I am calling WCF service hosted in a SharePoint 2010 site from a silverlight app in same domain (So no cross doman I guess). 2. I use Linq to Sharepoint for querying the DB. 3. I am having a list "machines" in Sharepoint 2010 that is having a lookup column from Other list called "part" 4. My WCF method GetAllMachines() works perfectly well when it skips the lookup column "partname" & returns List of type machineitem. 5. But problem occurs when I add machineitemobject.parts.partsname in my Linq to Sharepoint query . My service gives the error not found Async_ExceptionOccurred] Arguments: Debugging resource strings are unavailable." 6. Note that return type of my Method is List<machinesitem> 7. The point to note here is that I use SPMETAL tool to generate the LINQ class that maps the lists . So When I try to query the lookup column it tries to add List item of the type class & that is what causing the error. Is it because I am not using datacontract in my service (but it returns the strings & all private members of machines list e.g. name,title etc) Is it making the attribute Serialisable will solve the error ??? I am kind of lost in it ...Plss help!!   Thanks

Procedure for returning Lift chart score

I am using decision tree with a mix of continous and discrete variables to predict a continous variable. Is there a procedure/function available to: 1. retrieve the score value generated by the lift chart>scatter plot 2. to mimic the GUI functionality under Mining Acccuracy Chart>Input Selection>Specify a different data set. For example the procedure would take in the Model Name, DataSet/View with the testing data and return the Lift Chart score for the testing data specified In summary, I am trying to call the 2 steps above programmatically instead of using the GUI.. i.e., of selecting a different dataset for a particular model to retrieve the lift chart score. Using the scores, I intend to monitor the accuracy of the model continously over a period of time in the future to see if the data structure/rules have changed and model needs a retrain/rebuild. Thanks    

Html.BeginForm and Returning Model

Any idea how can View return model(myModelValues) on the click of submit button,aspx code     <% Html.BeginForm("submit", "RenewalManager", FormMethod.Post); %>    <input type="submit" name="submitButton" onclick=" return confirmReject()" value="Test" />    <% Html.EndForm ( ); %> controller code        public ActionResult submit(string submitButton)        {            switch (submitButton)            {  //Cases...                case "Test":                    // call another action to perform the cancellation                     return (Confirm());  //...             }        }        public ActionResult Test()        {  

Search query returning 0 results

I'm using a query which returns 0 results but was working some weeks ago.  I checked the code and nothing has changed since then.  I created a Search Center Site on another port and using the same terms I get many results there.  I checked my scopes and they are all right. Nothing changed there either. Could someone help me figure out what may be the problem in my query.  Or maybe it's my Scopes/Content Sources configuration. SELECT URL, FileName, Title, Description, Rank, Size, HitHighlightedSummary, Path FROM SCOPE() WHERE freetext(defaultproperties, ' +légumes')  AND ( "scope" = 'Scope - My Portal - All Site - fr'  )    ORDER BY Rank DESCDaniel Siconnelli There is neither good nor evil... only mogwais and gremlins

SharePoint Server 2010 Search - not returning results but crawling without errors

I have created a Search Service Application on a SharePoint Server 2010 (RTM) Farm and used the default Content Source. I started a Full Crawl and it suceeded with no errors etc. I ran it a few times and no issues. But if I go to the Intranet Portal Web Appliaction and do a search for a document that would have been crawled it does not show up in search results...nothing does. I am not getting any errors in Event Log or ULS Logs relevant to Search. How can I troubleshoot this problem further?SharePoint Solution Architect, Perth Australia - Microsoft Virtual Technology Specialist - MCTS WSS Dev, WSS Adm, MOSS Dev, MOSS Adm - http://wss.made4the.net/ - Founder of http://www.sharepointdevwiki.com/

T-sql returning a specified # of rows.

I dont know why this works but it does except I cannot execute it from the Dataset page.   It give me an error that @Count needs to be defined or Set is not valid Set  ROWCOUNT @Count  SELECT Prodid from Prod @Count is a parameter and if I set it to 100 I get the 1st 100 rows, which is what I want.  If I can run it from the Preview tab and it works why can't I run it from the Dataset tab. Is there a better/correct way to structure the query  

Sharepoint Designer need help returning Variables

Ok I am nearly there now with my holiday request form I have two lists one the is called annual leave reamaing this has the following columns Employee Name: Text Total Days: Number Days Taken: Number Days Remaining: Calculated Total Days - Days Taken and the other is the holiday booking form Employee Name: data taken from Employee name on annual Leave remaining Date From: Date Date To: Date Total days Taken: Number I am creating a workflow in sharepoint designer that when a new item is submitted someone gets tasked to approve or reject the holiday. If they approve it the annual holiday remaing list gets updated with the new days that are remaining and the user who created the item recieves an email also stating how many days that they have left, I had this working fine in Sharepoint 2007 however the variables that i am creating to capture data do not seem to be working properly. If i do a calculate in designer which is days requested plus days taken i get the input box called lookup for number displayed where i can pick the variables that i want to calculate but there is a new box at the bottom now which gives me the following choices As Double lookup Value (as Number) User ID (as Number) My ones are set to as double im not sure what they actually mean but it seems what ever i set them as i am not getting the correct information back. Lets say that a user books 10 days they ha
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend