- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 26
- Posts with Upvotes
- 24
- Upvoting Members
- 20
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
...
126 Posted Topics
Re: I've had this in the past and i felt pretty stupid but there wasn't enough space to actually create the file which will probably not be the case seeing as the file in question is so small (But still). Another issue i've come accross was permissions. Try uploading the file … | |
Re: [Click Here](https://msdn.microsoft.com/en-us/library/ms173121.aspx) Can't explain it any better than this. | |
Re: You can try something like this [Article](http://www.codeproject.com/Articles/21186/SQL-Connection-Dialog) usually it would be better to host the database in a central location instead of user pc's. Or just use plain windows authentication. In your case you would need to display this screen on startup initially when the application first runs on a … | |
Re: Do you have a `KeyPress` or `KeyDown` event linked to the textbox? | |
Re: > I have a simple code for listing database elements in a listbox and I would like to add icon for each element Just to explain this abit simpler seeing as you already have your database elements. I have an ImageList with 3 images inside (Excel Document,PDF,Word) I have 3 … | |
Re: Have you tried anything yourself? This sounds like a typical homework assignment. Here are some links that could get you started on building a constructive question and actually post some code of your own. [Link](http://msdn.microsoft.com/en-us/library/system.net.sockets.socket(v=vs.110).aspx) [Link](http://www.codeproject.com/Articles/463947/Working-with-Sockets-in-Csharp) [Link](http://www.codeproject.com/Articles/10649/An-Introduction-to-Socket-Programming-in-NET-using) [Link](http://www.developerfusion.com/article/3918/socket-programming-in-c-part-1/) | |
Re: Just to clarify. The reason you are receiving that message is due to the fact that after the `SqlConnection` was opened it was never closed. So your statement `connection.Close();` never executed. By inserting a breakpoint and stepping your code you could have determined as to why. | |
Re: As depicted above. try inserting a breakpoint in your code on line 7 `cmd.CommandText = "SELECT CAPITAL FROM TblProduct WHERE Description='" + descd.Text + "'and ` Hover over the CommandText and look for a magnifying glass. Copy and paste the code into SQL and try executing it there and see … | |
Is anyone else having problems viewing their Profile? It was working fine until about a day ago now everytime i click on my profile i just get a blank page. Tried reloading this multiple times even re-installed chrome | |
Re: Do you mean that you want the first half to be centered on top and then the second part below it to be left alinged? this is a very simple example you can test for yourself. If indeed i'm understanding you correctly richTextBox1.AppendText("Header"); richTextBox1.SelectionAlignment = HorizontalAlignment.Center; richTextBox1.AppendText(System.Environment.NewLine); richTextBox1.AppendText("First Line"); richTextBox1.SelectionAlignment … | |
Re: assuming the nodes in the XML are static you can just call an item from the list above by referencing the index. seeing as you know what item would be at what index `string row1 = RetrievedValues[0].ToString();` I'm assuming this is what you're talking about when you say > C# … | |
Re: Alot of examples here [Click Here](http://stackoverflow.com/questions/657131/how-to-read-data-of-an-excel-file-using-c) | |
Re: I don't see anything wrong with your code. as depicted in your code snippet above try inserting a breakpoint on lines 5,10 and hover over dropItems and dropItems2 it should display a count which should be 4 if the database returned more than 4 rows. Try pasting and running the … | |
Re: Is there some problem with the code? Or is it merely for imformative purposes? | |
Re: Can't quite remember where i found this but it works like a charm. Add the following method in your application public IEnumerable<T> FindControls<T>(Control control) where T : Control { var controls = control.Controls.Cast<Control>(); return controls.SelectMany(ctrl => FindControls<T>(ctrl)) .Concat(controls) .Where(c => c.GetType() == typeof(T)).Cast<T>(); } Then you can call it as … | |
Re: Try adding it to a dock Panel [Click Here](http://wpftutorial.net/DockPanel.html) | |
Re: You can use some simple regex to achieve what you want but from past experience this can get quite verbose and inefficient i would suggest trying [Click Here](http://htmlagilitypack.codeplex.com/) | |
Re: You should be able to create a user control for this in the WPF side and then use an element host in your winforms application. Here is a nice link describing it [Click Here](http://tech.pro/tutorial/799/wpf-tutorial-using-wpf-in-winforms). You'll probably need to take the plunge and sharpen up on your WPF though. even if … | |
Re: There might be a better way but i'm lazy so i loaded the image into the picturebox it ads the size mode and then i save and load the image from a temporary directory. [Click Here](http://social.msdn.microsoft.com/Forums/en-US/f7487221-10b9-440f-91a7-18b81129878a/c-picture-box-image-saving?forum=csharpgeneral) this ensures that the sizemode is applied to the image --Edit this might be … | |
Re: So you're saying that on table 1 you have 3 column values in one column? and you want to split it and add it to columns 1,2 and 3 in table 2? Just want to be clear | |
Re: You would be able to do this with a listview yes. But it will be far from easy Have you tried anything on your own? start small instead of thinking of the entire application. [Click Here](http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.columns(v=vs.110).aspx) How to create a listview with columns [Click Here](http://stackoverflow.com/questions/1343874/using-loops-to-get-at-each-item-in-a-listview) here are some examples on … | |
Re: Create a new public class and declare a static connection string `public static string SqlConnection = Your .sdf connection string` or just declare an actaul SqlCeConnection instead of a string. Just remember to add your using statements to the class. you can then call this anywhere in your application by … | |
Re: A very quick google led me to this [Click Here](http://stackoverflow.com/questions/21670983/import-data-from-an-excel-sheet-into-a-sql-server-database) that should help you getting started on writing your own code for accomplishing this. | |
Re: So you're not using DateTimePickers for the dates? the problem is that when a textbox has no value the value is actually a blank string " " and not Null. So you need to do a check. `IF (string.IsNullOrEmpty(StartDate)){}` and then assign it a default value like `1900-01-01 00:00:00.000` and … | |
Re: `if (comboBox2.Items[comboBox2.SelectedIndex].ToString() == "1")` Do you mean this line? Could you please paste the exception you are getting? | |
Re: Try adding a breakpoint on row 10 and checking the value of your RowFilter by hovering on it a small magnifying glass should appear. Click it and paste the text into SQL server and add the `SELECT * FROM TableName WHERE ` and check the results. Alternatively you can try … | |
Re: [Click Here](http://www.aspdotnethelp.com/2014/02/export-data-of-datagridview-to-excel.html) Have a look here | |
Re: For this type of application it would probably better suit you to use something like an XML file or database. The problem is passing data from one form to another. You're initiating the new(StudentList) in both forms which means that they would hold different data and no way of knowing … | |
Re: You can use this [Click Here](http://msdn.microsoft.com/en-us/library/ms256054(v=vs.110).aspx) | |
Re: I would suggest you get the max emp ID from the database first and then increment it by whatever you need `SELECT MAX(Emp_Id)+1 FROM Table` | |
Re: Can you post the exact error you are receiving | |
Re: [Click Here](http://stackoverflow.com/questions/761036/why-is-sql-server-storing-question-mark-characters-instead-of-japanese-character) This article should help you understand the problem. with the current collation settings on your database the above query should return `llo ??????` ![]() | |
Re: else { MessageBox.Show("Invalid user name or password. Please try with another user name or password", "Task", MessageBoxButtons.OK, MessageBoxIcon.Warning); txtUsername.Focus(); } A simple solution would be adding a field on your user table namely "LoginAttempts" `INT` When they attempt to login with the incorrect password for the given username you simply … | |
Re: This might not be an ideal solution but you can try copying the file in your C# code and then reading from it and try to keep the file up to date. Depending on the file size i don't think it will be possible to synchronize the two application. | |
Re: What exactly do you have in your checklistbox? If you want an Insert Statement to run for each item in your checklistbox then you have to assign your parameters and execute inside your `for (int a = 0; a < CheckBoxList1.Items.Count - 1; a++)` | |
Re: Can you please paste the exact error you are receiving | |
Re: I assume you're reading the data into an array. You know that your date will be in column 1 and your Summe would be in your last column so on each readline of the file you only retrieve these two values based on their index in the array. | |
Re: An easy way to see exactly what's going wrong is inserting a breakpoint on line 29 on the above code extract. Then investigate the value of the cmd query by using the text visualizer. Copy the code from there directly into sql and parsing it to sql standards. Run the … | |
Re: Try this DELETE Personaldata.*,Spouse.* from Personaldata INNER JOIN Spouse ON Spouse.LotNo = Personaldata.LotNo | |
Re: Your problem is due to encapsulation if (textBox1.Text == "1") MessageBox.Show("Hello1"); else MessageBox.Show("Hello2"); MessageBox.Show("Hello3"); If the textbox 1 text property is 1 the messagebox will show Hello1 and Hello 3 if it's not 1 the messagebox will show Hello 2 and hello 3 If you change the code as follows … | |
Re: Are you manually populating your grid? Or did you specify it in your properties? | |
Re: Say you have a grid and you want users to be able to disable and enable grid Columns and the grid is pulling from a view. You now add a radio button for each column but as soon as the view changes you have to add another radio button which … | |
Re: You can drag a OpenFileDialog Component on your screen and set it up in code like this `openFileDialog1.Filter = "PDF File (*.pdf)|*.pdf|All Files (*.*)|*.*";` you can get the filename after selecting a file like this `OpenFileDialog.FileName` As for manipulating the contents of a pdf you can try something like this … | |
Re: So you want the Link Label to point to a page not created by you? If that's the case you can use something like this `System.Diagnostics.Process.Start("http://WebsiteName"); `inside the onClick method | |
Re: When Loading your data into the dropdownlist try adding `if(!IsPostBack){}` | |
Re: This might help you get started [Click Here](http://www.codeproject.com/Articles/4544/Insert-Plain-Text-and-Images-into-RichTextBox-at-R) | |
Re: You should be able to add the key with the corresponding progressbar to something like a dictionary `Dictionary<Char,ProgressBar>` and then on keypress check your dictionary and retrieve the relevant entry | |
Re: When you insert a breakpoint you can step your code. Highlight and rightclick the combobox you can then inspect the Value and Display members and check if they are correct. | |
Re: Is it always going to be in this ` hlo<div><br></div>` Format? and only the hlo part changes? if that's the case there are numerous methods you can use just off the top of my head something like this string test = " hlo<div><br></div>"; test = test.Substring(test.IndexOf(";")+1, test.IndexOf("<") - test.IndexOf(";")-1); |
The End.