Help using Base SAS procedures

C# sas error

Reply
Super Contributor
Posts: 398

C# sas error

I sporadically get this error message
"An unexpected exception occurred in the provider in function SQLRowset::GetData."

But I cant find anything about this error or how to reproduce it on command. Has anyone else seen this error?

This is my GetData code
[pre]
public DataTable GetData(string sSQL)
{
OleDbCommand cmd = conn.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = sSQL;

OleDbDataAdapter da = new OleDbDataAdapter(cmd);
DataTable dt = new DataTable();

try
{
da.Fill(dt);
return dt;
}
catch (System.Exception exc)
{
MessageBox.Show(exc.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error);
return dt;
}
}
[/pre]

Thank You
Ask a Question
Discussion stats
  • 0 replies
  • 111 views
  • 0 likes
  • 1 in conversation