Click here to Skip to main content
15,911,531 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
SQL
ALTER PROCEDURE dbo.StoredProcedure4
    @se nvarchar(10)
AS
    select * from Table1 join Table2 on 1=1
    where id=@se
    RETURN

i have this query.
when i type this code:
var db=new datacontext();
db.insert_table1(textbox1.text,textbox2.text);
db.insert_table2(textbox3.text);
datagridview.datacourse=db.StoredProcedure4(textbox.text);
don't show data that before inserted to tabales;
Posted
Updated 18-Apr-12 8:49am
v2

1 solution

Hi,
Try this:
C#
var custOrders =
    from o in db.Orders
    from c in db.Customers
    where c.CustomerID == "ALFKI"
    where c.CustomerID == o.CustomerID
    select new {c.ContactName, o.ShipName} 

then you can bind custOrders to your DataGridView.

I hope it helps,
Cheers
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900