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

Why don't you just wait until you actually start the job with Samsung before you go job hopping?

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

Try changing

[Fen_Inovoice_No]='" & TextBox1.Text & "'"

to

[Fen_Inovoice_No]=" & TextBox1.Text

Without seeing your DDL I suspect that Fen_Inovoice_No is being stored as a number, in which case you do not need the single quotes.

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

But I'm not bitter.

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

Incidentally, if the US does intervene, I expect the first consequence will be an immediate rise in the price of gasoline due to "uncertainty" in the supply of mideast oil. It will be immediate in spite of the claim by the oil companies that it takes three months for oil to work through the system (the justification for why prices at the pump do not drop immediately in response to a drop in the price of crude).

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

If the US wants a military action they will have their military action. If they don't have evidence then they'll just make [stuff] up like they did with the Gulf of Tonkin in Viet Nam and the baby-killers in the Gulf War.

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

I think that with the use of gas on his own people was crossing a Rubicon.

Has there been any definitive proof that shows which side was responsible for the use of the chemical weapons?

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

As soon as the news broke about the use of chemical weapons, Washington started demanding that UN inspectors be allowed in. Assad gave the official nod to the inspectors, then Washington stated that the inspections were pointless because Assad's consent was "too late to be credible". This in spite of statements by experts that chemical agents used in weaponry take years to dissipate. In one case, sarin was detected four years after it was used in Northern Iraq. It would seem that Washington made these demands expecting them to be refused, thereby using the refusal as an excuse for military action.

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

A supposed debate on CNN about what the US should do about Syria showed how "fair and balanced" the media is being. One side advocated bombing now while the opposing viewpoint was "we should have started bombing long ago". I'm reminded of the Bugs Bunny, Daffy Duck, Elmer Fudd cartoon. "Do you want to shoot him now or wait until you get home?"

<edit>The debate was on Aug 27</edit>

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

Using paramaterized queries your insert build becomes

cmd.CommandText = "INSERT INTO Mobilization (Fen_Telephone_No, Fen_Inovoice_No," _
                & "    Fen_VAT_No, [Date], Fen_Fax_No, Source_of_order, Totalamount," _
                & "    NBT_Value, NBT_Amount, VAT_Value, VAT_Amount, Grand_total," _
                & "    Contract_Name, Client_Name, Moblization_Value,Moblization_Percentage) " _
                & "VALUES(@Fen_Telephone_No, @Fen_Inovoice_No, @Fen_VAT_No, @Date," _
                & "       @Fen_Fax_No, @Source_of_order, @Totalamount, @NBT_Value," _
                & "       @NBT_Amount, @VAT_Value, @VAT_Amount, @Grand_total, @Contract_Name," _
                & "       @Client_Name, @Moblization_Value, @Moblization_Percentage"

cmd.Parameters.AddWithValue("@Fen_Telephone_No      ", textbox1.Text)
cmd.Parameters.AddWithValue("@Fen_Inovoice_No       ", textbox2.Text)
cmd.Parameters.AddWithValue("@Fen_VAT_No            ", textbox3.Text)
cmd.Parameters.AddWithValue("@Date                  ", textbox4.Text)
cmd.Parameters.AddWithValue("@Fen_Fax_No            ", textbox5.Text)
cmd.Parameters.AddWithValue("@Source_of_order       ", textbox6.Text)
cmd.Parameters.AddWithValue("@Totalamount           ", textbox7.Text)
cmd.Parameters.AddWithValue("@NBT_Value             ", textbox8.Text)
cmd.Parameters.AddWithValue("@NBT_Amount            ", textbox9.Text)
cmd.Parameters.AddWithValue("@VAT_Value             ", textbox10.Text)
cmd.Parameters.AddWithValue("@VAT_Amount            ", textbox11.Text)
cmd.Parameters.AddWithValue("@Grand_total           ", textbox12.Text)
cmd.Parameters.AddWithValue("@Contract_Name         ", textbox13.Text)
cmd.Parameters.AddWithValue("@Client_Name           ", textbox14.Text)
cmd.Parameters.AddWithValue("@Moblization_Value     ", textbox15.Text)
cmd.Parameters.AddWithValue("@Moblization_Percentage", textbox17.Text)

