Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Replace

dt = ExecuteQuery("UPDATE tblUsers SET UserID = " & txtUserID.Text & ", UserName = '" & txtPassword.Text & "', Password = " &
                          txtPassword.Text & ", LastName = '" & txtLastName.Text & "', FirstName = '" & txtFirstName.Text & "', Position = '" &
                          txtPosition.Text & "', Address = " & txtAddress.Text & ", EmailAddress = " & txtEmailAddress.Text & ", SSS_ID = " &
                          txtSSS.Text & ", ContactNumber = " & txtPhone.Text & " ")

with

dim query as string = "UPDATE tblUsers SET UserID = " & txtUserID.Text & ", UserName = '" & txtPassword.Text & "', Password = " &
                          txtPassword.Text & ", LastName = '" & txtLastName.Text & "', FirstName = '" & txtFirstName.Text & "', Position = '" &
                          txtPosition.Text & "', Address = " & txtAddress.Text & ", EmailAddress = " & txtEmailAddress.Text & ", SSS_ID = " &
                          txtSSS.Text & ", ContactNumber = " & txtPhone.Text & " "
Debug.WriteLine(query)
dt = ExecuteQuery(query)

and post the output of Debug.WriteLine in this thread. Because the problem is with your query it would help to know what query the DBMS is executing. Incidentally, with some constructive code formatting you can get

dim query as string = _
      "UPDATE tblUsers " &
      "   SET UserID        =  " & txtUserID.Text & "," &
      "       UserName      = '" & txtPassword.Text & "'," &
      "       Password      =  " & txtPassword.Text & "," &
      "       LastName      = '" & txtLastName.Text & "'," &
      " …
M.Waqas Aslam commented: nice +7
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

This post by Joel Grus is both insightful and highly entertaining. Make sure to read the comments which are also witty and amusing.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If you are referring to that bullshit about Xmas as opposed to Christmas then you will continue to be downvoted for your repeated ignorance.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

And it's been used for several hundred years and is no way associated with any bogus conspiracy theory about some non-existant war on Christmas. And I am tired of having this conversation every Christmas.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Aside from the food, my family is not big into Christmas. Despite the moniker we are all godless heretics here. We also don't go in for the lavish gift-giving (obviously the recession was our fault). Our biggest gift this year was having our eldest son home from Long Island for an entire month instead of the usual 10 days. And even though we are a family of non-believers (God, Jesus, Santa) we take no offense at any expression of the season (Merry Christmas, Happy Hanukkah, etc.) that wishes us well. So in that vein, Merry Christmas, Happy Holidays/Hanukkah or whatever. I hope the season finds everyone happy and healthy.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

What's a holiday? I'm retired.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If you need the punctuation marks then you are better off doing as ddanbe says - char by char. Usually, puntuation marks are used as delimiters and are not considered as part of the data. In that case you get

Imports System.Text.RegularExpressions

Public Class Form1

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

        Dim rex As New Regex("[a-z|A-Z|0-9]")
        Dim str As String = "abc,123.xyz;praise;end,file,clear"
        Dim tok As String = ""

        For Each ch As Char In str.ToCharArray

            If rex.IsMatch(ch) Then
                'letter or digit - add it to the token string
                tok &= ch
            Else
                'punctuation - display two tokens and clear string
                Debug.WriteLine(tok)
                Debug.WriteLine(ch)
                tok = ""
            End If

        Next

        If tok.Length > 0 Then Debug.WriteLine(tok)

    End Sub

End Class
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You could use regular expressions as follows

Imports System.Text.RegularExpressions

Public Class Form1

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

        'the pattern matches the longest string of letters and/or digits

        Dim rex As New Regex("[a-z|A-Z|0-9]+")
        Dim str As String = "abc,123.xyz;praise;end,file,clear"

        For Each m As Match In rex.Matches(str)
            Debug.WriteLine(": " & m.Value)
        Next

    End Sub

End Class
ddanbe commented: Indeed an option if you know regex well! Perhaps I should start learning. +15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Most people don’t get sick, and so free health care is just that, free health care, until you get sick. Then, if you get sick and you don’t get health care, you die and you don’t vote. It’s actually a pretty clever system. Take care of the people who can vote and people who can’t vote, get rid of them as quickly as possible by not giving them care so they can’t vote against you. That’s how it works.”

