4,901 Posted Topics
In the user profile under contributions there are line items for Discussion Threads and Code Snippets. How about adding an item for Tutorials? | |
Re: You'll have to explain that a bit better. I don't understand what you are asking. | |
Re: Can you show the code and the values at various stages so we can try it for ourselves? | |
Re: google **how to create a windows service in vb.net** | |
Re: Can you give us an example of how LP31389-7.LP18116-1.LP16832-5.LP175708,7,LP175708,LP181867-5,"2,3',4,4',5-Pentachlorobiphenyl (PCB) | Bld-Ser-Plas" should look after it is split up into separate fields? | |
Re: And we're back to the real debate. Is the Windows 8/8.1 interface significantly better than Windows 7 or is it just different? If it **is** that much better then that's just fine, but if not then it is just change for the sake of change and that is **not** fine … | |
Re: If you use BigInteger as in Private Sub FibWrite() Dim sw As New System.IO.StreamWriter("d:\temp\fib.txt") Dim n0 As BigInteger = 0 Dim n1 As BigInteger = 1 Try For i = 1 To 1000 Dim iTemp As BigInteger = n1 n1 = n1 + n0 n0 = iTemp sw.WriteLine(n1) Next Catch … | |
Re: What .net framework are you running. I think you need at least 4.0 (possibly 4.5) | |
Re: You could store each player's cards in an array and assign the ListBox DataSource as needed. Here is an example: Public Class Form1 Private list1() As String Private list2() As String Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load list1 = {"a", "b", "c", "d", "e"} list2 = … | |
Re: I suggest you use regular expressions. I can give you an example but first I would have to know the range of values that you will be replacing. For example, will the value in quotes always be three digits? Does the string l="600" always appear on its own line or … | |
Re: In MS SQL you can do SELECT TOP 5 * FROM myTable ORDER BY NEWID() I believe MySQL has this feature as well. NEWID() generates a globally unique identifier (GUID) in memory for each row. By definition, the GUID is unique and fairly random. | |
Re: To add encryption of the ini file you could try changing the IO code as follows Public Function INIRead(ByVal INIPath As String, ByVal SectionName As String, _ ByVal KeyName As String, ByVal DefaultValue As String) As String ' primary version of call gets single value given all parameters Dim n … | |
Re: Try IF OBJECT_ID('myTable','U') IS NOT NULL DROP TABLE myTable | |
Re: When you learn to play a musical instrument there is a reason that music theory is not taught until the basic playing skills have been acquired. As Mike says, it is important to keep the interest up and that means getting the student to write something quickly. It doesn't have … | |
Re: Assuming that you are replacing the text in the file with the new text, I would do the following Dim text As New System.Text.StringBuilder text.Append("1st line of text" & vbCrLf) text.Append("2nd line of text" & vbCrLf) text.Append("3rd line of text" & vbCrLf) . . . System.IO.File.WriteAllText(filename,text.ToString()) Depending on how many … | |
Re: Try qry2 = "SELECT * FROM [per_diem_accomodation] " & " WHERE [project number] = '" & projcode & "'" & " AND [employee number] = '" & empcode & "'" & " AND [current month] = " & " (SELECT MAX([current month]) " & " FROM [per_diem_accomodation] " & " … | |
Re: Try SELECT * FROM Table WHERE DateDeleted < '2014-02-12' OR DateDeleted IS NULL | |
Re: You are referencing the checkboxes as generic controls and the generic control does not have a Checked property. Try referencing as Checkboxes as For Each cbx As CheckBox In Me.Controls.OfType(Of CheckBox)() cbx.Checked = True Next As you pointed out this only looks at controls that are directly in the form. … | |
Re: As you've heard several times over, take your dog to the vet. He/she can check for infection and suggest a cleaning solution which should be used on a regular basis. Dogs with floppy ears like setters, spaniels, basset hounds, etc. tend to be more susceptible to this problem because the … | |
Re: Try Public Class Form1 Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Me.Text = GenerateKey(4, "ABCDEFGHIJKLMNOPQRSTUVWXYZ") End Sub Private Function GenerateKey(nchars As Integer, fromStr As String) As String Dim rnd As New Random() Dim key As String = "" Do While key.Length < nchars key &= fromStr.Substring(rnd.Next(0, fromStr.Length), … | |
Re: If all values in that column have the same value (zero) then sorting on that column won't do much. Here is an example of sorting on two columns using the PUBS sample database SELECT * FROM authors ORDER BY au_lname ASC, au_fname DESC It sorts first by author last name … | |
Re: Do all of the tables have the same structure? What is that structure? Are you getting any error messages? Try changing qry = "INSERT INTO [ptempTable] ([project number],[project name],[description]) VALUES ('" & projcode & "','" & projname ,"'" & description & "')" to qry = "INSERT INTO [ptempTable] ([project number],[project … | |
Re: There are examples [here](http://www.daniweb.com/software-development/vbnet/code/445801/use-parameterized-queries-to-avoid-sql-injection-attacks) for both OleDB and SQLDB. Just modify the code to add the items to a listbox instead of a listview. | |
Re: It would be fast enough if you lived in Chatanooga. They have incredibly fast (publicly owned) internet there. | |
This is likely to be of interest to only the Canadian members of DW, but I would like to hear anyone's thoughts about the upcoming Quebec election and the possibility of another referendum, especially in light of recent setbacks in Scotland's move toward indepenedence. | |
Re: It might help if you posted the error message and number. What version of Windows are you running? | |
Re: The only problems I have had are with drivers for an old Lexmark printer and a Plextor USB TV tuner. I do not agree that XP is "so much better to use". I don't expect vendors to release drivers for all of the hardware for all future versions of Windows. | |
Re: Just because you do Dim txt As TextBox = Me.Controls(name) doesn't mean that **txt** is set to an existing object. If **name** doesn't exist then **txt** will be set to nothing and you will get the error. I suspect you are not creating the control name properly. Print out the … | |
Re: Unless **cmd** is declared outside the If-Then-Else it goes out of scope once you try to execute it. You could try the following Dim query As String = "" If Hbtxt.Checked Then query = "insert into Table1 (ID,Age,Hb) " & "values('" & IDtxt.Text & "','" & Agetxt.Text & "','" & … | |
Re: It makes a nice companion site for [99 bottles of beer on the wall](http://www.99-bottles-of-beer.net/) | |
Re: If the database is in the same place (GEN-PC) and the other computer has access rights then you shouldn't have to change the connection string. | |
Re: The easiest way is For Each filename As String In System.IO.File.ReadAllLines(MyFile) MyCustomSub(filename) Next Just add your file processing code in MyCustomSub. Some people would suggest you use a StreamReader but the file would have to be enormous before memory is a consideration and the above method means you don't have … | |
Re: You have to see the Grand Canyon, and if you get the chance, hike around a bit outside Sedona. My brother has been to the Painted Desert and says it is spectacular. | |
Re: You can't just swap system disks. The OS was installed for specific hardware and will have drivers for that hardware. Even if you got installation media with those computers (and not just the usual restore disks) they will be OEM disks and will likely not be usable on another computer. | |
Re: Please start a new thread for this question. | |
Re: You have to put some effort in first. When you ask an open-ended question like that you might as well ask "how do I write a program". There are many online tutorials available that are easily found via google. If you don't even know how to use google (or you … | |
Re: Why does the DB server have to be on the factory floor where all the vibration is occurring? And if it is a requirement for some reason, there are ways of isolating the server by placing it on a base that will dampen the vibrations. | |
Re: It works for me. What version of vb are you using (I am on vb 2010)? If you added the code after double clicking the picturebox then the code won't execute until you click in the picturebox at run time. Try putting it in the form load handler. | |
Re: >it's important to note this is not a Microsoft failure, and instead a change in direction Semantics. Just like saying "it's not a problem, it's an opportunity" or "it's not a bug, it's a feature". When you remove features that most customers want then I classify that as a failure. … | |
Re: And if you want to attach event handlers to the textboxes just do AddHandler <event>, AddressOf <subname> as in AddHandler TextBox1_TextChanged, AddressOf MyHandlerSub . . . Private Sub MyHandlerSub(sender As System.Object, e As System.EventArgs) You can assign the same handler to all of the textboxes. Just make sure you can … | |
Re: Or For i = 0 to 4 array1(i) = i + 1 array2(i) = i + 1 array2(i+5) = i + 1 Next | |
Re: If you keep your database in RAM then you could set it up for replication to a database on disk so that you would have a permanent version in case of failure. As an alternative to configuring the DBMS to use RAM, you can also create a RAMDISK, then create … | |
Re: I suggest you reconsider connecting via the IP address. Let the infrastructure take care of name/address translation for you and just connect using the server name. Using the IP address could impact database access in a system where clustering/mirroring provides high availability. | |
Re: I hear they just bought out Oculus Rift for $2 billion ($400 million cash plus Facebook stock). | |
Re: What are we supposed to comment on? You didn't offer any explanation. | |
Re: For the first question, the format of the query should be SELECT * FROM Register WHERE Username = 'somevalue' AND Password = 'somevalue' and because in some databases, password is a reserved word, you may have to code it as SELECT * FROM Register WHERE Username = 'somevalue' AND [Password] … | |
Re: The above code is incorrect. If you use If number1 > number2 Then FindLargestNumber = number1 ElseIf number2 > number1 Then FindLargestNumber = number2 End If and you call it with FindLargestNumber(12,12) it will not return a value. Use If number1 > number2 Then FindLargestNumber = number1 Else FindLargestNumber = … |
The End.