Table within formview bound to different database table

Hi,

   How do I bind the textbox placed in a formview to a different table(say table Y) of the database1? My formview's sqldatasource is bound to table X of database1. How do I get the fields of table Y to be displayed along with the fields of table X ? Experts please help!

0
guha
4/10/2008 5:07:33 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

3 Replies
604 Views

Similar Articles

[PageSpeed] 25
Get it on Google Play
Get it on Apple App Store

Somebody please help me!! If you want i'll paste my code too....please help!

0
guha
4/10/2008 6:43:54 PM

Hi guha:

          You can try left join to get one view from the two tables, just like:

          select * from tableX left join tableY on tableX.id=tableY.id

          Hope this helps.

Karl

 

 

 


Click "Mark as Answer" on the post if the answers help

Click "Unmark as Answer" if you need more direction

Thank you for your cooperation
0
Karl
4/12/2008 10:17:46 AM

Thanks Karl.....It did work...

In between placing a panel with fields required and coding separately in the OnItemUpdating event also works.

Hope these answers help someone! 

 

0
guha
4/15/2008 5:24:48 PM
Reply:

Similar Artilces:

Database table to formview to other table
Okay here's my situation I'm trying to make a page that the user is presented witha a single text box. This text box would be used to entering problems, complaints, etc. Apon Pressing insert there is a number of other fields that would be hidden that would be used to create a complete ticket to be written to a ticket database, this information would be pulled from a USer database using the User's login... Where I'm at... I currently am Using a Select statement for my User table, and an Insert Statement for my Tickets table. They are both in the same datasource and using Us...

Difference between #table and # # Table?
If i create a ##table using my stored procedure, I can do the select * from ##table but when i created the #table using the stored procedure and tried to do the select * from #table I am getting the error message invalid object #table that means it is going out of scope. But if i create the ##table, will that table going to remain in the database even until i drop the ##table or it gets dropped when i close the database connection. Thank you very much. -Raj From SQL Server Books OnLine: There are two types of temporary tables: Local temporary tables Th...

What is the difference between #table and ##table
If i create a ##table using my stored procedure, I can do the select * from ##table but when i created the #table using the stored procedure and tried to do the select * from #table I am getting the error message invalid object #table that means it is going out of scope. But if i create the ##table, will that table going to remain in the database even until i drop the ##table or it gets dropped when i close the database connection. Thank you very much. -Raj There are two types of temporary tables: Local temporary tables The names of these tables begin with one n...

How to add the data present in the controls to a table control without any database involvement.
Hi All,i am four controls where i will write the text and once i click the add button those should get added to the table .i want 6 columns fixed in the table and rows as many as required.i tried doing that taking a table server control and able to load the table.but the problem is whenver i am adding a new row the old one is gfetting overwritten by this and at the end i am getting only one row.  System.Web.UI.WebControls.Table t1 = new System.Web.UI.WebControls.Table();  i have declared the below one global TableRow tr; TableCell tc1; TableCell tc2; TableCell tc...

masterpage and control formatting (table control, HTML table control)
I have a master page that contains 1 contentplaceholder.  In my default.aspx (that uses the masterpage layout) I have a table server control.  During page_load I get the data I need and repeatedly add the usercontrol to the table control, one user control per row.  My user control is basically a HTML table with several rows and columns that's populated with data upon creation. I want this table to fill the contentplaceholder's width. In addition within the masterpage I have a CSS link for my stylesheet. Here are my questions: Is there a better way of adding ...

From Table to Table
I am working in Delphi 4 and ran into a roadblock I am unfamiliar with. I am trying to search and find values in one table based off of matching values in another. For example a table of objects with fields like name, description, type, ect; and a table of object properties in which each object can be represented multiple times based on the settings on the page at the time. So if i search the object property table (and eventually loop through to repeat for all objects) to find all cases of visible objects when a certain criteria is met. It stops on the first object with "Yes" in th...

