Answer Questions
Kay-Davis Divide by Zero Error [this.Adapter.Fill(dataTable);]
I am getting a "Divide by Zero Error Encountered" when I run my ASP.NET application. The error looks like is encountered when filling DataSet. I have a GridView on frontpage that is configured to get data from a Dataset which uses Stored Procedure to get data. The SP runs perfectly when I run in SQL Server but I don't know why is it throwing an error when I run from ASP.NET. Any help is really appreciated. I am attaching some images below to give more information: Image of Default.aspx page and DataSet Image of Error Image of Stored Procedure Code Image of Output when Stored Procedure is executed in SQL Server (I have noticed that when stored procedure is executed in SQL server, it returns a Value '0 ...Show All
WBAS ODBC or OLEDB
Hi, We will be starting a new application development project shortly with various front ends (web, smart client etc) and trying to find out if OLEDB is better than ODBC to connect to our data sources. We need to connect to Oracle, MS SQLServer and Ingres. (May be others i.e. MySql in the future) I have read through a number of msdn documents but cannot get a difinitive answer, can anyone point me to a page where microsoft actually says OLEDB is better than ODBC. Regards Chris Jignesh Desai. If you had waited only a moment you could have discredited me! Hi Chris, No-one seems to want ot commit here, so maybe if I put my head on the block someone will sho ...Show All
sergiom88 Problem wiht NetworkStream.EndRead and Network.BeginRead
Hi, I use the following sample code as a client to receive data form Server.The problem is Execption either happens at ns.EndRead or ns.BeginRead. The exception is IOException, inner exception is SocketException, and error code are 10038 or 10053 respectively. My questions are : Could network be used to communicate with a server using BSD socket API When new NetworkStream, is it necessary to set the owning flag to "true" As the connection was neither closed by client nor the server, who should be responsible for this error This happens not so frequently, but it is annoying. I am trying to have a look at the patches of .Net and monitoring the packets between server and client. can anyone give me some information ...Show All
skt how do you clone a hard drive
I'm tring to write a program to clone and or image a hard drive and put it into virtual pc.I figured it would be a console app. and i need the system::IO namespace but I've never used the iCloneable clone() method before. So i'm looking for some advise on where to begin. icannot use norton ghost or a produce like this, i must come up with this on my own. I'm in my intership for school so any advise would be great. i hope i put this in he right spot. thank you. im sure someone will help but I would like to post my 2 cents here and hope it helps you understand a bit better. Please, any corrections here are most welcome! :-) firstly you cannot clone your harddrive on the same drive that is running yo ...Show All
bud1024 DataSet.Merge incorrect behavior with nested tables
Hello All. I have a DataSet schema which includes several tables with a nested relation ship. The schema implements a kind of XML displayed below: <show> <events> <event id="123"> <!-- unqiue attribute --!> <general/> <customs> <custom/> </customs> <queries> <query/> </queries> </event> </events> </show> As a result a have following nested relationships: EVENT <-> GENERAL (1-to-1) EVENT <-> CUSTOM (1-to-many) EVENT <--> QUERY (1-to-many) When i do the merging the method disables constraints including relationship and therefore instead of updating it adds new records. Once all copying completes it tries to resto ...Show All
slickred FtpWebRequest.RenameTo Property
Hello, I am trying to rename a file on an FTP server using the following block of code: string FileUri = "ftp://someftp/somedir/test.tmp" ; FtpWebRequest ftp = ( FtpWebRequest ) WebRequest .Create(FileUri); //ftp.Method = WebRequestMethods.Ftp.Rename; ftp.Credentials = new NetworkCredential (UserName, Password); ftp.RenameTo = ftp://someftp/somedir//test333.tmp ; FtpWebResponse r = ( FtpWebResponse )ftp.GetResponse(); and the response StatusDescription is set to : 150 Binary data connection for test.tmp (xx.xx.xx.x,xxxx) (1497 bytes). yet the file is not renamed. Have any of you had any success renaming files on an FTP server I would be very grateful to get some feedback on this i ...Show All
ben5173 Concurrent Remoting and socket connections
Hello Having been trying to find the root of this problem for several days I now hope that you can help me. I’m implementing a distributed file system – consisting of, at the moment, a testing client (C), a http-server (H) and a file server (F) - with the following setup: H acts as an external interface to F, that is any given C connect to one H in order to access files at F. The communication between H and F uses remoting, ie. F registers a FileServerObject which interfaces the local file system which acts as the file storage. Testing H and F alone works fine. The communication between C and H uses regular sockets and uses the HTTP1.1 protocol for communication. These two work fine together. The problem then is ...Show All
Dawid Weiss get data from access and save it into a new excel file using vb 2005
Can some1 give me a small sample of how to do this Below is a very simple example: Dim AccessConn As New System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=c:\Test Files\db1 XP.mdb") AccessConn.Open() Dim AccessCommand As New System.Data.OleDb.OleDbCommand("SELECT * INTO [Excel 8.0;DATABASE=c:\Test Files\Book1.xls;HDR=NO;].[ExcelSheetName] from [AccessTableName]", AccessConn) AccessCommand.ExecuteNonQuery() AccessConn.Close() My method is to automate it when i click a button, but upon clicking, i find that the new excel book does not appear in c:\temp. The code I ...Show All
Shankar K FileSystemWatch firing wrong event!!!
Hi, I have experimeneted several problems with FileSystemWatcher which are explained on this forum, such as multiple events or events firing too soon. I'm monitoring 2 directories with 2 FileSystemWatcher objects for specific (and different) filenames, one of the directory is a sub of the other. I monitor both changed and created events. The problem is that when the file being monitored in the parent directory gets created the event handler associated to the file in the subdirectoy also gets fired. Note that in both cases I do set the IncludeSubdirectories attribute to false. Of course I can handle this by verifying the file name at the beginning of each event handler but still it is annoying (and caused me a fair bit of pain before I fig ...Show All
Thomas B Winans (XslCompiledTransform) Cannot process XML containing DTD
WHAT I'M TRYING TO DO I simply want to transform an XML file using an XSLT file. But the process throws an exception with XML files referencing a DTD. My research uncovered that I must set the "ProhibitDtd " property to false. As you can see in my code sample below, I did this. For some reason, the setting wasn't effective. I suspect I am making some sort of syntax error that is resulting in an improperly set property. SYSTEM Windows 2000, Visual Basic Express 2005 ERROR MESSAGE: For security reasons DTD is prohibited in this XML document. To enable DTD processing set the ProhibitDtd property on XmlReaderSettings to false and pass the settings into XmlReader.Create method. CODE USED (EDITED FOR SIMPLICTY OF T ...Show All
bryanedds Whats the Best XML Object
Whats the Best XML Object for reading nodes,attributes and there values Speed is high priority If you want only read an Xml file the class that assure you the best performances is the XmlReader (check the documentation about how to use it). Remember only that you can read only in one direction, from the beginning to the end of the document/fragment. If you want to move up and down between nodes instead use the XPathNavigator object. ...Show All
Gordon Staley remote registry access
i dont know whether it is right to post this here. Am in the process of developing a lan messenger in which there is no support of database.nor i should use server/client technology. All the info user enters is automatically stored in registry under HC\SOFTWARE\LANMESSENGER tab. Am able to store this locally.Now the problem arises when i scan remote computers registry to get his username.The development platform is c#.net.I searched many articles,googling.but no use.The main problem is the registry key access.No permissions.I have to give permissions using c#.Please tell me how to program it. See http://msdn2.microsoft.com/en-us/library/system.security.accesscontrol.registryaccessrule.aspx ...Show All
LKeene Setter never called on serialized generic list?
So here's a question that is challenging to me... I have a property in a "Web Service Friendly" class called WsfQuoteConfiguration. The property is exposed with this signature: public List < WsfCustomer > WsfCustomers { get { } set { } } The getter functions properly. However, the setter is never called. FYI, it's not a logic problem. When I changed the return type to WsfCustomer[], it functions properly. I understand and am fine with the fact that generic lists serialize to arrays, but why do I have a problem pushing a value back into that property So the question is not, "How do I fix ________ ", it is "Why is a setter that exposes a generic list never called " Than ...Show All
Raghu Deshpande Performance problem
Hi, i'm coding with C# something like that: j = 0; for (int i = 0; i < bmpArr.Length; i += bytesPorPixel) { colorArray[j] = new T(); colorArray[j++].FromBMPColorArray( bmpArr, i); if (j % bmp.Width == 0) i += paddedBytes; } This code take 5-8 seconds to execute when the loop have 2'500.000 cycles. I need that this code take only around 1-2 seconds in these case, but i really don't know how i can do that. I've treated to isolate the lack speed problem and i've saw that the object instanciation take the most of the time colorArray[j] = new T(); until the rest of instructions: colorArray[j++].FromBMPColorArray( bmpArr, i); if (j % bmp.Width == 0) i += ...Show All
David Kreutz - MSFT How can I save dataset as an xml file???
Hi I am trying to save the dataset as xml file (one row from the table).Saving xml is fine but it look like the following (the below is flat xml file without root nodes and child node) But I want the data to go under xml Root Node, child node, children node and so on. My question is How can I save the dataset as xml file with Root Node, child node, children node and so on Please help !!! Urgent!! < xml version="1.0" standalone="yes" > <MS> <SDLTID>1</SDLTID> <UTRN>303783jMJ</UTRN> <TransPropertyType>01</TransPropertyType> <TransInterestCreated>FP</TransInterestCreated> <TransEffectiveDate>2006-04-05</TransEffectiveDate> and so on..... ...Show All
