4,901 Posted Topics

Member Avatar for Reverend Jim

In the user profile under contributions there are line items for Discussion Threads and Code Snippets. How about adding an item for Tutorials?

Member Avatar for Reverend Jim
0
118
Member Avatar for rihab_1
Member Avatar for Reverend Jim
0
3K
Member Avatar for pezza
Member Avatar for pezza
0
138
Member Avatar for k99rs
Member Avatar for ruhestorer

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?

Member Avatar for rch1231
0
2K
Member Avatar for serrurier

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 …

Member Avatar for Reverend Jim
0
384
Member Avatar for Begginnerdev

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 …

Member Avatar for Reverend Jim
0
282
Member Avatar for Ancient Dragon
Member Avatar for Ancient Dragon
0
2K
Member Avatar for henryz_box

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 = …

Member Avatar for henryz_box
0
330
Member Avatar for martuspatatus

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 …

Member Avatar for martuspatatus
0
2K
Member Avatar for jaejoong

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.

Member Avatar for riahc3
0
394
Member Avatar for iFrolox

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 …

Member Avatar for DreamForLives
0
458
Member Avatar for Nebil
Member Avatar for NardCake

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 …

Member Avatar for jwenting
1
493
Member Avatar for raheel88

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 …

Member Avatar for dionterry
0
3K
Member Avatar for Nebil

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] " & " …

Member Avatar for Nebil
0
161
Member Avatar for Lethugs
Member Avatar for Lethugs
0
356
Member Avatar for GeneM1000

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

Member Avatar for GeneM1000
0
318
Member Avatar for <M/>

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 …

Member Avatar for Agilemind
1
420
Member Avatar for thera

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), …

Member Avatar for Reverend Jim
0
188
Member Avatar for AmrMohammed

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 …

Member Avatar for Jefferson_1
0
204
Member Avatar for Nebil

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 …

Member Avatar for Nebil
0
290
Member Avatar for Start4me

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.

Member Avatar for arun1123
0
641
Member Avatar for aboy belo
Member Avatar for help distressed

It would be fast enough if you lived in Chatanooga. They have incredibly fast (publicly owned) internet there.

Member Avatar for Ancient Dragon
0
501
Member Avatar for Reverend Jim

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.

Member Avatar for jwenting
0
272
Member Avatar for Badshah khan

It might help if you posted the error message and number. What version of Windows are you running?

Member Avatar for Reverend Jim
0
47
Member Avatar for Tcll

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.

Member Avatar for Ancient Dragon
0
377
Member Avatar for adam.wolnikowski.9

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 …

Member Avatar for adam.wolnikowski.9
0
255
Member Avatar for Satyam_1

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 & "','" & …

Member Avatar for Reverend Jim
0
7K
Member Avatar for ckide

It makes a nice companion site for [99 bottles of beer on the wall](http://www.99-bottles-of-beer.net/)

Member Avatar for vmanes
0
415
Member Avatar for Gen_2

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.

Member Avatar for Reverend Jim
0
778
Member Avatar for Mr.M

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 …

Member Avatar for Reverend Jim
0
202
Member Avatar for minitauros

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.

Member Avatar for Stuugie
0
652
Member Avatar for gesteiger

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.

Member Avatar for Reverend Jim
0
276
Member Avatar for caello
Member Avatar for jalferez1

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 …

Member Avatar for Sifiso21031085
0
212
Member Avatar for riahc3

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.

Member Avatar for riahc3
0
265
Member Avatar for pbarks1

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.

Member Avatar for Reverend Jim
0
2K
Member Avatar for jsherm101

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

Member Avatar for Tcll
0
539
Member Avatar for t3cho

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 …

Member Avatar for oussama_1
0
249
Member Avatar for Yogesh_5
Member Avatar for Reverend Jim
0
213
Member Avatar for azareth
Member Avatar for riahc3

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 …

Member Avatar for Reverend Jim
0
426
Member Avatar for Reverend Jim
Member Avatar for ryklon

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.

Member Avatar for Alosh
0
771
Member Avatar for Sifiso21031085

I hear they just bought out Oculus Rift for $2 billion ($400 million cash plus Facebook stock).

Member Avatar for Dani
0
259
Member Avatar for Samerases
Member Avatar for Reverend Jim
0
158
Member Avatar for babyluxe03

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] …

Member Avatar for Reverend Jim
0
240
Member Avatar for McNoobie123

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 = …

Member Avatar for Reverend Jim
0
207

The End.