[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.6

instr Is this my best option?

Asked by iamtgo3iamtgo3 in Microsoft Visual Basic.Net, .NET Framework 3.x versions

Tags: instr

I have a dataset that has an alloy catalog with each alloy in its own row. In another table I have a memo field called alloy that holds all the alloys someone has picked space delimited Example:  Aluminum-Copper (200 series)  Aluminum-Silicon (300 series) Aluminum-Magnesium (500 Series)           Magnesium. An end user picks Aluminum-Magnesium (500 Series) and then saves the record. I use the below code to check mark the alloys found in dsMetal.Tables("Metal").Rows(0).Item("Alloy").ToString. Out of all of the Alloys I have the only one that is giving me an issue is the Aluminum-Magnesium (500 Series) and Magnesium. If they choose Aluminum-Magnesium (500 Series) save the record and the code does the compare it will also check mark Magnesium every time. Is there a better way to check if the entire string is in the space delimited field?

For iCount = 0 To dsAlloy.Alloy_Catalog.Count - 1
                    myPos = InStr(1, dsMetal.Tables("Metal").Rows(0).Item("Alloy").ToString, dsAlloy.Tables("Alloy_Catalog").Rows(iCount).Item("Alloy").ToString, CompareMethod.Text)
                    If myPos <> 0 Then
                        Select Case dsAlloy.Tables("Alloy_Catalog").Rows(iCount).Item("Alloy").ToString()
                            Case "Aluminum (100 series)"
                                ckAluminum100series.Checked = True
                            Case "Aluminum-Copper (200 series)"
                                ckAluminumCopper200series.Checked = True
                            Case "Aluminum-Silicon (300 series)"
                                ckAluminumSilicon300series.Checked = True
                            Case "Aluminum-Silicon (400 series)"
                                ckAluminumSilicon400series.Checked = True
                            Case "Aluminum-Magnesium (500 Series)"
                                ckAluminumMagnesium500Series.Checked = True
                            Case "Aluminum Alloy (700 series)"
                                ckAluminumAlloy700series.Checked = True
                            Case "Aluminum Alloy (800 series)"
                                ckAluminumAlloy800series.Checked = True
                            Case "Other Aluminum"
                                ckOtherAluminum.Checked = True
                            Case "Cobalt-Base"
                                ckCobaltBase.Checked = True
                            Case "High Copper Alloys"
                                ckHighCopperAlloys.Checked = True
                            Case "Other Copper Base Alloys"
                                ckOtherCopperBaseAlloys.Checked = True
                            Case "Abrasion Resistant Iron"
                                ckAbrasionResistantIron.Checked = True
                            Case "Austempered Ductile Iron"
                                ckAustemperedDuctileIron.Checked = True
                            Case "Compacted Graphite Iron"
                                ckCompactedGraphiteIron.Checked = True
                            Case "Corrosion Resistant Iron"
                                ckCorrosionResistantIron.Checked = True
                            Case "Ductile Iron"
                                ckDuctileIron.Checked = True
                            Case "Gray Iron"
                                ckGrayIron.Checked = True
                            Case "Heat Resistant Iron"
                                ckHeatResistantIron.Checked = True
                            Case "Malleable Iron"
                                ckMalleableIron.Checked = True
                            Case "Other Cast Irons"
                                ckOtherCastIrons.Checked = True
                            Case "Lead"
                                ckLead.Checked = True
                            Case "Magnesium"
                                ckMagnesium.Checked = True
                            Case "Mn/Al-Si Bronze + Cu-Ni Alloys"
                                ckMnAlSiBronzeCuNiAlloys.Checked = True
                            Case "Nickel-Base"
                                ckNickelBase.Checked = True
                            Case "Other Nonferrous"
                                ckOtherNonferrous.Checked = True
                            Case "Red/Yellow Brass/Tin-Bronze"
                                ckRedYellowBrassTinBronze.Checked = True
                            Case "Carbon Steels"
                                ckCarbonSteels.Checked = True
                            Case "Corrosion Resistant Steels"
                                ckCorrosionResistantSteels.Checked = True
                            Case "Heat Resistant Steels"
                                ckHeatResistantSteels.Checked = True
                            Case "Low Alloy Steels"
                                ckLowAlloySteels.Checked = True
                            Case "Manganese Steels"
                                ckManganeseSteels.Checked = True
                            Case "Other Cast Steel"
                                ckOtherCastSteel.Checked = True
                            Case "Superalloys"
                                ckSuperalloys.Checked = True
                            Case "Titanium"
                                ckTitanium.Checked = True
                            Case "Zinc-Base"
                                ckZincBase.Checked = True
                        End Select
                    End If
                Next
[+][-]11/06/09 01:30 PM, ID: 25763236Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/06/09 01:38 PM, ID: 25763300Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/06/09 01:55 PM, ID: 25763423Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/06/09 02:09 PM, ID: 25763513Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/06/09 02:16 PM, ID: 25763569Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Microsoft Visual Basic.Net, .NET Framework 3.x versions
Tags: instr
Sign Up Now!
Solution Provided By: CodeCruiser
Participating Experts: 3
Solution Grade: A
 
[+][-]11/10/09 05:55 AM, ID: 25785329Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/10/09 06:11 AM, ID: 25785472Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/10/09 06:20 AM, ID: 25785564Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/10/09 06:29 AM, ID: 25785658Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/10/09 06:52 AM, ID: 25785926Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/10/09 06:53 AM, ID: 25785945Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/10/09 07:02 AM, ID: 25786022Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/10/09 07:05 AM, ID: 25786055Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/10/09 07:14 AM, ID: 25786135Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625