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


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

Divide by zero error encountered.

Posted By:      Posted Date: September 14, 2010    Points: 0   Category :Sql Server
 
My code is: SELECT * FROM ( SELECT 20 AS Overdue_Amount, 100 AS Credit_Amount UNION ALL SELECT 0 AS Overdue_Amount, 0 AS Credit_Amount ) T WHERE Credit_Amount=100 OR (Credit_Amount>0 AND Overdue_Amount/Credit_Amount>0.1) And I got following error: Msg 8134, Level 16, State 1, Line 1 Divide by zero error encountered. If I change it like this: SELECT * FROM ( SELECT 20 AS Overdue_Amount, 100 AS Credit_Amount UNION ALL SELECT 0 AS Overdue_Amount, 0 AS Credit_Amount ) T WHERE Credit_Amount=100 OR (ISNULL(Overdue_Amount/NULLIF(Credit_Amount,0),0)>0.1) So my quesion is "Why I encountered error when exec first snippet? What happened?"


View Complete Post


More Related Resource Links

Error: Encountered multiple versions of the same assembly with GUID...try pre-importing...TlbImp

  

Hi!  Can someone tell me how I can troubleshoot the following error: "Encountered multiple versions of the same assembly with GUID...try pre-importing one of these assemblies".

The website developed in VS 2010 (.Net 3.5). This error is only received on my workstation.  Another person developing the site does not experience this issue at all.  Also, not sure if this matters, but on my workstation the 'Assembly Information...' dialog contains no values even though the 'AssemblyInfo.vb' file does specify values for the title, desc, etc.  The GUID being referenced in the error is the main project of the three projects within the solution.

I tried looking through the GAC, but do not see any references to the projects or DLLs in the VS solution and am not sure what else/where to look.

If I delete the copy of the solution on my local machine and pull down a copy from source control (AnkhSVN) the solution will build with no error.  Once I make any changes, such as adding a new aspx file, then the error is received.

I can provide any additional information needed.


2008 R2 Tuning Advisor reports "Error: Exception encountered(DTAEngine)"

  
I am encountering an error when I try to use the SQL 2008 R2 Database Engine Tuning Advisor. I create a very simple workload (either by right-clicking a query in SSMS or by loading a file), and click Start Analysis.  In the "Consuming Workload" step DTA aborts, and in the message column displays "Error: Exception Encountered(DTAEngine)". When I click on the error message, I get a dialog box with a title of DTAEngine, and a message "Error: Exception encountered". This is a clean test environment (SQL 2008 R2 Data Center Edition 64-bit, on Windows Server 2008 R2 64-bit, in a VM) against a local database. Any ideas about what the problem is or how to resolve it? See below for detailed version information: 10.50.1600.1 RTM Data Center Edition (64-bit) Database Engine Tuning Advisor      10.50.1600.1 Microsoft Data Access Components (MDAC)      6.1.7600.16385 Microsoft MSXML      3.0 6.0 Microsoft Internet Explorer      8.0.7600.16385 Microsoft .NET Framework      2.0.50727.4952 Operating System      6.1.7600    

SQL server setup has encountered the following error: The given key was not present in the dictionar

  
For various reasons I have installed and uninstalled SQL Server 2008 developer on my vista machine.. I just received this error after clicking the installation > New SQL Server stand alone installation ....link in the Installation Center SQL server setup has encountered the following error: The given key was not present in the dictionary I had to uninstall and reinstall because the analysis services install failed so I wanted to reinstall.

