C
Craig Kenisston
Hi,
I'm working in the implementation of a little .net provider for a propietary
database format.
I've studied the .Net provider sample that is in the vs.net help, as well as
other providers a bit.
There is a class in the sample to store the result from the database :
public class MaxResultSet
{
public struct MetaData
{
public string name;
public Type type;
public int maxSize;
}
public int recordsAffected;
public MetaData[] metaData;
public object[,] data;
}
I was wondering how efficient this could be ... it really doesn't seem to
be. I mean, an array of array of objects seems to lead to unnecessary type
casts.
Also in other .Net providers, I've seen that a DataTable is used to store
the values retrived from the DB.
Moreover, it seems that other .Net providers, does not store the data in
anyplace and instead they keep a connection open to the database to retrieve
the data on demand.
So, I see 3 alternatives here, and I'm looking for a general advise.
Which is the best or more commonly used approach to store the result comming
from the database in an IDataReader?
Thanks in advance.
I'm working in the implementation of a little .net provider for a propietary
database format.
I've studied the .Net provider sample that is in the vs.net help, as well as
other providers a bit.
There is a class in the sample to store the result from the database :
public class MaxResultSet
{
public struct MetaData
{
public string name;
public Type type;
public int maxSize;
}
public int recordsAffected;
public MetaData[] metaData;
public object[,] data;
}
I was wondering how efficient this could be ... it really doesn't seem to
be. I mean, an array of array of objects seems to lead to unnecessary type
casts.
Also in other .Net providers, I've seen that a DataTable is used to store
the values retrived from the DB.
Moreover, it seems that other .Net providers, does not store the data in
anyplace and instead they keep a connection open to the database to retrieve
the data on demand.
So, I see 3 alternatives here, and I'm looking for a general advise.
Which is the best or more commonly used approach to store the result comming
from the database in an IDataReader?
Thanks in advance.