I'm writing a little VB.net program that will search through my AF database for a specific attribute that I need to change. The problem is my regular ID only has read access to the AF so I need to connect using my superuser account. I've tried a couple different methods but can't seem to get a log in prompt to pop up so I can switch to my super user account. Any suggestions how to get a log in prompt to pop up to switch my ID?
Here is a code sample I am using to play with:
Dim myPISystems As New PISystems()
Dim myPISystem As PISystem = myPISystems("AFSystem")
Dim user As String = "SuperUserAccount"
Dim password As String = String.Empty
Dim credential As NetworkCredential = New NetworkCredential(user, password)
'myPISystem.Connect(False, Nothing, AFConnectionPreference.RequirePrimary)
'myPISystem.Connect(True, Nothing, AFConnectionPreference.RequirePrimary)
Dim myAF As AFDatabase = myPISystem.Databases("AFDatabase")