Rick Santorum speaking at a Young Americans for Freedom event Friday at the Reagan Ranch. The video for this amazing clip can be seen here

So according to Rick, Obama is giving everyone free health care (it isn't free) because if he doesn't, poor people will get sick and die and not be able to vote against him.

Outstanding!

mike_2000_17 commented: LOL! +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The Desolation of Smaug (The Hobbit part 2) 3D

Unnecessarily drawn out in parts (the confrontation with Smaug, for example) but at almost 3 hours, Peter Jackson sees that you get your money's worth. I still think it should have been done in two parts instead of three.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Aren't the undergarments seen as a source of protection from the evils of the world? Sounds like magic underpants to me. And I believe the Mormon Church teaches that native Americans are descended from the Lamanites so by extension that makes all native Americans wicked.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Check them out to learn more

More than magic underpants and non-whites being descended from the evil side of the family tree? What more do I need to know?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You are in your 2nd year of IT and you don't know how to make a form? And you are blaming your professor because he didn't teach you? Daniweb is not a homework service. We will answer specific questions but first you have to show that you have put in some effort yourself.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Got you beat. I'm turning 60 on Sunday.

its awful moment happen in my life

Sorry to hear you are going through a rough patch. I hope you have friends and/or family to help you through.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Try creating a form with one button in the top left. Set the form AutoScroll to True and use this code

Public Class Form1

    Const ROWS As Integer = 100     'number of rows         
    Const COLS As Integer = 3       'number of columns      

    Const BOXW As Integer = 100     'textbox width          
    Const BOXH As Integer = 20      'textbox height         
    Const BOXM As Integer = 3       'margin between boxes   

    Private TextBoxes(ROWS, COLS) As TextBox

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        For row As Integer = 1 To ROWS
            For col As Integer = 1 To COLS

                Dim xpos As Integer = 10 + (col - 1) * (BOXW + BOXM)
                Dim ypos As Integer = 50 + (row - 1) * (BOXH + BOXM)

                Dim newbox As New TextBox
                newbox.Size = New Drawing.Size(BOXW, BOXH)
                newbox.Location = New Point(xpos, ypos)
                newbox.Tag = {row, col}
                newbox.Text = "Textbox(" & row & ", " & col & ")"
                AddHandler newbox.TextChanged, AddressOf TextBox_TextChanged
                TextBoxes(row, col) = newbox
                Me.Controls.Add(newbox)

            Next
        Next

    End Sub

    Private Sub TextBox_TextChanged(sender As System.Object, e As System.EventArgs)

        Dim tbx As TextBox = sender
        Me.Text = "Box(" & tbx.Tag(0) & ", " & tbx.Tag(1) & ") is " & tbx.Text

    End Sub

End Class

By storing the textbox references in an array you get easier access later on. By storing the array {row, col} in the tag you can easily back-reference the coordinates. Also, by creating the Consts for the size and number of boxes you can change …

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

"It's not a bug; it's a feature." - anonymous

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Pentatonix doing a cover of Royals

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Fill the bars with Christmas drinking
fa la la la la la la la la
See the people getting stinking
fa la la la la la la la la
Though their brains are half corroded
fa la la la la la la la la
Still they try to drive home loaded
fa la la la la la la la la

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You have to put some effort in yourself first. So far you haven't even properly defined the problem. What have you got so far?

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

For starters, the target of AS should not be in quotes

SELECT name, sum(quantity), price, price * sum (quantity) AS value
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Xmas as an alternative to Christmas actually dates back several hundred years. The X comes from the Greek letter, chi, which is the first letter of the word that we know in English as Christ.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

It makes you wonder why so many people who claim to believe in God/Jesus are so afraid of dying when they also supposedly believe that their death would bring an end to suffering and the beginning of eternal bliss. By the way, Mike, you might find this amusing.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Try to stay on topic. Mandella is another thread.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

At least he isn't creating bogus accounts and endorsing himself. That would be pretty low.

<M/> commented: ikr... +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

A typical statement to insert multiple rows at a time looks like

INSERT INTO table (fldname1, fldname2, fldname3)
       VALUES(val1, val2, val3),
             (val4, val5, val6),
             (val7, val8, val9)

Just modify for your particular database columns.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

"We the People are the rightful masters of both Congress and the Courts, not to overthrow the Constitution, but to overthrow the men who pervert the Constitution."

Abraham Lincoln

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Each of us knows something but all of us know everything. - me

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I don't think they teach huck finn in American schools any more becuse it is rather racist.

That was one of my favourite books in high school and I consider it far from racist. Showing how slaves were treated is not racist and having Jim as one of the most human characters in the book certainly is not racist. One of the central themes of the book was the evolution of Huck's point of view from the unthinking acceptance of that period's attitudes toward blacks, to the belief that Jim was better than most of the white folks Huck knew. The only thing I can think of for it being thought racist was the use of the pejoritive that apparently cannot be used even to make a point about the inhumanity of using it. Silly.

diafol commented: Agreed +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Also, Dickens wrote dialog that reflected the way people actually spoke rather than putting proper English into the mouths of people who wouldn't know how to use it.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Splitting infinitives and ending a sentence with a preposition are two good examples of awkward and unnecessary rules.

I agree. That's why we have the distinction between formal and conversational English but I think we have relaxed the language too much. I also hear sentences like "Me and Bert are going to the store." That's like the difference between relaxed-fit pants and hanging-half-off-your-a$$ pants.

"Do not end a sentence with a preposition"

Ditto. I'm reminded of a (sort of) joke where a "proper" Boston woman is in a Missouri restaurant. The waitress, upon hearing her accent, asks "where y'all from?".

The woman replies, snootily, "I'm from where we do not end sentences with a preposition."

The waitress ponders this for a moment then says. "I see. In that case, where y'all from, bitch."

Incidentally, I also have a problem with it's and its. Fortunately it's not much of a problem in spoken form.

stultuske commented: love the joke :) +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I aim to please but I believe I answered every question put to me. There is no question in this thread having anything to do with an inbuilt Visual data manager. That question was in this thread. In that thread I said I was unaware of the visual data manager capabilities of vb.net but I suggested what I thought was an alternative option (and a far better one than relying on anything which may be bundled with Visual Studio). Anyone else browsing that thread with advice to the contrary was free to hop in. Since I was the only one who responded then my advice was all you got. Without that you would have none.

