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

What do you mean by "extensible application"?

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

In a nutshell, the most basic way is to use ADO. With ADO you communicate with the database through the connection object and the recordset object

You supply a connection string to the connection object then use the Open method to open the connection. You can use the connection object to directly execute SQL queries that do not have to return a result (UPDATE, INSERT, DELETE, etc). You need the RecordSet object when you want to do a SELECT (retrieve records from the database).

Slightly more complicated is to use SqlClient (which is a layer on top of ADO). You can still do the above actions but with slightly different objects. For example you use a DataReader to get records and cycle through them.

Next step up is to use databound controls, DataTables, DataAdapters, etc.

You'll have to do some reading and show some effort to achieve any level of proficiency.

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

Cop out.

The first girl I was smitten with was Barbara Werch in third grade.

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

One of the things that put me off Linux was the large amount on information that is assumed to be common knowledge. If I asked a question I only ever got 50% of what I needed for the solution - even something as simple as enabling a wireless connection to my router. I finally found out after several weeks that I had to install a package that everyone jst assumed I already had even though it wasn't installed when I set up Linux and wasn't offered as an option.

download the installer, run it, click "next" about a dozen times, wait for an incredibly long period of time, and then, possibly restart)

And then uninstall Bing or Ask ToolBar or whatever other crapware gets installed along with it.

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

You have to call Randomize() at the top or you will get the same sequence of numbers every time. Because you are working with such a small set of numbers (by the way, using (0,4) gets you a number from 0 to 3) you will very likely get duplicates. What you can do is generate a list of possible numbers such as {0,1,2,3,4} then generate a random number from 0 to list.Count - 1. That random number will be the index into the list. Once you pick that number you can remove it from the list thus ensuring it will not be repeated.

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

I admit I ignored a lot of the Linux development. But I did that in order to make the point that Linux was not developed to be different from Windows but to be similar to Unix. And Unix was developed long before Windows. But it's good to have people around who will keep me honest ;-P

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

It doesn't work like that in UK. Voters don't vote for the PM, they vote for party members who, in turn, vote for the leader of the party

And if you can buy enough party member seats then you win the election. Same difference.

The process in US is similar, except for the Queen part.k We don't directly elect the President either, but vote for "electors" in November who in turn vote for the President in January the following year.

And the Republicans, after gerrymandering their way into a congressional majority have proposed changing the rules for the Electoral College to get a lock on that as well. But we've already had this discussion elsewhere and this is the Iron Maiden thread.

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

Learn your computing history. Linux doesn't do things the way it does to deliberately be different from Windows. Linux was developed by Linus Torvalds because he wanted a Unix system but couldn't afford the exhorbitant licencing fees. He developed Linux to be like Unix, which was around a very long time before Windows or even PCs. Unix was first released in 1969. Windows 3.0 was released in 1990. The Linux kernel was first released in 1991.

As for the configuration nightmares and having the OS sit in the background - I absolutely agree with you on that. I've been programming proofessionally for almost 40 years. I've tried to make the move to Linux several times and each time I just found the maintenance and configuration too time consuming.

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

as a nation the USA has achieved a situation where the government won't be able to turn its citizens into mindless, obedient, drones of the state

In France when the people were getting screwed over by the system they rioted in the streets. The closest we've seen so far in the US was the Occupy Wall Street movement and that died out when they started arresting people.

I see the time coming quickly when the US government will indeed try to outlaw the posession of weapons and go on the confiscation route.

The screaming and wailing about the government seizing weapons is a political ploy by the Right to discredit the current government. Nothing the Democrats has done indicates any intention to outlaw all weapons. It's all rhetoric to get people to vote with their emotions instead of their brains. Do you really believe that Obamacare was an attempt to kill grandma and grandpa? It was if you believe the Death Panel crap that was spouted by the Right. By keeping the focus on the emotional issues people's attention is taken off things like the environment and the economy.

When governments fear the people, there is liberty. When the people fear the government, there is tyranny. - Thomas Jefferson

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

