binding 1 gridview to 2 tables having common column(primary key/foreign key)

Hi Friends

Can anyone please tell me how to bind to 2 tables having a common column(primarykey/foreign key) to a gridview .the 2 tables have a common column(primarykey/foreign key).I want this in asp.net/vb project.Thank you.


Gurjeet,England
0
gurjeetsaini
7/14/2006 8:41:41 AM
asp.net.object-datasource 16182 articles. 0 followers. Follow

1 Replies
884 Views

Similar Articles

[PageSpeed] 24

You can use DataSet,Smile take a look at this link:

http://msdn2.microsoft.com/en-us/library/system.data.dataset(d=ide).aspx


Welcome to my SQL/ASPNET forum for Chinese
http://51up.org/bbs/forumdisplay.php?fid=38
0
Iori_Jay
7/19/2006 8:24:47 AM
Reply:

Similar Artilces:

PD6.1.1 Foreign keys have the same columns as primary keys ?
hi I have upgraded from PD6.0 to 6.1 and now I get warning messages which I did have before. In particular the problem is where I have a joining table that is the child to 2 parent tables. All the primary keys of the parents become foreign keys in the child. When the combined list of foreign keys are are also made PK in the child joining table I get the Check Tables warning: The following foreign keys have the same columns as primary key: How should this be be resolved? thanks marty It is just a warning that you can disregard in this case. I think this was fixed by 6.1...

Primary Keys containing common foreign keys from different tables
I have 2 tables Table 1 and Table 2 which have primary keys which include the same foreign key from a third Table 0. Table 1 has a primary key consisting of T1_KEY<pk> and T0_KEY<pk,fk>. Table 2 has a primary key consisting of T2_KEY<pk> and T0_KEY<pk,fk>. Now I want Table 3 to reference both Table 1 and Table 2 so that it has a primary key consisting of: T3_KEY<pk>, T0_KEY<pk, fk>, T1_KEY<pk, fk>, T2_KEY<pk, fk> I am trying to manually reverse engineer a database for which I only have a verbal description. I manage to achieve ...

Attempt to over-write foreign key column "Code" where table A has 3 foreign keys to table X
Generating from CDM to Logical. PD 9.5.2.889 This is a weird one - 4 tables in my model have more than one foreign key reference to table COROrg. By default a foreign ket to COROrg generates as COROrgKy. I have renamed the other foreign keys appropriately - e.g. COROrgKyEmpGrp. After the rename when I generate from CDM to Logical everything's fine for all but on of the foreign key columns (i.e. the new name/code are maintained in all but one). The list of changes to happen (obtained from Merge dialog -> Merge Preview) says it's going to 'Modify Column "...

Primary key
> Je me permet de soliciter une aide sur poweramc V8. > Je suis en charge d'un projet ERP et je me pose la question suivante sur un > exemple de mod�lisation. > > Entit� : ARTICLE > information : Code article > Information : Libell� article > > Entit� : Unit� > Information : Code unit� (exemple : Kg, palette, m2...) > information : Libell� unit� > > Un article a 3 unit�s, unit� de stockage, unit� de vente et unit� d'achat. > Ces trois unit�s peuvent �tre diff�rentes. > > Dans mon MCD, j'...

Foreign keys have the same columns as primary key
After upgrading from AppModeler 6.0 to 6.1 when I check my PDM I'm getting the following warning messages on a lot of columns: Foreign Keys have the same columns as primary key. The suggested correction doesn't help much. Can some one explain this warning to me? It seems that when the primary key of one table is a foreign key from another table this warning is poping up. Any help appreciated. Thanks, -- James L. Knowlton President and Programer/Analyst Law Enforcement Automated Data Systems, Inc Richmond, VA begin 666 James L. Knowlton.vcf M0D5'24XZ5D-!4D0-&q...

2
Does anyone know if I can have a table (tbl1) in one database (db1) linked with a foreign key to another table (tbl2) in anther databases (db2) on the same server? db1.tbl1 ==> db2.tbl2 Can tbl1 have triggers to perfrom a cascade delete action on tbl2? in MS SQLServer Marc <mweinstock@lds.com> wrote in message news:wdhAGzFvAHA.260@forums.sybase.com... > Does anyone know if I can have a table (tbl1) in one database (db1) linked > with a foreign key to another table (tbl2) in anther databases (db2) on the > same server? > > db1.tbl1 ==> db2....

