1 Replies - 7200 Views - Last Post: 15 April 2013 - 08:36 AM

#1 mannakhan10  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 21-May 11

Connecting to SDK Server but syntax/assembly reference error?

Posted 15 April 2013 - 07:29 AM

Hey everyone. I've got this code in VB working just fine, but in C# I'm running into a few errors.
The issue is with:

meServer = MySDK.Servers.item(meServer); //Connect to Server


Where "meSDK.Servers does not contain a definition for 'itm' and no extension method 'item' accepting a first argument of type 'meSDK.Servers' could be found (are you missing a suing directive or an assembly reference?)"
But I have all the correct assembly references for connecting to the SDK server database since it is the same with VB, I'm sure.

Here's the whole block:

//Declare all variables for the connection
            string meConnectionString; //String to hold the connection information for connection
            meSDK.Server meServer; //Variable to hold the server to work on
            meSDK.meSDK MySDK; //SDK object for server database
            string meServer = "Tags";
            //Initalize variables for connection and data retreival
            MySDK = new meSDK.meSDK(); //Creates the SDK object used to connect
            meConnectionString = "uid=admin;pwd=password";
            meServer = MySDK.Servers.item(meServer); //Connect to Server



Is This A Good Question/Topic? 0
  • +

Replies To: Connecting to SDK Server but syntax/assembly reference error?

#2 mannakhan10  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 21-May 11

Re: Connecting to SDK Server but syntax/assembly reference error?

Posted 15 April 2013 - 08:36 AM

Nevermind, figured it out I think.

meServer = MySDK.Servers.item(meServer); #Connect to Server


Changed to:

meServer = MySDK.Servers[meServer]; #Connect to Server

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1