This not only makes it easier to match textboxes to specific fields but it automatically adds single quotes around fields that require quoting. Note that I replaced "Date" in the query with "[Date]" to prevent a conflict with a SQL reserved word. You can modify your update query accordingly.

You also might have a typo in the field name Fen_Inovoice_No. I suspect you want Fen_Invoice_No

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

It's not a complicated thing and it does not require databinding. If your teacher says it is a complicated thing then I suggest you take everything he/she says with a grain of salt.

Because this is an assignment I will not give you the code but here is a hint. Every time someone makes a change to the text in the textbox you want to change the label to be the same as the textbox. So you have an event that you want to respond to. It only requires you to write one line of code. Let me know if that helps.

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

We can't tell you what is wrong with your query unless you show us what the query looks like. It's likely a problem with a missing, superfluous, or mismatched single quote. You should rewrite your code to use parameterized queries. This will make the code easier to read and debug.

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

That error message is from the DBMS when you try to execute the query. I need to the see the value of sql before you execute the query. Posting the error message alone is as useful as saying "what is wrong with my code" without posting the code for us to see.

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

Does anyone recall the movie, Reds? Jack Reid is asked to give a speach on why the US is getting involved in World War 1. He stands up, says "Profits", then sits down. In the 1950s Eisenhower warned about the power of the military industrial complex. Very telling in the above article was the comment President Obama's decision-making will be guided by what is in the best interests of the United States. Note, it is not what is in the best interests of the Syrian people.

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

I agree with AD. Having said that, I fully believe that the US will take military action. There's too much money to be made to stay out. If it's not Syria then it will be Iran. Have you noticed the same weasel words being used by Obama that Bush used when prepping for Iraq? The justification is not "Syria has done x", but rather "We believe Syria has done x". "We believe Iraq has WMDs". Sound familiar? And if, later, it turns out that there was no justification they'll just blame it on faulty intelligence.

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

You have to add a handler to populate listbox2 with new data when you select an item in listbox1

Private Sub ListBox1_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles ListBox1.SelectedIndexChanged

    Dim lbx As ListBox = sender
    MsgBox("You selected " & lbx.SelectedItem)

    'add your code to clear and populate listbox2 here

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

Please add the following line after the creation of the string sql

Debug.WriteLine(sql)

And post the result here. In order to tell you what is wrong with the query we have to see the query. To avoid SQL injection attacks you should be using parameterized queries

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

You haven't included your code for a handler for ListBox1 for a change in selection.

Why do you need a timer to repeatedly get a static value?

You should rename your controls so that the code is clearer.

You should add comments.

You have handlers for two buttons but I only see one on the form.

From now on please upload associated images to Daniweb. If you place them elsewhere and they eventually disappear then this thread loses information that makes it useful to others.

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

Call
On
Many
People
Everywhere
To
Invest
Time
In
Organized
Nimbleness

Automobile

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

Move all the messages in your gmail inbox into a new gmail folder that you create.

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

Jim if that was a poke at mine for Herioc, did I use Integument incorrectly

That was not a poke at you. But

Harpoon - Hello: Anthony, Ryan, Paul, Owen, Omar, Nathan..

showed no effort whatsoever.

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

Can we at least attempt to make the acronym expansion more than just words with the correct initial letter? I think the previous explanation for Mississippi is quite clever but there have been a couple that looked like they were words picked at random out of the dictionary. If the expansion is also related to the acronym then bonus points to you. As for the ultra epic, etc. challenge, I fear it is beyond me.

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

Heroic
Olympic
Canucks
Kill
Event.
Yahoo

Survivor

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

Go to the root of your C drive and type

dir ipconfig.* /s

If it has disappeared from c:\windows\system32 you might still have a copy cached in a sub-folder which you can copy back to c:\windows\system32. Note, youy will need to open a command shell as asministrator to do that.

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

Maybe
It's
Stupid
Touching
A
Knife
Edge

Football

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

Getting
Your
Rotational
Orientation
So
Capsule
Orbits
Planet
Earth

Bonus acronym

Ranting
Eternally
Very
Easily
Ruins
Each
New
Day

Just
In
My (opinion)

next one

Facebook

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

Those three images are supposed to be to Tweet, Google+, or Facebook

Sounds right. I disabled AdBlocker and I don't see them anymore.