integer primary/foreign key vs. varchar(255) primary/foreign key
Hello. Is there any principal performance (or some other) difference between using the integer primary/foreign key and using the string (varchar(255)) keys in queries that use tables joins? Server is Sybase SQL Anywhere 5.5.04 Yes! The primary key will only be made up of 12 bytes. By using an integer you ensure that your entire column is in the key. -- Jim Egan [TeamPS] Dynamic Data Solutions, Inc. http://www.dyn-data.com Houston, TX *********************************************************** Enterprise Applications in Your F...

Updating tables in sequence with primary key and foreign key relations
Hi all,        In my project i will have the  data in a collection of objects, I need to update series of tables with foreign key relations        Right now my code looks like this        foreach(object obj in Objects){        int accountId=Account.Insert(obj.accountOpenDate,obj.accountName);//this will update the accounts table and returns account id which is a Identity column in Acccounts table        int DebtId=Debt....

Primary key
Hello, I've got a modeling problem betwin a conceptual model and a physical model and espacially about the foreign key. See below the illustrated exemple of the problem : -Whether the entity � ARTICLE � with two informations : CODE & WORDING -Whether the entity � UNITE � with two informations : CODE & WORDING An article has necesseraly three unity, the unity of command, of storage and of sails. These three unity can be differents. Conceptual model phycical model The generated physical model doesn't suitable me. How ...

Primary key/Foreign key again
Thanks, Nat and David. Under "SQL Anywhere", I get into ISQL to use "ALTER TABLE" command to add my primary key: ALTER TABLE Client ADD PRIMARY KEY (SYSID) I got an error: user 'dba' has the row in 'Client' locked. How can I release the locking condition? Click on another table in Sybase Central. Is suspect this is the issue. Dave Wolf Jaguar Product Team John Chyan wrote: > Thanks, Nat and David. > > Under "SQL Anywhere", I get into ISQL to use "ALTER TABLE" command > to add my primary key: > ...

SQL statement failed, no primary key value for foreign key ... in table ...
Problem: SQL statement failed, no primary key value for foreign key ... in table ... After deleting or changing primary key values in either consolidated or remote database. Question: Are there any triggers that can resolve inserting a record that has a foreign key value with no existing primary key value in primary table? Description: We have a serious problem with the dbremote program. I think it's a general problem that could appear in every database with related tables. Everytime the problem turns up we must create new remote databases from the consolidated datab...

primary key and foreign Key????
 Hi i have 2 table.. Table1UID         Username1               AB2               CD3               DD Table 2ITEM       Price          UIDPOO1      20.00          1POO2      10.00          2POO3       15.00         1 Now i am letting the Admin to delete the user in table1But since UID 1 and 2 are ...

Keys, keys,keys...
Just installed PGP 6.5.8 and all is running fine, so far :-) Question: When I opened the PGP Keys window for the first time, apart from the *Create Key* wizard, there are about 50 odd keys belonging to various and sundry at NAI. Were these supplied for a purpose or only for illustration? Is there any reason they could not or should no be deleted? Question 2: I sent someone an encrypted test message using that person's public key. It went off fine except, I am left with only the encrypted eMail. What setting should I change in order for my eMail client (Outlook 2000) ...

foreign key as a primary key
hi, I am using a foreign key (which is a primary key in a secondary table) as a primary key in a primary table. There is also another primary key in the primary table. Do You have to declare the foregin key as a primary key ? regards Jan Eikeland email:jaeikela@c2i.net url :http://home.c2i.net/jaeikela In article <368b0234.5056065@forums.powersoft.com>, jaeikela@c2i.net says... > hi, > > I am using a foreign key (which is a primary key in a secondary table) > as a primary key in a primary table. > There is also another primary key in the primary table...

Web resources about - binding 1 gridview to 2 tables having common column(primary key/foreign key) - asp.net.object-datasource

resources last updated: 11/20/2015 3:53:17 PM