458 Posted Topics
Re: You should not use the "sa" account for database access. You can use it for testing, but it is designed for administrative use. [SqlConnection.ConnectionString Property](http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring(v=vs.110).aspx) *If User ID and Password are specified and Integrated Security is set to true, the User ID and Password will be ignored and Integrated Security … | |
Re: Find the source of failure, and fix it. Or disable updates. | |
Re: Flickering tends to occur when one re-draws/re-paints the form and/or the controls that are contained on it. | |
Re: For Each ctrlItem As Control In Me.Controls If TypeOf ctrlItem Is System.Windows.Forms.CheckBox Then Dim myCheckBox = CType(ctrlItem, System.Windows.Forms.CheckBox) myCheckBox.Checked = True End If Next Or Private Sub checkCheckBoxesStartingWith(ByVal startsWithText As String) For Each ctrlItem As Control In Me.Controls If TypeOf ctrlItem Is System.Windows.Forms.CheckBox Then If ctrlItem.Name.StartsWith(startsWithText) Then Dim myCheckBox = … | |
Re: In line #10, you trying to use x, but it has not been initialized (x doesn't have a value). `for (i=1; i<x; i++)` | |
Re: explorer.exe is not internet explorer. What are you trying to accomplish? | |
Re: Your first issue is being able to clearly describe the problem that you are trying to solve (the reason for creating the program or the immediate issue you are trying to solve). *"we must take the inputs of both list..."* What "list"? You either need to narrow down the problem … | |
Re: Where is the definition for AMSCONN? [Using statement](http://msdn.microsoft.com/en-us/library/yh598w02.aspx): *You can instantiate the resource object and then pass the variable to the using statement, but this is not a best practice. In this case, the object remains in scope after control leaves the using block even though it will probably no … | |
Re: Have you considered using bookmarks? [Word Object Model Overview](http://msdn.microsoft.com/en-us/library/kw65a0we.aspx) This might also be of use: [How to: Programmatically Set Search Options in Word](http://msdn.microsoft.com/en-us/library/tf2wdd02.aspx) | |
Re: Test your hard drive to see if it is bad. | |
Re: I've never used "Xml.Serialization", but the following has been tested with the XML file you provided above: Private Sub getEmployeeData(ByVal filename As String) Dim doc As New Xml.XmlDocument Dim numEmpleado As String = String.Empty Dim selloSAT As String = String.Empty Dim selloCFD As String = String.Empty Dim noCertificadoSAT As String … | |
Re: If you don't want to use a loop, you could use "Substring" and "IndexOf(" "). | |
Re: How are you identifying which row the user wants to select? ComboBox? TextBox? Mind reading? | |
Re: [This post](http://stackoverflow.com/questions/1208548/datatable-defaultview-sort-doesnt-sort) may help. If you want more help, please post more of your code--particularly the variable declarations. | |
Re: Lines 24-31 should be placed inside a loop. You will also need an option to exit (complete the order). | |
Re: Ensure you are committing the data to the database. | |
Re: If you are repeating a lot of code, then there is probably a better way to write it (using a method/function). There is a tutorial on how to pass data between two forms here: [How to pass data between two forms in C#](http://www.daniweb.com/software-development/csharp/tutorials/476685/how-to-pass-data-between-two-forms-in-c) | |
Re: Try a different AC adapter, to see if you still have the same problem. | |
Re: First of all there should be a way to exit the program without having to kill the process (in my opinion). There are two versions of .NET 4--client and full version. Which version does your program use? What version of the OS did you test it on? 32-bit or 64-bit? … | |
Re: Also, what happens when two or more users have the same first initial and same first 4 letters of the last name? example: * Michael Richardson * Matthew Richards Or if 2 or more people have the exact same names? * John Smith * John Smith It is probably better … | |
Re: [String.IndexOf Documentation](http://msdn.microsoft.com/en-us/library/k8b1470s.aspx) **Return Value**: *The zero-based index position of value if that string is found, or -1 if it is not. If value is String.Empty, the return value is 0.* line.Substring(0,ID): If value is not found "ID" = -1. You can't do the following: `line.Substring(0, -1)`. It throws "ArgumentOutOfRangeException". [String.Substring … | |
Re: PerplexedB: You can't do the following: int positionSeparator = line.IndexOf("-"); if (line.Substring(0,positionSeparator) == name ) { It will throw an exception for any line that doesn't contain a "-". `positionSeparator = -1` when a line doesn't contain a "-". `line.Substring(0,-1)` will throw an exception. See my post [here](http://www.daniweb.com/software-development/csharp/threads/477812/text-files) | |
Re: It's difficult to know what your code is doing unless you post your code. | |
Re: How do they access the program now? Taking turns using a single computer? Does each teacher have his/her own text file or do all of the teachers use one text file? If all teachers use one text file then there is potential for issues--you may consider using a database like … | |
Re: What version of XP (32-bit or 64-bit)? What version of Vista (32-bit or 64-bit)? What version of Win 7 (32-bit or 64-bit)? Did you check that the necessary version of .NET is installed on the Vista and Win 7? There are two versions of .NET 4--a client version and a … | |
Re: What are the data types for each of the columns in the database? | |
Re: [How to automate Word from Visual Basic .NET to create a new document](http://support.microsoft.com/kb/316383) | |
Re: Your original error was occuring in lines 26-31 above. You had the following: Dim paramName2 As SqlParameter = New SqlParameter() paramName1.ParameterName = "@finish" paramName1.SqlDbType = SqlDbType.DateTime paramName1.Value = finish sqlCmd.Parameters.Add(paramName2) The name is "paramName2", but you (accidently) wrote "paramName1" here (paramName1.ParameterName, paramName1.SqlDbType, paramName1.Value) Change to the following: Dim paramName2 As … | |
| |
Re: How is the second form opened? Does the first form open the second form? If so, create a constructor in the second form and pass the data in the constructor. If not, you can use events. See a tutorial [here.](http://www.daniweb.com/software-development/vbnet/tutorials/475628/how-to-pass-data-between-two-forms-in-vb-.net) | |
Re: Something like the following should work: 'path from original file Dim source As String = "C:\temp\regextest.txt" 'path new file Dim destination As String = "C:\temp\regextest2.txt" Dim newText As String = "300" 'new value Dim inputText As String = My.Computer.FileSystem.ReadAllText(source) 'split lines Dim inputTextArray As String() = inputText.Split(New String() {"\r\n", "\n", … | |
Re: Dim nextSunday As Integer nextSunday = (DateTime.Now.AddDays(7)).Day - (Weekday(DateTime.Now)) + 1 | |
Re: I believe that your issue is that you are creating a label for each person, but never attempt to remove them before updating the data. So if a person's shift is over you will still see their label because you haven't removed it. How to fix it: Keep track of … | |
Re: Why are you using all these parentheses? FROM (((((Comp_Code INNER JOIN... Also, why are you naming columns the same name as the table that contains it? You're more likely to receive help if you provide some more information about the tables (or the create table syntax for each table). See … | |
Re: This error typically occurs if you declare an object and try to use it without creating an instance of it (using the "New" key error. | |
I will be showing how to pass data between two forms in C#. I will be using two forms, two classes which we will define, a delegate, an event, and an event handler. It is a bit long because I wanted to make it easy to follow. If you want … | |
Re: How are you connecting the computers? Through a router/switch? Or are you attempting to connect them using a cable between the LAN cards? | |
Re: What do you mean by "different modules....in different project solutions"? Are you talking about a vb module (ex: Module1.vb, Module2.vb, etc)? Or are you talking about some forms that exist in different projects? Why did you choose to create them in separate projects? Is that a requirement for your project? | |
Re: The following post may help: [How to: Host Controls in Windows Forms DataGridView Cells](http://msdn.microsoft.com/en-us/library/7tas5c80.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1) | |
Re: Here is a small program I wrote to help understand what nested for loops do: static void Main(string[] args) { string inputStr = String.Empty; int outerForLoopCount = 0; int firstNestedForLoopCount = 0; int secondNestedForLoopCount = 0; int totalOuterLoops = 0; int totalFirstNestedLoops = 0; int totalSecondNestedLoops = 0; do { … | |
Re: Duplicate post: http://www.daniweb.com/software-development/vbnet/threads/476214/saving-selected-data-from-textbox-to-db See your other post for a better database design. When you have a properly designed database, you can use "join" statements to retrieve the data you want. | |
Re: Are you trying to detect these events on your form? If so, here's an example: To use the example: * Add a MenuStrip named: menuStrip1 * Add a ToolStripMenuItem named: File * Add a ToolStripMenuItem named: Close * Add "MouseDown" and "MouseUp" events private void closeToolStripMenuItem_MouseDown(object sender, MouseEventArgs e) { … | |
Re: I don't know your data, but you should probably use 3 tables: **Table 1:** * ID: primary key * Name * Age * Sex If one ID in Table 1 has many entries in Table 2: **Table 2:** **1:M (1 to many)** * ID: primary key, foreign key references Table1(ID) … | |
Re: What seems to be the issue? [Sentintel value](http://en.wikipedia.org/wiki/Sentinel_value) | |
Re: How many sequences are you supposed to prompt for? You probably need a while loop. You could probably use two Vectors or ArrayLists. One holds the longest list of numbers in the sequence and the other the current list of numbers in the sequence. If the current list of numbers … | |
Re: I haven't tried this, but [this post](http://carllbrown.blogspot.co.uk/2007/09/populate-dataset-from-csv-delimited_18.html) shows how you can read a csv file into a dataset. Once you have a dataset you should be able to set DataGridView.Datasource = to the dataset. It looks like the post is for C#, but VB .NET should be similar. Here's [another … | |
Re: Here's a solution. Version 2 code has been tested. Create a new class called "ItemInfo". Replace with the following code: **ItemInfo:** public class ItemInfo { public string Name { get; set; } public string SelectionType { get; set; } } In your form, (ex: Form1.cs), do the following: Create a … | |
Re: To start: progressBar1.Style = ProgressBarStyle.Marquee; progressBar1.MarqueeAnimationSpeed = 30; progressBar1.Visible = true; To stop: progressBar1.Visible = false; Additionally, to stop it, you could add: progressBar1.Style = ProgressBarStyle.Continuous; progressBar1.MarqueeAnimationSpeed = 0; Although, it is probably unnecessary. | |
Re: I'm confused by your explanation. How do you go from 11110011 to 1,2,3,4,9,12 ? How is "minimum support" defined? What kind of comparison do you want to do? Integer? Can you try to re-explain it. Also, what problems are you having? |
The End.