Jim, are you using standard login or are you using Login with Facebook, etc?

Standard login. I don't believe in Facebook. I'm going to leave Ghostery and AdBlocker disabled for the nonce and see how things go.

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

I had to repost. The first one never got accepted.

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

I have another post stuck in limbo. I have Ghostery and ADBlock disabled

d5e017f62d437fea90980e8a149abe71

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

You should save the data in a way that makes it easy to parse when you read it back in. For example, if you save it as

Milan - Arsenal;1
Real - Barcelona;2
Milan - Arsenal;7
Celtic - Milan;4
Real - Barcelona;2
Celtic - Arsenal;2

then you can read the file back into a dictionary and display the totals as

Dim dic As New Dictionary(Of String, Integer)

'read the file and calculate totals

For Each line As String In System.IO.File.ReadAllLines("d:\temp\games.txt")
    Dim fields() As String = line.Split(";")
    If dic.ContainsKey(fields(0)) Then
        dic(fields(0)) += CInt(fields(1))
    Else
        dic(fields(0)) = CInt(fields(1))
    End If
Next

'display number of tickets for each game plus grand total

Dim numTickets As Integer = 0

For Each key As String In dic.Keys
    ListBox1.Items.Add(key & " = " & dic(key))
    numTickets += dic(key)
Next

ListBox1.Items.Add("Total tickets = " & numTickets)
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You can't tell what's wrong with a query unless you can see the query. After you create it do

Debug.WriteLine(SqlCommand.CommandText)

and post the results here.

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

After yesterday's problems I disabled

Adblock Plus Pop-up Addon 0.9.1
Ghostery 5.0.3

and still have the following enabled

DivX Plus Web Player HTML5 <video> 2.1.2.145
DownloadHelper 4.9.17
Readability 2.4
Trend Micro BEP Firefox Extension 7.1.0.1104
Trend Micro NSC Firefox Extension 6.8.9.1096

I'll let you know if and when I have any more problems.

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

By the way, the last post also got stuck halfway. I clicked "Submit" and it was apparently accepted (jusging from the above) but it left me in edit mode with no way to exit other than shutting down.

I don't know how many other new users are having problems like this but if they are, how many of them are just saying "the hell with it" and going elsewhere? You said you were wondering if this was related to the sudden drop off in traffic. Maybe it is.

I am aware that my constant ranting on this topic is getting tiresome and I apologize but you can't imagine my level of frustration.

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

Dammit dammit dammit. I uploaded two different files but the same iumage got inserted twice. I was very careful and I even previewed the image before uploading so it is definitely not user error.

9addd950734a9b0162f1544d8b00925a

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

I think i see the solution. I just have to get mad enough while I submit the post. Anyone (happygeek) recall Basil Fawlty thrashing his car to make it start?

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

This is getting to the point where I just do not even want to log on anymore. I'm trying to post one image of something unusual I noticed. The image uploaded but the post only got half submitted. When Ii quit Firefox then restarted the post was not there. If I can't upload the two images then (Dani) please email me a regular email address that I can use to send you the info. The first image shows what happens every time I go to a new forum. Three rectangles get rendered at the top of the screen, then get erased. The second image shows my previous unsuccessful post in a state of limbo.

b690646c227ff6ca12ca4b6be5bd2f75b690646c227ff6ca12ca4b6be5bd2f75

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

Well I'll be dipped in (deleted). I've been using SQL for years and I was never aware you could do that.

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

And I couldn't help but notice that no one is disagreeing with my " I must be the stupidest person..." comment.

Hmmmmmm ;-P

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

I've logged in several times today. On two of those occasions I had a discrepency in my login status. The page in the first image (which, hallelujah) finally uploaded clearly shows that I am not logged in, however, when I clicked Log In, instead of showing me the login dialog, it took me to the Edit My Profile page (second image), which clearly indicates that I was already logged in.

I am currently logged in and the system is reflecting that i am logged in.

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

And of course it works now!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

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

Go back and reread the second paragraph. Of course you don't see any pictures because even after multiple tries I couldn't get them to upload. They weren't too big. I exited Firefox and cleared the cache repeatedly. I click on Browse and select the file (the name appears in the textarea next to the browse button. Then Ii repeat the same operations to get the second file. I then click Submit Your Reply and the bloody files don't get attached.

