229 Posted Topics
Re: Hi In what way does the Stream Writer not work? Can you show us the code that you have that is not working and provide any error information you might be receiving. | |
Re: Hi I'm not sure if this fully answers your question, but looking at the output that you used as an example, the following Linq to XML would be one way to do this: Dim strLocal_VARIABLE_All_orgCodes As String = String.Empty Dim doc As XDocument = XDocument.Load("c:\temp\Test.xml") Dim elList = From el … | |
Re: Hi I don't see in your code anywhere where you are trying to save data to the database. What data do you want to save and what is the structure of your database (or table) where this data will reside? | |
Re: Hi It is my understanding that embedded resources are part of your assembly (executable) and therefore the only path is that to your executable. If you want to use the resource, you need to use reflection. Take a look at: [How to embed and access resources using C#](https://support.microsoft.com/en-us/kb/319292) for more … | |
Re: Hi When you say that the data is added for all records, do you mean that if you make a choice on the checked list box form then update the list box on the customer menu form that the contents of the list box are added for every customer in … | |
Re: Hi Currently you are performing an aggregate (sum) function over the entire DataTable so you will always get a total sum for the table. If you want it to be for a specific grade then you will need to include some form of WHERE criteria. While I couldn't replicate your … | |
Re: Hi The following code (courtesy of: [this post](http://www.windows-tech.info/3/5838c036c3b7c716.php)) will hopefully help. First, add a class level variable to store the button that was clicked (i.e. the one to be removed from the tool strip. Dim clickedButton As ToolStripItem = Nothing Then add the following code to the Opening event of … | |
Re: Hi Try the following. Please read the comments and step through it to see how it works. Private Sub Test() Dim ws As Worksheet Set ws = ActiveSheet Dim stopWord As String stopWord = "apple" 'Get the last column used so that we know where we will take 'data from … | |
Re: Hi It's a bit difficult to say how you might achieve this without seeing your code for the wbf class and swb. However, if this was just a simple form with a browser control and you wanted to open another instance of the form with the Url set to the … | |
![]() | Re: You could always install another keyboard, such as [ProType](http://9to5mac.com/community/protype-the-real-keyboard-for-ipad/) which might make entering code easier. But if that doesn't work for you, I'll give you a couple of quid for it. ![]() |
Re: The [ASP.NET MVC](http://www.asp.net/mvc/overview/security) site has plenty of documentation on authentication and authorisation. | |
Re: Hi In previous versions of ASP.NET MVC, if you wanted to have a strongly typed view you would have to use syntax similar to: `@inherits System.Web.Mvc.WebViewPage<Type>` but with ASP.NET MVC 3 and above, the `@model` syntax was introduced so that you could just state: `@model Type` Both do the same … | |
Re: Hi What does this script run? Is it your program that you created in VB.NET? If it is your program then you will need to cater for a silent switch. This could be achieved by passing a command line argument which your program then reads and depending on this value … | |
Re: Hi Sounds like you may have some infection on your machine, usually malware or you are allowing popups in your browser. What OS are you using? If it is Windows, you can try something like [malwarebytes](https://www.malwarebytes.org/antimalware/) or other malware detection software to see if your machine is infected. HTH | |
Re: Hi > With the same result; "System.Windows.Forms.ListBox+ObjectCollection" Along with the above suggestion (although it may be valid if you only have one column in your table, but you still need the VALUES keyword), you are also using ListBox1.Items which is an ObjectCollection hence the reason for getting this string added … | |
Re: Hi What have you tried so far? Have you considered using an SQL Statement with a WHERE clause: `SELECT * FROM YourTable WHERE YourColumn > 0`? HTH | |
Re: Hi Use the same code to grab the total for the amount column in your second data grid view and then add both totals together and assign to your text box. HTH | |
Re: Hi What is Richtextboxeditor? Is it a custom control or something or am I missing something? If you want a RichTextBox then declare your richt variable as follows: RichTextBox richt = new RichTextBox(); Then you will have access to the `Text` property. HTH | |
Re: Hi To add to ddanbe recommendation of using a method to keep your code clean and DRY (do not repeat yourself), you can also make use of the controls Handles clause which allows you to specify what events a controls method is bound to. So for example, you could state … | |
Re: Hi If this is SQL Server then there are a number of options. One would be to generate a script from SQL Server Management Studio. You would have to do this in a number of steps: 1. Script to create the actual database. Right click on the database and select … | |
Re: Hi I have used the [Aspose](http://www.aspose.com/) components extensively in ASP.NET with extremely good results. [Aspose.Words](http://www.aspose.com/.net/word-component.aspx) also supports mail merging and is pretty easy to use. HTH | |
Re: Hi Your post is a little confusing. As it stands, your str variable will only contain the last field obtained within the for loop and therefore you will only be writing one value back to the table. Is this what you want to achieve? Or do you want to take … | |
Re: Hi I am assuming that PartCode is unique and that when you want to get the PartName, this will occur when you choose a PartCode from the combo box? If the assumption above is correct, then you could do something like the following in the SelectedIndexChanged event of the combo … | |
Re: Hi How is the DataSet and TableAdapters being setup? Is this all done via wizards in Visual Studio? Also, I would strongly recommend that you avoid the use of GoTo statements, especially in the context that you are using them. Instead, look at [Try/Catch](https://msdn.microsoft.com/en-us/library/xtd0s8kd%28v=vs.110%29.aspx) which is the exception handling mechanism … | |
Re: Hi I don't see in your code where you are specifying that you want to allow paging of the GridView? Anyhow, to do this you need to first state that you want to allow paging and then secondly, you need to handle the PageIndexChanging event of the GridView. So an … | |
Re: [DistroWatch](http://distrowatch.com/dwres.php?resource=major) is a good source of information on the most popular distributions. | |
Re: Hi When you say Visual Studio doesn't like it, what does it say? I tried out your scenario and didn't have any problems. First I created your CompanyInfo class and then replaced the About controller action with yours. Then in the About View I added `@model modelsTests.Models.CompanyInfo` and proceeded to … | |
Re: Hi The following is an example of how you can create a dynamic ComboBox and bind some data to it, you will need to modify according to your database, this example uses an SQL Server database: ComboBox myDynamicComboBox; private void Form1_Load(object sender, EventArgs e) { //Create the combo box and … | |
Re: I can see that you are grabbing the EmpID query string value in the Page Load event but I don't see where you are using it. | |
![]() | Re: Hi What does your SQL statement look like when you output it to a message box? Are you assigning the right values to the right variables? Finally, if your WHERE criteria is supposed to be Tuesday, then this would suggest that the field is a string, so you will need … ![]() |
Re: Hi > so i did the the coding like this and it is full of mistakes can u plz help me and tell me how can i do this When you say it is full of mistakes, can you tell us what errors you are getting and where? A couple … | |
Re: Hi I did a basic test with a DataTable as the data source for the Grid and your sort code works fine: int gridCounter; DataTable gridData; private void button1_Click(object sender, EventArgs e) { if (gridData == null) { gridData = new DataTable(); gridData.Columns.Add("attn_id", typeof(int)); gridData.Columns.Add("StringValue", typeof(string)); } gridCounter += 1; … | |
Re: Hi Your code is sending HTML email and you have the IsBodyHtml property properly set so I am not sure why you think it is plain text. What I have noticed is that other than the inclusion of <br> tags, you are not using any other HTML markup which might … | |
Re: Hi The following query uses the DateDiff function in Access to determine if TimeEnd is 6 hours or greater than TimeStart: SELECT Schedule.ID, Schedule.TimeStart, Schedule.TimeEnd, Schedule.Operation FROM Schedule WHERE (((DateDiff("h",[TimeStart],[TimeEnd]))>=6)); HTH | |
Re: Hi Are you referring to commands such as ls, pwd etc. on a windows command prompt? If so, I doubt it. But if you want that functionality and more in a native Windows environment, you could give [cygwin](http://cygwin.com/faq.html) a go. Otherwise, I may have misunderstood your question. HTH | |
Re: Hi I'm not sure why you are not using Visual Studio, there is a free version available ([Visual Studio Community Edition](https://www.visualstudio.com/en-us/news/vs2013-community-vs.aspx)) and it would make debugging these types of issues a lot easier. Having messed around with your code a bit, it became apparent that the Container.DataItem is null and … | |
Re: Hi You could use a [TableAdapter](https://msdn.microsoft.com/en-us/library/bz9tthwx.aspx) to retrieve and update data. It's not something that I have much experience with but the MSDN documentation should provide you with plenty of examples for each of the scenarios. This might be the better choice as it will handle a lot of the … | |
Re: Are you asking how you can maintain the database without using frameworks or wizards such as Entity Framework? If not, can you be more specific. | |
Re: Hi What language are you currently using and what type of graphs are you looking to create? There are many libraries out there but it depends on what you are currently using. For example, Microsoft have some [graphing libraries](https://www.microsoft.com/en-gb/download/details.aspx?id=14422) for .NET, Google have [charting API's](https://developers.google.com/chart/interactive/docs/index) which you can embed using … | |
Re: Hi > I may have to buy a copy as I can't find access on my personal laptop. (Its probably not supposed to be on it anyway). So advice on that is appreciated as well. [Office 365](http://products.office.com/en-gb/business/explore-office-365-for-business) might be a viable option for you. You can pay monthly and get … | |
Re: Hi You shouldn't have to reload the form to receive data unless you have your code that receives data in the Load event of the form. If that is the case, I would recommend moving the code out to its own procedure and then maybe use a timer to repeatedly … | |
Re: That depends on what OS you are using. If you are using Windows then from the Run dialog ("Windows Flag + R") type "control printers" to open the printers area of the control panel and then right click on the printer you want to be the default and select the … | |
Re: Just to add, remember that arrays are zero based so if you have five items in your list box and select the first item the SelectedIndex proeprty will return zero whereas the last item will return 4. | |
Re: Hi Usually this is caused by not providing a value for a field that is set to not allow Nulls (i.e. a required field). However, I am surprised that data is being added. To get rid of the error, provide some validation before inserting the data to ensure that all … | |
Re: Hi You can use WMI (Windows Management Instrumentation) to get the current brightness level and to also set it. There is a great tool called [WMI Code Creator](https://www.microsoft.com/en-gb/download/details.aspx%3Fid%3D8572) that allows you to query and execute WMI methods and it also generates the code for you. To find the current brightness … | |
Re: Hi That depends if that computer is visible outside of your company network (probably not) and whether you can connect to your company network via some form of VPN. If you can connect via VPN then that IP should be reachable when you are not in the office. | |
Re: Hi The reason is that the arrays salate and suppen are not declared correctly. They should be declared in the same way as you have for pizzen: var salate = [["Insalata Mista",3.5],["Insalata Polo",5],["Insalata Tonno",5.5]]; var suppen = [["Tomatencremesuppe",2.8],["Knoblauchcremesuppe",2.9],["Frittatensuppe",3]]; HTH | |
Re: Hi It would be better if you were to check whether the table existed before trying to create it or drop it. That way, regardless of what happens in your program (for example, a crash), you won't be left in a state where you can't create the table as it … | |
Re: Hi When you meet your condition, simply close the reader then use the [File.Delete](https://msdn.microsoft.com/en-us/library/system.io.file.delete%28v=vs.110%29.aspx) method to delete the file before exiting your loop. HTH | |
Re: Hi AutoGenerateColumns simply tells the DataGridView whether it should use the column names from your data source as headers or not, it is not responsible for showing or hiding columns. What does the GetRecords() method return? If it is a DataTable then you can strip out the columns that you … |
The End.