| | |
Clarification needed: Table adapter creation
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Mar 2009
Posts: 5
Reputation:
Solved Threads: 0
Hi, I am creating a data access layer through Visual Studio 2005 (dataset in appcode folder) for my asp.net (vb.net based) application connected with SQL server 2005 db.
I have already created easy tableadapters for brands, categories tables. Right now I am creating Product tableadapter for product table. The product table is inter-related to many other tables like colors, materials, features, photos, articles, measurements, etc.
My question is:
Do I need to create basic Getdata() function configured only for product table with all insert, update & delete queries and then seperate queries like
GetProductsByBrandID(), GetProductsByColorID() like those which involves table joins and sub queries?
or
Do I need to create Getdata() function configured with insert, update & delete queries which includes table joins and sub queries to all inter-related tables?
Anyway I need GetProductsByBrandID(), GetProductsByColorID(), etc. like those queries.
Pls advice.
I have already created easy tableadapters for brands, categories tables. Right now I am creating Product tableadapter for product table. The product table is inter-related to many other tables like colors, materials, features, photos, articles, measurements, etc.
My question is:
Do I need to create basic Getdata() function configured only for product table with all insert, update & delete queries and then seperate queries like
GetProductsByBrandID(), GetProductsByColorID() like those which involves table joins and sub queries?
or
Do I need to create Getdata() function configured with insert, update & delete queries which includes table joins and sub queries to all inter-related tables?
Anyway I need GetProductsByBrandID(), GetProductsByColorID(), etc. like those queries.
Pls advice.
hi,
i suggest to use
Do I need to create basic Getdata() function configured only for product table with all insert, update & delete queries and then seperate queries like
GetProductsByBrandID(), GetProductsByColorID() like those which involves table joins and sub queries
as for using GetProductsByBrandID(), GetProductsByColorID() we need to send parameters to the specified methods and it would be simple to use.
i suggest to use
Do I need to create basic Getdata() function configured only for product table with all insert, update & delete queries and then seperate queries like
GetProductsByBrandID(), GetProductsByColorID() like those which involves table joins and sub queries
as for using GetProductsByBrandID(), GetProductsByColorID() we need to send parameters to the specified methods and it would be simple to use.
If u r query is achieved,mark the thread as solved
Live and Let Live
Live and Let Live
•
•
Join Date: Mar 2009
Posts: 5
Reputation:
Solved Threads: 0
Thanks for your reply. My requirement is different.
I will ask my question in another way.
As I mentioned earlier, I have Product table linked with many other tables.
1. Do I need to create table adapters only to top level tables like Brands, Categories, & Products or for each and every table in my database which are related to the Product table including reference tables?
2. When I am creating a table adapter for a top level tables, Do I need to create the SQL queries joining all related tables?
I am aware of the usage of parametrized queries for GetProductByBrandID(), GetProductByCategoryID(), etc. For that anyway I have to join other tables.
I will ask my question in another way.
As I mentioned earlier, I have Product table linked with many other tables.
1. Do I need to create table adapters only to top level tables like Brands, Categories, & Products or for each and every table in my database which are related to the Product table including reference tables?
2. When I am creating a table adapter for a top level tables, Do I need to create the SQL queries joining all related tables?
I am aware of the usage of parametrized queries for GetProductByBrandID(), GetProductByCategoryID(), etc. For that anyway I have to join other tables.
Last edited by nzkks; Mar 26th, 2009 at 8:57 am.
![]() |
Other Threads in the ASP.NET Forum
- Previous Thread: Site for DownLoad Project
- Next Thread: Procedure or function has too many arguments specified.
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 ajax alltypeofvideos anathor appliances application asp asp.net bc30451 beginner box browser button c# cac checkbox commonfunctions control dataaccesslayer database datagridview datalist deployment development dgv dialog dropdownlist dynamic dynamically edit editing embeddingactivexcontrol expose feedback fileuploader fill findcontrol flash form formatdecimal formview google gridview gudi iis image javascript list listbox login microsoft mobile mouse mssql news novell numerical opera panelmasterpagebuttoncontrols parent project radio redirect registration relationaldatabases reportemail richtextbox rows schoolproject search security select sessionvariables silverlight smoobjects software sql-server sqlserver2005 ssl suse textbox tracking treeview unauthorized validatedate validation vb.net video videos vista visualstudio web webapplications webdevelopemnt webdevelopment webprogramming webservice xsl youareanotmemberofthedebuggerusers