You have a few problems to clear up before we can answer your question.

  1. You need to use the Code tool to insert code or you lose all formatting (I fixed it up for you this time)
  2. You did not attach any screenshots
  3. Your question is confusing

Please provide more detail.

By the way, you don't need to use ToString on something that is already a string. Just use

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

If she was such a terrible human being why was she elected at least 2 times and served for over 10 years?

If you can convince enough idiots to vote against their own self interest you can get elected. Of course, it also helps if you can get your rich buddies to give you millions for advertising and if you rearrange the voting districts in your favour.

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

Unless my kid grabs an electrified fence, that is.

Well, naturally. I've done that myself and even I had to laugh. Well, afterwards. But I agree with you. Just because I tolerate certain language in specific circumstances doesn't mean I want it in my face everywhere.

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

If you do

Dim fields() As String = TextBox1.Text.Split("-")

assuming that you, in fact, have a date entered in the form YYYY-MM-DD then

fields(0) will contain the YYYY part
fields(1) will contain the MM part
fields(2) will contain the DD part

This will work even if the month and day parts do not have a leading zero. Then to do the math you can do

Diim diff As Integer = Now.Year - CInt(fields(0))
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If you google it you get this

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

Unrelated to the question but worth noting - txtUserSearch.Text is already a String so you don't need to use the ToString method. Just use

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

I'll move this thread to vb-4-5-6 if the OP requests it.

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

The first example you gave me had the columns

First column           Second column
12345678               12345678     
12578                  36894        
69782                  36548        
12547                  16974        
36894                  69836        
36548                  78954        
16974                  99789        
69836                  12578        
78954                  69782        
99789                  12547        
12347965               12578        
                       69782        
                       12547        
                       12345678     

I don't see how you can match these up. Column two violates the unique constraint as 12345678 appears twice, and 12347965 appears in column one but not column two. If, however, if we use the numbers in the second example, we can align them by

Dim col1() As Integer = {12345678, 12578, 69782, 12547, 36894, 36548, 16974, 69836, 78954, 99789, 12345677, 99789, 69836, 12345678}
Dim col2() As Integer = {12345678, 12578, 69782, 12547, 36894, 36548, 16974, 69836, 78954, 99789, 12578, 69782, 12547, 12345677, 99789, 69836, 78954, 12345678}

Dim i As Integer = 0

For Each num As Integer In col2
    Dim item As New ListViewItem
    If i < col1.Count AndAlso col1(i) = num Then
        item.Text = col1(i)
        item.SubItems.Add(num)
        i += 1
    Else
        item.Text = ""
        item.SubItems.Add(num)
    End If
    ListView1.Items.Add(item)
Next

That shows how to take the numbers and align them using a listview as output. Do you know how to get at the Excel data from vb.net?

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

We can't assume the file is tab delimited. We also can't assume that the only line of interest is the line identified by SITUATIONAL. The spec (and I use the term very loosely) stated "search for the keyword "SITUATIONAL" and insert it all into the database". "All" could very well mean the entire block defined ffrom SITUATIONAL to the next SITUATIONAL. My first rule of programming is "if you don't know what the code is supposed to do then you shouldn't start writing it".

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

I'm not sure I see the problem. You go to control panel, then Windows Update, then select Change Settings. Then you pick Install Updates Automatically. Just like Windows 7

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

That becomes a little more difficult. What are we guaranteed?

  1. are there always the same or more numbers in column 2 than column 1?
  2. are all of the numbers in a column unique?
  3. are all of the 8-digit numbers always present in both columns?
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

To illustrate the silliness, one time at work a female coworker was telling me about something she heard another coworker said, and to avoid having the filter obscure the actual wording I'm going to use "shit" instead of what she actually used (which was c-word). See how silly this is sounding already?

Anyway, the actual quote was "I can't believe she actually used the shit-word". To which I replied, if you were going to actually say "shit" why did you bother adding "word" to the end?