Using the Table Control within a FormView
Hello, I tried using a Table control within the FormView. While this works perfectly fine in the ItemTemplate, the EditTemplate displays correctly but updating has no effect. In fact, updating the record yields empty entries in the corresponding columns of the record in the database. If I put the Textboxes I use in the EditTemplate outside of Table controls, everything works fine. Do I have to qualify the FormField attribute of the <UpdateParameters><asp:FormParameter> differently? Or does this simply not work with the Table control. (Btw, if you are asking yourself why I wan...

Tables?! Why Tables?!
Bit random...but why does everything have to be rendered as a table?  It's starting to get quite annoying.  Formview - does this need to be a table?  the Menu??  Wouldn't it make sense to allow the option to...say...not render a Menu as a table?  Am I the only one that thinks this or are there others?  www.internetgeeks.co.ukwww.norwichbookclub.co.uk You can use CSS Adapters to create your own adapters to override how the controls render it self. In the next version of ASP.Net, you will probably have more flexibility to specify the surrounding elements of th...

Improper display of table cell borders for a table within a table
Name: Jack Cannon Email: jcannonflataoldotcom Product: Firefox Summary: Improper display of table cell borders for a table within a table Comments: I would like to submit what I believe is a small problem with Firefox. Please look at the following website using both Firefox and Internet Explorer and observe the difference: http://www.selets.com/index.htm The top banner consists of a logo in the center and four table cells on each side. Each group of four table cells is a single table inserted into another table. The problem is that the eight table cells should have a red...

Binding a dropdownlist (within a formview control) to a table
Hi - I have a formview control that loads data from a table (using databinding).  I've edited the formview control to also include a dropdown listbox.  I want to display one of two values in my dropdown listbox - "active" or "inactive".  In the listbox i've added these two items, and i want it to display one or the other depending on the data pulled from the formview control (that is databinded).  It seems though when i bind the dropdown listbox i get only the current value retrieved from the database, and not both values.  I want the listbox to display the current v...

Linking label to different table in formview control
What I want to know is how a person can get a label in the item template field to display the value from a different table than the one the formview is displayed in...  So that when the form is displaying info it isnt displaying the ID field but rather the value... Kind of like this:http://www.mikepope.com/blog/DisplayBlog.aspx?permalink=1423Except for not using a dropdown list... Thanks! ...

present data in a formview from four different tables
 I have a problem to present the data in a formview. Here is the code:<asp:FormView ID="FormView1" runat="server" DataKeyNames="Item_ID"         DataSourceID="SqlDataSource1">    <EditItemTemplate>       ..................    </EditItemTemplate>    <InsertItemTemplate>        .................    </InsertItemTemplate>    <ItemTemplate> ...

Migrating Data from one Access Database table to a different Access Datbase / Table
A little background Company has a database that must have new records added to it weekly.  The new data is provided via an access database.  The old data is in a another access database.  What I want to do is have them upload the new access database to the ASP (not .net) server and then copy the new records over to the old data to bring it up to date.  At this point they can upload the new database. But I am having a hard time getting that info into the old database.   This is what I have so far,  but I get the following error Microsoft JET Database Engine...

Can I use a single database both for the tables created automatically for Login Control and my own tables
Can I have a single database containing both set of tables i.e. Tables, stored procedures created automatically after configuring  ASP.Net Configuration My own tables Because I want to authenticate the users through Login Controls, but also want to fetch data from my own tables. How should i Configure the web.config file to make a connection to the database before the user is authenticated. How should I access the connection string so that I can fetch the data and display it on the same page where the Login Control has been placed.Akber Ali Using a single database is no differe...

Web resources about - Table within formview bound to different database table - asp.net.presentation-controls

Iraqi forces make fresh gains in central Ramadi against IS fighters
Iraqi forces made fresh gains in central Ramadi on Sunday and tightened the noose around holdout jihadists making their last stand in the former ...

More Questions About the Police in Chicago
The Atlantic More Questions About the Police in Chicago The Atlantic Two people were shot dead by Chicago Police on Saturday, including a ...

8 Dead in Tornadoes, Severe Storms Near Dallas
At least 25 dead from severe weather in Texas and parts of South.

Denver Broncos’ Peyton Manning Linked To PEDs
According to ESPN , Denver Broncos quarterback Peyton Manning has been listed in an Al Jazeera undercover probe as one of several prominent professional ...


California Wildfire 60 Percent Contained, Evacuations Lifted
California wildfire 60 percent contained; evacuations lifted for dozens of homes

British soldiers aid evacuation in flood-hit northern England
British soldiers helped evacuate hundreds of people from rising floodwaters in the historic city of York on Sunday, after heavy rainfall inundated ...

Washington Redskins QB Kirk Cousins' time has arrived
ESPN Washington Redskins QB Kirk Cousins' time has arrived ESPN PHILADELPHIA Mike Shanahan's friends thought he was crazy for referring to ...

Pakistani Army Chief Makes for Kabul to Assist Intra-Afghan Peace Talks
Pakistani Chief of Army Staff (COAS) Gen. Raheel Sharif on Sunday headed to the Afghan capital of Kabul to contribute to the peace talks between ...

2015 Sun Bowl: Game Grades for Miami vs. Washington State
Bleacher Report 2015 Sun Bowl: Game Grades for Miami vs. Washington State Bleacher Report It was anything but easy, but that won't matter ...

Resources last updated: 12/27/2015 5:00:55 PM