Quantcast
Channel: THWACK: All Content - Orion SDK
Viewing all articles
Browse latest Browse all 2677

Is there a way to read the Orion db using SqlConnection?

$
0
0

We are trying to create a business-use status page for folks that do not have a technical need.  A simple page with "Up, Warning, Down" icons.  I have downloaded the OrionSDK and have found very little information within. What few examples I am finding, they all use a Jtoken which I am relatively unfamiliar with its use.  This is what I am trying to do, but I am getting a connection refused.

 

publicDataTable ConnectToDatabase()

{

    string connectionString = ("Server=" + _hostname + ";Database=Orion.SEUM;User Id=" + _username + ";Password=" + _password + ";Trusted_Connection=False;");

    SqlConnection mySql = newSqlConnection(connectionString);

    SqlCommand query = newSqlCommand("SELECT TransactionId, Name, Status, LastPlayedUtc FROM Orion.SEUM.Transactions", mySql);

 

    DataTable dt = newDataTable("BusinessUseStatus");

 

    try

    {

        mySql.Open();

        dt.Load(query.ExecuteReader());

    }

    catch(Exception ex)

    {

        Debug.WriteLine(ex.Message);

    }

    finally

    {

        mySql.Close();

    }

 

    return dt;

}


Viewing all articles
Browse latest Browse all 2677

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>