As for worrying about children perusing DaniWeb, I certainly wouldn't have wanted my young boys perusing a profanity-laden forum but once they were old enough to use the services here they were past the point of being warped by "colourful metaphors". In any case, the "keep it pleasant" rule would have increased the likelihood that offending posts would have been deleted anyway.

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

Then you'll have to post what the output is because I don't know what you want to do to line things up. While you are at it, can you please post the exact format of the two excel files?

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

It's right there in the Reply to this Discussion button which ends with (Alt+S)

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

how do add the total of items in listview column and display the result in a text box

I was under the impression this was a math problem. You are probably running into problems with your field names (hard to say since you didn't post the error messages). Either rename your fields to eliminate the blanks (delete or replace with underscore) or enclose your field names in "[" and "]". Also, the number of items in the field list must match the number of values in the VALUES clause. In your queries you specified six fields but only three values.

Your while loop won't work. There is no way for it to terminate because you do not change the value of i. Use the form I suggested earlier (for-each).

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

So you want to end up with

12345678      12345678    
   12578         36894 
   69782         36548 
   12547         16974 
   36894         69836 
   36548         78954 
   16974         99789 
   69836         12578 
   78954         69782 
   99789         12547 
12347965         12578    
                 69782
                 12547      
              12345678                
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I want to read the whole thing, search for the keyword "SITUATIONAL" and insert it all into the database and where "SITUATIONAL" will be the key entry for printing it out on the web.

Let's take an example. Using your linked text file, what, specifically do you want to insert into the database? Please define "all". Also, what do you mean by "will be the key entry for printing it out on the web"? Reading the file and extracting text should not be a problem once you can provide more detail.

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

No amount of gun laws are going to prevent those tradegies.

So then let's please put to rest the completely bullshit argument that the solution to the gun problem is more guns. The argument is that guns make you safer. You already have more guns per capita than any other nation on Earth and you also have the highest gun homicide rate of any developed nation. So exactly how are more guns making you safer?

A gun in the home makes the likelihood of homicide three times higher (Kellermann AL et al. Gun Ownership As a Risk Factor for Homicide in the Home. New England Journal of Medicine 1993;329:1084-1119, p. 1084.), suicide three to five times higher (Kellermann AL et al. Suicide in the Home in Relation to Gun Ownership. New England Journal of Medicine 1992;327: 467-72, p. 467., Wiebe, DJ. “Homicide and Suicide Risks Associated With Guns in the Home: A National Case-Control Study.” Annals of Emergency Medicine 2003;41:771-82, p.780.) and accidental death four times higher (Wiebe D.J. Firearms in US homes as a risk factor for unintentional gunshot fatality. Accident Analysis and Prevention 2003;35:711-716.)

For every time a gun in the home injures or kills in self-defense, there are 11 completed and attempted gun suicides, seven criminal assaults and homicides with a gun, and four unintentional shooting deaths or injuries (Kellermann, A. et al. Injuries and Deaths Due to Guns in the Home. Journal of Trauma, Injury, Infection, and Critical Care 1998;45:263-67, p.263.)

Americans are …

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

everyone should give the dead respect

No one should get respect unless it is earned. You don't get respect because you are a teacher, a parent or whatever. You earn respect for being a good teacher or a good parent. You get respect because of the person you are and the character you show. You don't automatically get it because you had the misfortune to die.

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

My two sons.

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

If you do a manual delete then you might want to use the registry cleaner feature of ccleaner to do the registry cleanup for you.

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

Current federal law requires criminal background checks only for guns sold through licensed firearm dealers, which account for just 60% of all gun sales in the United States. A loophole in the law allows individuals not “engaged in the business” of selling firearms to sell guns without a license—and without processing any paperwork. That means that two out of every five guns sold in the United States changes hands without a background check.

So "almost all" = 60%?

But there are lots more where armed women have shot and killed an assiliant

There are also plenty of stories at the other extreme. Like the two year old boy who was accidentally shot on Christmas day. His father had recently bought the gun because he felt it would make his home safer. Or the 8 year old Lapwei, Idaho boy killed in an accidental shooting. Or the 9 year old Oregon City girl killed in an accidental shooting. Or the 13 year old Jacksonville, Florida girl killed in an accidental shooting. Or the 3 year old Sumter, South Carolina boy who was accidentally killed. How much safer were these children because the family had more guns? I can do this all day.

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

We in us need more guns, not fewer.

Kaufman County District Attorney Mike McLelland and his wife, Cynthia were murdered in their home. He carried a gun at all times and his wife was licensed to carry a hidden weapon. Their son said that they had guns hidden all over the house. So tell me how more guns equals safer.

And then their's this little tidbit. (I'll try to attach the picture. No guarantee it will work)