InfoPath Form: Encountered error while trying to submit the form from the browser

  
Hi,I have created a form in InfoPath, and i filled in the form in the browser. But there's an error apppeared when i tried to click on the submit button to submit the form. May i know is there ways for me to check what cause this error because i have no idea about this. "There has been an error while processing the form. There is an unclosed literal string. Line 1, position 543. System.Xml.XmlException: There is an unclosed literal string. Line 1, position 543. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String arg) at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr) at System.Xml.XmlTextReaderImpl.ParseAttributes() at System.Xml.XmlTextReaderImpl.ParseElement() at System.Xml.XmlTextReaderImpl.ParseElementContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at Microsoft.Office.InfoPath.Server.Xml.InfoPathXmlDocument.Load(XmlReader reader) at Microsoft.Office.InfoPath.Server.DocumentLifetime.DataObject.<>c__DisplayClass3.<.ctor>b__0() at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.Exception

Incomplete/truncated data Serialized to disk. Error:End of Stream encountered before parsing was com

  
Greetings!! i have a dataset which is constantly serialized & deserialized by multiple threads (in a thread safe manner using lock statement) using System.Runtime.Serialization.Formatters.Binary.BinaryFormatter (.net 2.0). The Code below works pretty fine but in some rare scenarios it gives the above exception while deserializing. public void SerializeData(string path, DataSet currentData) { dataStream = new FileStream(path , FileMode.Create, FileAccess.ReadWrite); try { biFormatter.Serialize(dataStream, currentData); } finally { dataStream.Flush(); dataStream.Close(); } } DataSet DeserializeData(string path) { dataStream = new FileStream(path , FileMode.Open, FileAccess.ReadWrite); DataSet storedDataSet = new DataSet(); storedDataSet.Locale = CultureInfo.InvariantCulture; try { storedDataSet = (DataSet)biFormatter.Deserialize(dataStream); } finally { dataStream.Close(); } return storedDataSet; } When i observed the serialized file i realized the file had some in incomplete/truncated data. The truncated file loo

ASP.net Web Site Administration Tool. An error was encountered. Please return to the previous page a

  
I have just installed Visual Studio 2010 trial. Previously I have been using Visual Studio Web Developer 2010 Express. Now every time I try to invoke the ASP.net Cofiguration tool either via the icon or through the Project File Menu item, I get the error message "An error was encountered. Please return to the previous page and try again." I am trying to develop a bog standard Silverlight Business Application. There are no other diagnostics. Is there anywhere I can look for more clues or anything else to do to alleviate the problem? or is this something peculiar to the trial version I am using?   I also think it might have something to do with the fact that I have created this Silverlight Business App on a directory on my D: drive and not the normal, default c: drive path and maybe the web sit admin tool is looking somewhere else. Could this have something to do with it? If so what is my remedy?   Help please.....

Microsoft SQL Server 2005 -- Error 29528. The setup has encountered an unexpected error while Updati

  
Hi This has me somewhat perplexed! I am attempting to install a SQL Server 2005 KB970894 patch (having downloaded the patch to apply it locally rather than using Microsoft update - which also fell over) . It updates all but Database Services! I am receiving "Microsoft SQL Server 2005 -- Error 29528. The setup has encountered an unexpected error while Updating Installed Files. The error is: The system cannot find the file specified." Things I have checked: I am running this on Windows Server 2003 R2 as a Domain Admin I have checked that the SIDS are current for the Local User Groups using PSGetSid as listed in the microsoft support article http://support.microsoft.com/kb/925976 Having set "Show Hidden Files" in Folder OptionsI can't find the file C:\WINNT\Installer\MSI1DC.tmp (however it may have bee removed during a "clean up"). Any ideas? Please email john@rickatson.com Extract from SQL9_Hotfix_KB970894_sqlrun_sql.msp.log: CustomActionSchedule(Action=CAFTEInstallFTERef.68C6D15C_77E0_11D5_8528_00C04F68155C,ActionType=1025,Source=BinaryData,Target=InstallFTERef,CustomActionData=F:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\FTERef\|F:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData\) MSI (s) (9C:D4) [12:35:48:144]: Invoking remote custom action. DLL: C:\WINNT\Installer\MSI1DB.tmp, Entrypoint: InstallFTERef