As for the date format, when asked, I explained what I meant by System Date Format and I attempted to get more information on your column definition in order to provide a more accurate answer.

Having said that, I will take your comments into consideration. I appreciate you taking the time to voice them.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I can't take it anymore. At first it was only occasionally. Now it seems that every time I turn on the TV someone else is doing it. Doesn't our school system teach English anymore? I am referring, specifically, to pronouns. At least three times today I have heard expressions like "of, course, that's just between you and I" and "the party was for Susan and I".

I'll say it just one more time.

When used as the subject, use "I" instead of "me" as in "Andrew and I went to the movie". When used as an object either of a verb or a preposition, use "me" as in "the party was thrown for Susan and me." The easiest way to tell which to use is to replace the compound (Andrew and me) with the non-compound (me) and see if it still sounds right. Take the following sentence:

The party was thrown for Susan and I.

Which of the following two sounds right?

The party was thrown for I.
The party was thrown for me.

Simple, isn't it? Most of the confusion, I suspect, is from formal English phrases such as the following:

My brother is taller than I.

In formal English, I is gramatically correct because the sentence ends with an implied am as in

My brother is taller than I (am).

In conversational English, ending the sentence with me is considered proper. However, people who want to sound educated (most TV writers, I suspect) feel that always using the …

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Let's keep in mind that while there are genuine "experts" here on daniweb, there are also a lot of regular folk like me who are competent, but far from experts. I may not know more things than the person posting a question, just different things, so I may be answering a question one day and asking one the next. I also have the benefit of many years of experience which have taught me that there are many cases where the slick or clever solution is not the desirable (ie maintainable) solution.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

In the history of the United States, 168 presidential nominees have been filibustered. Half occurred under all presidents from Washington through to Bush. The other half has taken place under just one president: Obama.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