In USA you (almost always) have to have a police background check in order to buy guns

Oh really. Unless you buy the weapon at a gun show. And the NRA is opposed to closing that little loophole. And the NRA is opposed to having law enforcement agencies share gun info, something that is routinely done for vehicle registration and licencing.

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

It's be definition not fair to steal from someone who works hard for what he has and give it to some lazy SOB who can't be bothered.

So when a CEO who is already pulling in 10 million or more a year increases his take by laying off workers and slashing the wages of the rest, this is fair? When a hedge fund manager who makes more in one hour that you do in 21 years by insider trading, then gets taxed at half the rate that you are, this is fair? I'm not saying that the money should go to some slob who can't be bothered to work, but how about using it to pay for a few more teachers or to hire back the police and fire fighters who were laid off because of budget shortfalls caused by giving yet more tax cuts to those CEOs and corporations who are making billions yet (in some cases) get money back from the government?

we as a family could not afford to go on vacation some years, while a family on social security flew out to Spain or Italy 3 times a year for a 2-3 week stay in a luxury resort?

Got a source for that?

I was out of work a while last year, couldn't get unemployment benefits because I had a savings account, was told I had to spend all that money first and how long I had to live on it …

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

No need to be embarrassed. We all had to start somewhere. And doing that at 9 years old is an accomplishment.

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

That's hardly what one could call a valid source of information.

Did you notice that most of those (click on a body) come with a link to a news article which is the source for that death?

how many more deaths have occured buy automobile accidents?

Automobiles serve a much more useful purpose and are much more heavily regulated than guns. Would you agree that regulating and tracking guns to the same extent would be a good idea?

Even if the number were correct (and it isn't, not just the Twitter source data is suspect, the Slate motives are even more so)

So you are saying that the news articles that are linked to for the deaths are bogus?

most would be criminals taking potshots at each other. Can't have enough of those.

Right. We just had two innocent people in my city killed by criminals supposedly taking potshots at each other.

And of course more laws aren't going to stop criminals using guns, they're not allowed to use them according to dozens of laws already yet don't seem to mind all that much...

So your argument is "criminals don't obey the laws anyway so why bother". By that argument, why do we have any laws. "Let's outlaw robbery. Oh, wait, the criminals will just ignore that one so scrap that."

The indigenous people have lived village like for generations, and families are intertwined island wide. The clear up …

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

If anyone is interested, there have been over 3530 gun deaths in the USA since the Newtown shootings. Details on those deaths can be found here. Boston got shut down while police hunted for the remaining man responsible for the injuries and deaths taking place in one incident. Where is the outrage over the more than 3000 dead between last December and today?

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

I had a professor once who spent the better part of an hour trying to tech me how to pronounce pouilly fuisse. I just couldn't get my mouth to cooperate. It started out as poo-ee-foo-ee-say but the best I could manage was pwee fwee-say. It wasn't for lack of trying. When I am told to make an oo face but make an ee sound something just short circuits in my brain. I can do the sound but actually putting it to use in a word is difficult.

So perhaps I'll just stick with Mike should I ever have to pronounce it.

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

muslims aren't allowed to terrorize

Here's a news flash. Nobody is allowed to terrorize.

and you are to commit a major sin if you do terrorize

<M/> - You might be interested in this discussion that took place some tine back. Islam and logic

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

So what is the correct (ie your) pronounciation of Mikael? Is it me-KALE, mih-KALE, ME-kel, me-KEL? Am I getting close?

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

I've never use a Mac so I can't speak to that. I've used both Linux (several flavours) and every version of Windows except Windows ME and Vista. My impression is that Windows is more appropriate for your average user and Linux is geared more toward the techie. Like Harley's and Hondas. If you want to own a Harley you'd better be prepared to tinker and get greasy.

I did a lot of reading into the inner workings of the Amiga when I owned one (Amiga 1000). I wish it had become more mainstream. I'd like to see what it would have become by now. The features built into it (I'm speaking OS, not hardware) were amazing especially for the size. Very little duplication of code.

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

