Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Global Option syntax in VB.Net connector?
GPF
I am reading through the Web Connectors Developer's Guide on how to use the User & Global Options but I'm struggling with the syntax in my VB.Net code.
The samples are very informative but they are all in C# and I can't figure out how to write it in VB.Net.
In particular, from page 84:
string sqlServerName = ((GlobalOptionsImpl)GlobalOptions).SqlServerName;
I have tried a few variations on this unsuccessfully. Can anyone enlighten me?
If anyone has any other Connector code in VB.Net that they are willing to share I would love to get my hands on it. Unfortunately I learn 10 times faster by looking at existing code than reading about it! :-)
Many thanks
Gary
Find more posts tagged with
Comments
GPF
I found the syntax I was needing:
DirectCast(GlobalOptions, GlobalOptionsImpl).SQLServer
I am loading the connection strings into variables to make it easier, like so:
Dim sqlServer as String = DirectCast(GlobalOptions, GlobalOptionsImpl).SQLServer
Dim sqlUserId as String = DirectCast(GlobalOptions, GlobalOptionsImpl).SQLUserId
Dim sqlPassword as String = DirectCast(GlobalOptions, GlobalOptionsImpl).SQLPassword
Everything is working well now.
Cheers