Microsoft SharePoint server 2010 encountered an error during setup. One or more required office comp

  
I am encountering this error during setup. The server previously had WSS 3.0 and the Group Board Workspace. I uninstalled those and installed sharepoint foundation 2010. Initially It was up and running but I was receiving errors trying to load the group space template, so I uninstalled SPF2010. cleaned up the registry pointers to the old WSS3.0 and Groupboard Workspace and tried to reinstall. Now I get the error

Microsoft SharePoint server 2010 encountered an error during setup. One or more required office components failed to complete successfully.

Looking into the issue it appears that setup cannot install the embedded sql server, since the logs indicate a dbwrap error. There are no "pendingfilerename" operations which fixed this problem for some. I tried to install as a farm but it won't allow me to use a local admin account.  I also looked at the sql configurations and the windows internal database is running.

Any ideas how to I can remove the windows internal database and reinstall SF2010?


sql server setup has encountered the following error exception has been thrown by the target of an i

  

OS - Windows Web Server 2008 R2

Processor: Intel (R) Xeon (R) CPU 5160 @ 3.00 GHZ 2.99 GHZ (2 Processor)

RAM 16.0 GB

System Type;: 64 bit Operating System

Trying to Install SQL Server 2008 R2 Standard

I installed all necessary SP and .Net Framework as instrcted but setup bring up the above error.

Please help - ASAP.

Thanks,


Stale security timestamp error encountered in the middle of a large file transfer

  

I have two WCF services configured as Windows Services for both client and server that perform file transfers for DR replication. I'm using chunked streaming with a wsHttpBinding.

One of the files I am testing with is 58MByte, and after it has been going for 5 miinutes it throws a stale message exception

System.ServiceModel.Security.MessageSecurityException: The security timestamp is stale because its expiration time ('2010-10-07T20:36:25.322Z') is in the past. Current time is '2010-10-07T20:44:34.155Z' and allowed clock skew is '00:05:00'.

The problem is not clock skew because the two servers are within a minute of each other, and the transfer proceeds just fine until it reaches the 5 minute mark.  It's comparing the time at the beginning of the transfer to current time.  If got the receiveTimeOut set to 59 minutes.

I've seen posts about creating a custom binding to increase the clockSkew tolerance, but this seems to be more of a timeout issue.

Any ideas?

 

 

// get the stream from the remote server, copy it to a local file stream.

                                        stream1 = client.Get

Error: 5123 CREATE FILE encountered operating system error 5A(Access denied.)

  

 

 

 HI ,

 

 This is a problem I encountered when I had to detach a database file (type .mdf):

 

 1) I went to the MS SQL Management Server Studi and detached my database file successfully from a connection called Workhorse.

 

2) I needed to place the .mdf database file into a zip file in order to put it on a remote server. I did this using Shared Portal.  This was also successful

 

3) However when I tried reattaching the database file, I got this error:

CREATE FILE encountered operating system error 5A(Access denied.) while attempting to open or create the physical file "C\Program Files\MSSQL Server\MSSQL\Data\<databasename>.mdf'

 

Q) The database file and log file (ldf) exist in the correct directory so I don't know what happened. Can any one help?

 

 Thanks much

 

Tonante

 


sharepoint designer encountered an error generating task (port 100)

  

Hi,

After spending 3 days, finally i could able to start the approval flow process (Only in default port) in SP2010. The problem is SPD is prompting the well known error "sharepoint designer encountered an error generating task" in other ports  (ex: 100). but working in default port.

Any Ideas? Kindly Share.

 


NET Runtime version 2.0.50727.3603 - Fatal Execution Engine Error Encountered for Remoting Applicati

  

Hi,

