Re: Databases as objects

From: Neo <neo55592_at_hotmail.com>
Date: 22 Dec 2006 10:19:16 -0800
Message-ID: <1166811556.715670.279800_at_f1g2000cwa.googlegroups.com>


> > rs = ado.execute("SELECT * FROM T_Person WHERE name='john'");
> > Print (rs.field("age"), rs.field("ss#"));
> >
> Here is what I think the first problem is: now the application has
> become dependent on the physical design of the database. It's dependent
> on the existence of a table named T_Person and that the table has the
> columns name, age, and ss#.
> If instead the code were modified ever so slightly as:
>
> rs = ado.execute("exec getPerson _at_name='john'");
> Print (rs.field("age"), rs.field("ss#"));

In either case, the app is still dependent on T_Person, name, age, and ss# but stored procedures can hide this better. If multiple users need to access the same code/queries, centralizing it in stored procs or DLLs makes sense. Received on Fri Dec 22 2006 - 19:19:16 CET

Original text of this message