"Cor Ligthert [MVP]" wrote:
>Bumperman,
>
>There are hundreds of types of tables in Net, I assume now that you
mean a
>database table.
>
>An object is the rawest part of Net. In fact the base class for all
other
>types. Not really the one for binding. It has not any property that you
can
>bind.
>
>http://msdn.microsoft.com/library/de...y/en-us/cpref/
html/frlrfsystemobjectmemberstopic.asp
>
>However I assume that you mean an from Object inherited ObjectType.
From
>that you can bind all properties if the mechanisme is made in the
consuming
>type.
>
>>I will not write any SQL statement.
>
>Do you mean write explicitly and implicitely. Than it is impossible.
..Net
>and SQL are working thight together where Transact SQL is used.
>
>> I would be very happy, if you could enlighten me about this type
>> of association. I am using .NET Framework 2.0 (of course, since I am
>> using C++/CLI) and I do not have a performance concern with this
>> operation (I have heard that this type of association of an object
with
>> a dataset is far slower than SqlDataReader way). Database is SQLite,
I
>> am using ADO.NET class library to access database from .NET (I have
>> native library as well).
>
>The SQLDataReader is fairly quicker than using the SQLDataAdapter,
which is
>in fact a class holding a lot of methods to create, update, remove,
select
>dataobjects for you (datatable/dataviews, datasets, datarows). Those
>dataobjects and the dataadapter have all kind of methods build in. One
of
>those methods in the dataadapter is using is the datareader.
>
>I hope this gives some ideas
>
>Cor
>
>
>
Cor,
thank you for your reply.
> I assume now that you mean a
> database table.
Yes.
> An object is the rawest part of Net. In fact the base class for all >
other
> types. Not really the one for binding. It has not any property that
> you can bind.
Either you misunderstood my concern, or, I have failed to chose the
right words. "How to bind an object to a table", doesn't mean type of
object is System.Object (look closer, System."O"bject, capital letter).
Besides this title, I have provided a sample class, which is a "type" of
an "object" (meaning in OOP, not in "C#") that I want to bind to table.
As you can see, it's got properties. By other means, it doesn't mean
anything whether C# uses "object" type for CTS type System.Object, which
begins with capital letter. In fact, only in .NET and Java, all
(managed) objects derive from the same class, but in OOP, an "object" is
not a System.Object, nor it is what C# and its programmers understand
from "object". "class" keyword defines a type. When you instantiate a
type of T, declared with "class", it becomes an "object of type T", and
it's got nothing to do with System.Object. In C++, we have bare "class"
keyword that declares a "native" class and it doesn't necessarily derive
from anything. I hope we are clear at this point, and you've refreshed
"what 'object' word means in OOP".
I am not unfamiliar with C#, I am not unfamiliar with .NET, I am neither
a student nor a 5 years experienced software developer. I know a couple
of ways to do this, typed dataset or NHibernate, or former Object Spaces
(LinQ?). NHibernate does what I need, but NHibernate is complicated,
error prone, takes a lot of time. I need a "typed dataset like"
solution.
>Do you mean write explicitly and implicitely. Than it is
> impossible. .Net
>and SQL are working thight together where Transact SQL is used.
I do not want to write any SQL statement "explicitly". How can I write
SQL statements implicitly? If they are "implicit", doesn't it mean they
are not written by me? In .NET, you can retrieve data from a dataset
without writing even a single line of SQL statement(ReadXml, WriteXml?).
The point is; something like NHibernate, but simpler and preferably
integrated to IDE. Do you know/have a solution?
Jason
TLD LY is Libya, (just in case you may wonder "what the...") though, I
am not related to Libya.
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com