They upgraded the cell tower in my area so my connection status is the full five bars. And yet, the uploading of files is still completely unreliable.

You just cannot imagine how frustrating and irritating this is, and has been, for many months.

Let me try to describe the sequence of events again (and I will try yet again to attach the screen shots). I click my bookmark that takes me directly to the vb.net forum. Ii click Log In and log in. I scroll down the page and stare in wonderment at how all the threads that I am current on are all flagged New until I notice that I am apparently not logged in. I click on Log In again and instead of getting the login prompts I get the Edit Profile page indicating that I am in fact already logged in.
481bd28ee963a2c4ac3843012d37bae0e70f26e28aaf38c2cbbf2d410817684b

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

I have a link on my toolbar (Firefox 23) that takes me directly to the vb.net forum. Of course, I log in before I do anything. A couple of times today after logging in my screen looked like the first attached image. Thinking I was having a senior moment and just forgot to log in I clicked Log In and saw the second screen.

This is the third (very rude word) time I've edited this post (exiting Firefox and clearing the (same rude word) cache each time and I still can't get the (extremely rude and offensive gerund) files to attach. I cannot be the only person who is having this problem. If I am then I must be the stupidest person who ever used a computer to not be able to figure out why this does not bloody well work!!!!!!

The first picture shows I am not logged in. The second picture shows that clicking on Log In took me to www.daniweb.com/members/edit_profile

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

Show us your code.

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

You can do an insert with fewer columns as long as the missing columns are not required or are auto-increment. For example, if you have the table (and I am defining it with pseudo keywords rather than actual keywords)

Employee
    EmpID       identity (auto-increment) primary key
    LastName    string required
    FirstName   string required
    PriPhone    string required
    AltPhone    string optional

then you could do

INSERT INTO Employee (LastName,FirstName,PriPhone)
       VALUES("Parker","Peter","555-2222")

but not

    INSERT INTO Employee (LastName,FirstName)
       VALUES("Parker","Peter")

In the first case the inserted record would contain

MAX(EmpID)+1, "Parker", "Peter", "555-2222", NULL
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Uhhhm. Thank you.

You make it sound like I gave you either an incorrect or inappropriate response. I didn't say it was a great example. I just said it was an example. Waldo de los Rios did contemporary arrangements of classical pieces (among other things), thus fatback and Haydn. That the drumming was called "fatback" was pointed out to me by a friend who was not only a professional drummer (who also played with the Saskatoon Symphony) but a veterinary medicine major (it was during my college days).

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

It's a style of drumming. The only example I can think of was in an arrangement by Waldo de los Rios of the Haydn Toy Symphony, second movement.

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

Here's an interesting one. Two people (one of them me) posted a link to the same article, however, both links got scragged by the profanity filter (warning, rude word coming). The actual link contained the segment (remove spaces)

i n v e s t m e n t w a t c h b l o g

except that it replaced t w a t with #### thereby rendering the link invalid.

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

You are correct. The dictionary does not allow duplicate keys, however, in my example there are no duplicate keys. I populated twp comboboxes with

the
quick
brown
fox

and the output is

ComboBox2-0: the
ComboBox2-1: quick
ComboBox2-2: brown
ComboBox2-3: fox
ComboBox1-0: the
ComboBox1-1: quick
ComboBox1-2: brown
ComboBox1-3: fox

You see that I avoided the duplicates by adding the index value to the key. Note the "-" separator so that you can recover the exact name of the combobox.

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

Try

Public Class Form1

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

        Dim dic As New Dictionary(Of String, String)

        For Each cbx As ComboBox In Me.Controls.OfType(Of ComboBox)()

            For i As Integer = 0 To cbx.Items.Count - 1
                dic.Add(cbx.Name & "-" & i, cbx.Items(i))
            Next

        Next

        'display the dictionary in a listbox for debug

        For Each key As String In dic.Keys
            ListBox1.Items.Add(key & ": " & dic(key))
        Next

    End Sub

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

The MouseMove appears to operate only within the text area of the combobox and not when the dropdown is active. I don't have anything to suggest in this case but because the original question has been resolved please mark this thread as solved.

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

I wonder what <snip> is?

That's what is left behind when a moderator has removed something from a message such as a link to a website that has been flagged or spam links.