robertlamour's Q&A profile
Windows Forms Reading from XML and bound to DatagridView : Adding rows dynamically
Hi All, .NET 2.0, Win Forms, C#.NET, DataGridView control, XML datasource. I am using XML as a Data Source and try to bind the source into the DataGridView control in WIN forms. I have the XML source which has something like this... < EventsGroups > < Event > < EventName > Event </ EventName > < EventDescription > Event description </ EventDescription > </ Event > </ EventsGroups > The description should bound to the Description column which i defined in the datagridview control...how to do that ... moreover i want to CREATE ROWS with description reading from the XML dynamically .... It would be great ...if anyone help me in this regard.... you please share t ...Show All
.NET Development Merging XmlDocumentFragment into XmlDocument
Hi, how can I insert XmlDocumentFragment into XmlDocument without creating duplicate nodes For example, if I have <root> <onmytable> <book></book> <cup></cup> </onmytable> </root> and want to insert this: <root> <onmytable> <book></book> <pen></pen> </onmytable> </root> as you guess to result in: <root> <onmytable> <book></book> <cup></cup> <pen></pen> </onmytable> </root> Try this: http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnxmlnet/html/xmldiffgui.asp ...Show All
Visual C# convert double to 2 decimal places
Hi all, I had a simple c# format that need your help My code is as follow: Yield = (float )Good/(float)(Total); sw.WriteLine(Total + "\t\t\t" + Good + "\t\t\t" + Yield); My question is how to format Yield to 2 decimal places. Yield is declared as a double. Thanks hi, double dbValue=11.11111111; string sValue=string. Format("{0:#,###0.00}",dbValue); then sValue will have the value 11.11 ...Show All
Visual Basic vb.net dlls and access database protection
I have a window application (vb.net and access database), I want to proctect my dlls and access database. I need the best way to do it Thank you Use SQLExpress for tighter security than access. Your dlls can be decompiled and I've heard that there are utilities that can convert MSIL back into a structured language (VB, C#); but I don't know much about it beyond that. ...Show All
.NET Development XML recursive parsing
Hello, I am new with xml parsing, maybe what I am going to ask is very simple but I don’t know how to do it. I know to parse simple XML documents but I don’t know how to parse documents with a second XML structure inside some names: Here is my example: <SERVICEINFO> <LAYERINFO name="200.000" id="9" > </LAYERINFO> .... <LAYERINFO name="Provincia" id="2"> <FIELDS> <FIELD name="TERRITORIO" /> <FIELD name="TERRITORIO2 /> <FIELD name="TERRITORIO3 /> ... </FIELDS> </LAYERINFO> <LAYERINFO name="Poblacion" id="1"> <FIELDS> <FIELD n ...Show All
Visual Basic Changing color
Hi, I need to increment the colour in the following statement: - Dim plotnumber as byte = 1 Dim myCurve1 As LineItem = myPane.AddCurve("Plot " & plotnumber, list, Color.Red, SymbolType.None) Plotnumber = plotnumber + 1 You can ignore most of the statement as it relates to an add-on, but it uses the system colour function, to change the colour of a cure. Unlike a number (like the name of the curve where I have simply & plotnumber and incremented so each curve has a different name. but I have no idea how I would do this for the colour, does anybody have any ideas Regards, Andy You mean the curve's high values are red, low values are blue, something like that If so ...Show All
Windows Forms Saving from RichTextBox in .rtf or .txt??
Hello, I am trying to save file to either .rtf or .txt from my RTB. When I save to .rtf it works fine, but when I try to save to .txt it saves the file but it doesn't put the '.txt' extension to the end of the fileName. So when I try to open the file again it doesn't appear as a .txt file, but it works if I manually add the '.txt' file ext. into the filename at savetime. Here's my code: Dim textType As RichTextBoxStreamType If (SaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK) Then If (SaveFileDialog1.FilterIndex = 1) Then textType = RichTextBoxStreamType.RichText Else textType = RichTextBoxStreamType.PlainText End If End If Dim fs As New FileStream(SaveFileDialog1.Fil ...Show All
Visual Studio Report Viewer shows error then loads the report
Hi I m working with client side reports (rdlc). When I load a report, report viewer displays following error: "An error occured during local report processing. Failed to load " After displaying this error for a few seconds, the report is shown correctly. Now I cant understand why this error occurs. Can anyone help me resolving the problem. Thanx in advance. I have been having this same problem, with the error message "Report processing has been cancelled" showing for a few seconds and then the report loading without any noticeable problems. I noticed that when I run the program through Visual Studio 2005 this doesn't happen, it's just when I run the .exe on its own. Have you ...Show All
Windows Forms Install from CD without user interaction
Hi all, I'm trying to update my existing .net 1.1 app with a clickonce. The problem is, the old app resides on a machine with no keyboard, mouse, or monitor in almost 100 locations. I can easily ship a CD to each location where my clickonce has been deployed. The problem comes when the user puts the CD in a UI shows an acceptance type thing for installing .NET 2.0 and then requires a reboot. Is there any way to programmatically install .net 2.0 without user involvement other than just sticking the CD in I should mention that it would be acceptable to include an app on the CD that would install .net 2.0 on the machine without the user interaction if there is no other solution. That app would then afte ...Show All
SQL Server Copy Database Question
Setting up a sql2005 db server, trying to use Copy Database to move from sql2000 to sql2000. When I use the copy database wizard it does copy the tables and logins but it does not appear to be copying the permissions (like db_datareader, db_datawriter, db_denydatareader, db_denydatawriter, etc.) What could I be missing Thanks i could never get Copy Database to work when migrating to 2005. i ended up detaching the database and copying the mdf to the new server and re-attaching. ...Show All
Visual Studio 2008 (Pre-release) Generating two WCF services that use the same data contract
Hi, I have two WCF Services than use the same DataContract. For generating ServiceClient I use svcutil tool. Every generated file contains the definition for my DataContract. In my case I have a conflict at compile time because two classes have the same name. Is the svcutil can do the “merge” between data contracts by not defining repeated elements How can I resolve this problem The best I think you can do is this: Generate proxies using the /namespace option to map schema namespaces to CLR namespaces so that the two sets of imported data contracts look like the same type at the client. That way, after you manually delete one copy of the redundant types, both service proxies will work properly ...Show All
Visual Basic Application startup fails due to ClickOnce checking for updates
We're seeing a problem intermittently while starting up our application. The application is started and the ClickOnce framework is doing a check to see if any updates are available and instead of handling the bad network connection, it fails to startup the application entirely. We have ClickOnce set to check for updates before application startup. This seems to happen most often on laptops with wireless connections especially in bad network conditions where the network goes up and down. My guess is that the ClickOnce checks initially for the no network condition, but this passes and so the failure is ungracefully handled later. Is there something that could be done from the client side to circumvent this or to fix this Is this goi ...Show All
Game Technologies: DirectX, XNA, XACT, etc. 2D Direct3D Sprite Rotation (such a basic problem :( )
Sup, ( sorry in advance for the poor written quality and the dumb n00bish question, I'm at work and not supposed to be onthe internet. There's a lot of quick alt-tabbing going down when the boss is about!! Gotta be quick) Right, I'm getting well annoyed with this; I have found various sites on the internet that describe how to succesfully use sprites in Managed D3D (and c#) and perform transforms on them... I just can't seem to get it to work. Does anyone know of a simple bit of code (not pseudo) that creates a sprite class, rotates it and then places it at coords x,y on the screen I keep getting wierd results and would be unbelievably gratefull for a just a simple implementation. All of the examples (*and there arent man ...Show All
SQL Server SQL Server vs Oracle
Oracle is typically used for the 'HUGE' databases. SQL Server has had limitations with these same databases running into processing limitations. Can someone give me a realistic comparison and give me some benchmark info Or point to where I could find that info. ex. terabyte size in both programs, where does one leave off (size) and the other begin. thx, Kat I think this conversation is enlightening to say the least. Aside from points one and two I find that perception rules the roost. I'm a sql dba learning Oracle because we have both at our hospital. It appears that Oracle made great enroads when SQL Server dropped the ball during the dotcom erra because it couldn't handle greater storage requirements then. Ever since that ...Show All
SQL Server Newb question
If I am using Ado.Net from a .Net Class library hosted outside SqlServer to do Sends and Receives do I have to use anything else other than queues The reason I am asking is because I already have an abstraction layer for a couple of our queueing systems and I was hoping to put SSB in there as well but the abstraction layers' primitive is the Queue not Conversation/Dialog/Service, etc. Thanks Costas Dialog conversations are persistent sessions between two services -- the initiator and the target service. When beginning a dialog, you must specify the initiator service in the from argument and the target service in the to argument. Even if you use dialogs for one-way messaging, you still need a 'from' servic ...Show All