A transaction log does not necessarily imply a database. It could be as simple as one or more files of the form name.log which could be simple text files. That's what I used for several dozen applications in my corporate environment. If the name is of the form yyyy-mm-dd.log or yyyy-mm.log then you can keep the log files from growing indefinitely. All you would have to do is open the file for append (create if not present). That simplifies the complexity and the code considerably. It also means you don't need a special program to view the logs. It also makes it easier to search with something like GREP.

Begginnerdev commented: Might help if I read the question a little better next time, huh? +9
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I suspect it was for personal reasons that have little or nothing to do with daniweb.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

In my opinion that comment was rude and uncalled for. I was voicing an opinion and trying to explain in a rational manner why I have that opinion. You, on the other hand are contributing nothing to the discussion.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Users who are set as invisible show up by name in the left panel when they participate in the conversation anyway so basically the invisible status is only beneficial to lurkers who want to follow the conversation without being seen to be present. That just seems wrong to me. I don't like the idea of not knowing who is listening in. I think if someone has chosen to participate in a ShoutBox then the other participants have a right to know this. It was my understanding that the invisible option was to block the online status from being shown. I see no reason why the invisible status should apply to chat.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

When you consider the conditions under which the vast majority of humanity lives I consider myself very fortunate to be living the life I was given. If I were to be reincarnated, the odds of my ending up in an unendurable (compared to my current situation) life are almost guaranteed. I'd just as soon not take the chance.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

or be reincarnated with my current memory

Not me. Too much baggage.

diafol commented: Big Agree! +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

More than all the oceans. There isn't enough water in the world to account for the flood. And have you considered that if you emptied the oceans to flood the land, the water would just run back in? But, again, we are getting off topic. And there's not really much point in arguing with someone who refuses to let those pesky facts get in the way.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I had a read and responded on the site with the comment

I think the more likely explanation is an error in translation. The average lifespan in Egypt 3,000 years ago was 35 years. 40 and over was considered old. Less elsewhere. If you take 969 as the number of months that Methuselah lived rather than the number of years then that would have made him about 80 which, while not as impressive as 969 years is still remarkable for that time and certainly worthy of recording.

ddanbe commented: Exellent comment I should say. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

And, BTW, that was only 10,000 years ago.

Or possibly even last Thursday. It's just as probable as 10,000 years and there's just as much proof.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I downloaded the project, loaded it into Visual Studio 2010 and did a build. Then I opened explorer and used Open With on temp.xxx (a text file) and set Advanced Notepad.exe in the bin\debug project folder as the default app. Now when I double click on test.xxx your application runs and loads text.xxx just like it is supposed to. As far as I can tell it is doing what you want it to do.

Deep Modi commented: thanks for testing and support from you +1
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

he said he had a Ph.D. in everything.

Of course, it will take him the rest of his 1000 years to pay off his student debt.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

you might get eaten by a big bird of some sort.

Romney was right in threatening to get rid of Big Bird. I always though BB had a secret agenda.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Yes, because it doesn't work due to too many people abusing the system

Republicans want to defund SNAP but they aren't proposing anything to take its place to help the people that need it. In effect they will cut off everyone in order to prevent abuses. I notice they increased agricultural subsidies. I guess there are no corporations abusing the system. I give as much credence to their claims of SNAP abuse as I do to their claims of voter fraud (the reality is essentially non-existent as opposed to their claims of "rampant")

What makes you think they already receive health care?

Reread my post. I didn't say they already received health care. I asked why they wanted to keep millions of Americans from receiving affordable health care.

One father said of TV just this morning that it will cost him at least another $500.00 per month

I see Sean Hannity had three married couples on to talk about how the ACA was going to hurt them. One couple claimed how it would hurt their construction business. They would have to restrict the hours of employees to keep them as part time because of the increased costs. They have only four employees and under the ACA, their only requirement is to make employees aware of the ACA website. There is no cost to do that so they are either lying or ignorant.

The second couple was paying $1100 a month for a policy under …

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Handy tip - under Windows if you press alt-printscreen it captures only the active window.

Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

This news item is now over a year old. Can we un-sticky it and just let it bubble to the top when someone posts?

happygeek commented: done +12
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Because the competition is long over and now off topic perhaps this thread could be "un-stickied" now.

happygeek commented: :) now unstuck +0