?
Solved

Help with passing table names and testing if table exist in For Next Loop

Posted on 2013-11-12
2
Medium Priority
?
217 Views
Last Modified: 2013-11-13
Hi,

I have max 4 tables (Country, NSN,NSC,NAA) in my LinkSearch File, How do I modify the code below to search for all 4 tables and encrypt if they exist?

Dim sec As New Security
        For i As Integer = 0 To dtsetlinkBEL.Tables(0).Rows.Count - 1
            For j As Integer = 0 To dtsetlinkBEL.Tables(0).Columns.Count - 1
                dtsetlinkBEL.Tables(0).Rows(i).Item(j) = sec.psEncrypt(dtsetlinkBEL.Tables(0).Rows(i).Item(j))
            Next
        Next
        dtsetlinkBEL.WriteXml(Application.StartupPath + "\LinkSearch.xml")


Thanks,

Victor
0
Comment
Question by:vcharles
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Accepted Solution

by:
joriszwaenepoel earned 2000 total points
ID: 39643837
Dim sec As New Security
For t as Integer = 0 to dtsetlinkBEL.Tables.Count-1
       For i As Integer = 0 To dtsetlinkBEL.Tables(t).Rows.Count - 1
            For j As Integer = 0 To dtsetlinkBEL.Tables(t).Columns.Count - 1
                dtsetlinkBEL.Tables(t).Rows(i).Item(j) = sec.psEncrypt(dtsetlinkBEL.Tables(t).Rows(i).Item(j))
            Next
        Next
Next
        dtsetlinkBEL.WriteXml(Application.StartupPath + "\LinkSearch.xml")
0
 

Author Closing Comment

by:vcharles
ID: 39645318
Thank You.
0

Featured Post

Containers & Docker to Create a Powerful Team

Containers are an incredibly powerful technology that can provide you and/or your engineering team with huge productivity gains. Using containers, you can deploy, back up, replicate, and move apps and their dependencies quickly and easily.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question