johane...@gmail.com
unread,Mar 8, 2013, 4:58:03 AM3/8/13You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi,
I have got the TPS drive and able to open the connection string.
But when I try to fill the dataadapter I am getting a below error.
ERROR [42000] [SoftVelocity Inc.][TopSpeed ODBC Driver]Unexpected extra token: .
at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode) at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod) at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader) at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Odbc.OdbcCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) at ConsoleApplication1.Program.Main(String[] args) in c:\Users\70148320\Documents\Visual Studio 2012\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs:line 48
My code is below
string connectionString = null;
OdbcConnection cnn;
connectionString = @"Driver={SoftVelocity Topspeed driver (*.tps)};Dbq=C:\Users\Desktop\EmployeeMaster.tps";
cnn = new OdbcConnection(connectionString);
string query = "Select * From EmployeeMaster.tps";
try
{
cnn.Open();
OdbcCommand cmd = new OdbcCommand();
cmd.CommandText = query;
cmd.CommandType = CommandType.Text;
cmd.Connection = cnn;
OdbcDataAdapter da = new OdbcDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
cnn.Close();
}
catch (Exception ex)
{
}
Kindly help me to figure out the issue.