We encountered a sudden "NET Runtime version 2.0.50727.3603 - Fatal Execution Engine Error" which caused our application to be terminated. We googled this error, and we found that there was a problem with mscorwks.dll (http://support.microsoft.com/kb/913384). This post is for Dec, 2007, but our servers have latest .NET Service Packs Installed. We feel that since .NET 2.0 SP2 is installed this error might have been fixed by Microsoft in SP2, not sure though. We are looking for any possible solutions, with which we can avoid this error again. I am mentioning the error and .NET software installed on our server below.

The application is installed as a Windows .NET Service and runs under Local System Account.

.NET Softwares Installed.

Microsoft .NET Framework 2.0 Service Pack 2
Microsoft .NET Framework 3.0 Service Pack 2
Microsoft .NET Framework 3.5 SP1
Microsoft Report Viewer Redistributable 2005

Below are the errors logged in the event viewer.

Event Type: Error
Event Source: Service Con

Word Web App encountered an unexpected error. (SSL Site)

  

I have SharePoint 2010 set to https://sharepoint.domain.com as the default AAM (with the intranet one being http://ny-sp-01) and I'm running into SSL/mixed content issues when trying to use the Word editor (I'm in IE9, but that shouldn't matter).  I'm accessing the site using https://sharepoint.domain.com.

When I go to edit a document in word, I get the following error:

Word Web App encountered an unexpected error.
Digging deeper with the F12 tools, I see HTTPS errors:
  SEC7111: HTTPS security is compromised by about:/_layouts/inc/1033/WordViewer/wordbgx.png?bn=1447611000  Test.docx&Source=https%3A%2F%2Fsharepoint%2Enovotny%2Eorg%2Fmy%2Fpersonal%2Foren%2Fdefault%2Easpx&DefaultItemOpen=1
  SEC7111: HTTPS security is compromised by about:/_layouts/inc/1033/WordViewer/wordbgx.png?bn=1447611000  Test.docx&Source=https%3A%2F%2Fsharepoint%2Enovotny%2Eorg%2Fmy%2Fpersonal%2Foren%2Fdefault%2Easpx&DefaultItemOpen=1
  SEC7111: HTTPS security is compromised by about:/_layouts/inc/1033/WordViewer/wordbgx.png?bn=1447611000  Test.docx&Source=https%3A%2F%2Fsharepoint%2Enovotny%2Eorg%2Fmy%2Fpersonal%2Foren%2F

.Net FrameWork 3.5 Installation Error " suite integration toolkit executable has encountered a probl

  
HI,my problem is when i try to install framework 3.5 i get the following error " suite integration toolkit executable has encountered a problem and needs to close " .

The setup was downloaded from "http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en "

also uninstalled all previous versions and did a clean using the tool and tried again but no luck.

curruntly using winxp Sp2

this was mentioned in error
"AppName: setup.exe     AppVer: 9.0.21022.8     ModName: vsscenario.dll
ModVer: 9.0.21022.8     Offset: 0003b403"

Log File gathered by error
http://cid-d5455e5487b96588.skydrive.live.com/self.aspx/Public/2851_appcompat.txt

LogFiles By VStool
http://cid-d5455e5487b96588.skydrive.live.com/self.aspx/Public/vslogs.cab

is there any possible was to do this righ?,thanks in advance.



Upgrade step 'provisionsystemaccounts.sql' encountered error 3930

  

Another production upgrade from SQL Server 2005 to 2008 just went down. This is a single x64 server Enterprise Edition. The process ended with the error message

 

Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
 

The error log’ investigation pointed to upgrade step 'provisionsystemaccounts.sql' please see below.

 

2011-04-13 16:49:14.76 spid7s   Saving upgrade script status to 'SOFTWARE\Microso

Error found in log--SQL Server has encountered 1 occurrence(s) of I/O requests taking longer than 15

  

Dear All,

Im geting the following error these days regularly.

SQL Server has encountered 1 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [K:\Databases\MSSQL10_50.SQL2008\MSSQL\DATA\XXXXLog.ldf] in database [XXXX] (4).  The OS file handle is 0x0000000000000670.  The offset of the latest long I/O is: 0x0000000008a000

im gettting this for different databases.

Can any one please advise on above

 


Best Regards, Anjali.
Categories: 
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