- 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
...
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` |