I'm new with llblgenpro product. So, excuse me for the silly question.
I need to assign a connection string without using DBUtils but using interface approach - the assembly with DBUtils is not available for me at design time - not referenced - as a part of design.
ObjectDiscovery od = new ObjectDiscovery(className,assembly); // custom code
IEntityCollection cc = od.GetEntityCollection(); // custom method to get IEntityCollection
// here is my problem - how to pass a connection to the cc object
cc.GetMulti(null, 100000, null, null, 0, 0); // breaks if no connection set
Data.DataTable dt = new Data.DataTable();
if(cc.Count>0)
{
IEnumerable ienum= cc as IEnumerable;
IEnumerator ie =ienum.GetEnumerator();
ie.MoveNext();
IEntity ce = (IEntity)ie.Current;
IEntityFields fields = ce.Fields;
for(int i=0;i<fields.Count;i++)
{
IEntityField field = fields[i];
dt.Columns.Add(field.Name,field.GetType());
}
ie.Reset();
while( ie.MoveNext())
{
IEntity cei = (IEntity)ie.Current;
IEntityFields fields_a = cei.Fields;
Data.DataRow dr= dt.NewRow();
for(int i=0;i<fields_a.Count;i++)
{
IEntityField field_a = fields_a[i];
dr[field_a.Name]=field_a.CurrentValue;
}
dt.Rows.Add(dr);
}
}
It breaks here:
// here is my problem - how to pass a connection to the cc object
cc.GetMulti(null, 100000, null, null, 0, 0); // breaks if no connection set
Any help would be helpfull.
Thanks.