Please post the new code and the error message (and which line is causing the error)

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

Normally when you do a join you specify a common (related) field. When you do a join without doing this you end up with a recordset that contains the product of each table. For example, If you have 6000 records in one table and 400 in the other you will end up with 2,400,000 records in the recordset. So I suspect the query that you coded is probably not the query you want. Can you describe in English what you are trying to do? It would help if you could post the table structures as well. While you are at it, could you build the query in a string and post a sample query string here as well?

Dim qry As String

qry = "SELECT distinct ProjectStrategy.Strategy_No, ProjectStrategy.Strategy_Group, " _
    & "       ProjectStrategy.D_Date, ProjectStrategy.Voice_Special_Infra, " _
    & "       Project_Details.* " _
    & "  FROM ProjectStrategy, Project_Details " _
    & " WHERE Project_Details.Hours_of_Ops IN (" & Sstring & ") " _
    & "   AND Project_Details.Region IN (" & regList & ") " _
    & "   AND Project_Details.Country_Offshore IN (" & CtryList & ") " _
    & "   AND Project_Details.State IN (" & StateList & ") " _
    & "   AND Project_Details.City_Offshore IN (" & CList & ") " _
    & "   AND Project_Details.Facility IN (" & FList & ") " _
    & "   AND Project_Details.Building IN (" & BuildList & ") " _
    & "   AND Project_Details.Floor IN (" & FloorList & ") " _
    & "   AND Project_Details.Wing IN (" & WingList & ")"

Debug.WriteLine(qry)
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Maybe they can plea bargain him down from 23 to 9 consecutive life sentences in exchange for information on anyone else who may have been involved. Then someone in prison can shank him for all I care. I'm normally a compassionate person but I have my limits.

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

It might be the double comma at

@dtaGender,,Telephone

and since you are using parameters everywhere else why not change

WHERE EId='" & Me.MaskedTextBox6.Text & "'"

to

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

My given names are Richard James but my mother decided I should go by my middle name which is a royal pain in the a$$ because every bleeding form in the world asks for my first name and maybe my middle initial. Thus, whenever the receptionist in the doctor's office calls for me it's always "Richard" which I don't respond to. If she wanted to call me Jim then they should have named me James Richard.

Short answer? No.

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

Coppelia by Leo Delibes (not a single song but the nusic from the ballet)

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

Is that what Daniweb would rather suggest than replace expletives with asterisks?

As I said, I am in favour of the filters as long as they don't get too aggressive. People generally know which TV shows and movies are likely to offend them but I'm sure these same people (quite rightly) wouldn't expect to come across offending words or topics on Sesame Street or most of the mainstream talk shows. Those of more delicate disposition know to avoid shows like Two and a Half Men.

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

Why inappropriate?

I say usually because I don't see any reason for expletives for example when asking for help with a coding problem or suggesting a feature or even downvoting a member. If a member is being an asshole then there are other ways to deal with that than by stooping to his or her level. However, in the context of a discussion about someone in the public eye who is saying outrageous statements , such as Michael Richards' or Mel Gibson's racially motivated tirades I think it is entirely appropriate for someone to comment "he's a complete shithead".

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

Consider it moved.

Begginnerdev commented: Thank you, Jim! +8
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

There were 36 attempts to assassinate hitler, so he killed himself towards the end of war

It just goes to show you that if you want something done right you have to do it yourself.