Hi,
I'm trying to make a Custom Workflow Activity in crm2013. CWA connect to the external database and execute select command. Unfortunatelly dataset is empty and i have this exception:
"Value cannot be null.Parameter name: source'"
This is my code :
public void GetData(string dsName, string tablName, string query) {
try {
SqlDataAdapter adapter = new SqlDataAdapter();
adapter.TableMappings.Add("Table", tablName);
SqlCommand command = new SqlCommand(query, this.sqlConnection);
command.CommandType = CommandType.Text;
adapter.SelectCommand = command;
dataSet = new DataSet(dsName);
adapter.Fill(dataSet);
} catch (Exception ex) { }
}
sqlConnection is open.
What is wrong in this code ?