Connecting to Symposium 4.2 database thru ODBC or ADO.NET using C# Visual Studio [22/9/2006 18:52:09]
I am wanting to know how to connect to the Sybase Database on Symposium 4.2.
1. Is this the correct way to capture data. Currently it connect but I cannot get the data back.
using System.Data.Odbc;
string ConnectionString = "Driver={SYBASE ASE ODBC Driver};Srvr=Symposium_Reports;Uid=userid;Pwd=password;";
ConnectionString = @"select * from dbo_eCallByCallStat";
OdbcConnection myConnection = new OdbcConnection(ConnectionString);
{
myConnection.Open();
OdbcCommand myCommand = new OdbcCommand(Query, myConnection);
OdbcDataReader myReader = myCommand.ExecuteReader();
// loop: read from DB
while (myReader.Read())
{
console(myReader.GetValue(0).ToString())
}
myReader.Close();
}
catch (System.Exception eZ)
{}
myConnection.Close();
I am wanting to know how to connect to the Sybase Database on Symposium 4.2.
1. Is this the correct way to capture data. Currently it connect but I cannot get the data back.
using System.Data.Odbc;
string ConnectionString = "Driver={SYBASE ASE ODBC Driver};Srvr=Symposium_Reports;Uid=userid;Pwd=password;";
ConnectionString = @"select * from dbo_eCallByCallStat";
OdbcConnection myConnection = new OdbcConnection(ConnectionString);
{
myConnection.Open();
OdbcCommand myCommand = new OdbcCommand(Query, myConnection);
OdbcDataReader myReader = myCommand.ExecuteReader();
// loop: read from DB
while (myReader.Read())
{
console(myReader.GetValue(0).ToString())
}
myReader.Close();
}
catch (System.Exception eZ)
{}
myConnection.Close();