.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Kaviya Balasubramanian
Velemoochi
Imran Ghani
Post New Web Links

storing values to brigding tables!

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :Sql Server
 

hi friends,

assume i have the following table strucutre and relationship to demonstrate M : N relationship:

 

From fv

 

The relation is between the roles and the user and their briedgig entity. when i save a new user the form allocated the roles, (and only role_id are passed to tbe backend).

In this, DAL, i have written a method to generate a xml document that of following structure and values:

<Roles><id>10</id><id>20</id></Roles>

But in the bridging table UsersUserRoles contain another column called "special notes", XML was generated to store all the ROles of teh saving user, the id values in the xml document will be saved to the UserUserRoles. But since the bridging table has the column SpcialNotes should i also add an element <specialnotes> to the xml docu


View Complete Post


More Related Resource Links

DropDownList to display values from Two Tables - bold sub heading and normal Text

  
Hello I hope I am not asking simple one.  SUPPORT SERVICES<     Computing Service    Library or Data Engineering    Civil Engineering    Electrical Engineering  I have the data to display in a DropDownList control shown as above. There is a distinct category Type(example Support Services) and Category Name i.e., Computing Services. I do not want to hard code the values into DropDownList control. I like to get the data from database to display as shown in above Table. Note that Category Type should be displayed in Bold and Category Name in normal Text. Question: In order to achieve the above, 1. How many database Tables and relationships between them  2. Query the data to display in the above format in drop down 3. how should be the code behind i.e, DataTextValue and DataValueField for DropDownList. Please provide with useful code snippets or references. Thanks,

Storing multiple values in Cookies

  
I have a page which displays multiple products. Each product has an unique ID. When a user clicks a particular product the description about the product will be displayed in another page. What I want is I have to store the product id's of all recent products visited in a cookie. And I have to show in the same module that these are the products the user visited recently.I tried with cookie, but it stores only a single value(productID).How to store multiple product id's the user visted recently in cookie and how to retrieve it.

Reading/storing values of checkboxlist in SQL (VB)

  

Hi there,

I'm trying to store multiple selected checkboxes from a single checkboxlist, but i don't know where to start.. Sealed
Imagine i have three tables: tbl_events, tbl_organisors and tbl_settings and i want to store the organisors of an event.

Each event can have multiple organisors, so each organisor should be added as a single row into tbl_settings.
I know how to bind tbl_organisors to a checkboxlist, but how do i store the results (meaning: add the rows to tbl_settings) ?

tbl_events: Event_ID (PK) and Event_Name
tbl_organisors: User_ID and user_name.
tbl_settings: Settings_ID (PK), Event_ID and User_ID

Checkboxlist:

<asp:CheckBoxList ID="CheckBoxList1" runat="server" DataSourceID="SDS_Organisors"
DataTextField="User_Name" DataValueField="User_ID" RepeatColumns="2">
</asp:CheckBoxList>

SQLDatasource:

<asp:SqlDataSource ID="SDS_Organisors" runat="server" 
        ConnectionString="<%$ ConnectionStrings:LocalConnectionString %>"

Inserting values into multiple tables (using SCOPE_IDENTITY)

  

Hello!

I have problem inserting multiple values into multiple tables from web form. I have a web form for creating article (from table Clanak) and in the end there is a textbox (txtTagovi) that is used for inserting Tags (in table Tagovi) which are separated by ";".

These are the tables: Clanak (idClanak,...), Tagovi (idTag, naziv) and the cross reference table ClanakTagovi (idClanakTagovi, idClanak, idTag)

There are multiple problems...

The first one is how to get the SCOPE_IDENTITY (without stored procedures) of the last inserted Article (from table Clanak) without getting the following error: "Incorrect syntax near ')'." I will comment the part of the code that has this problem.

The second problem is implementation of the tags. I am aware that if my current solution gets corrected it won't be what I originally wanted because my idea was to add tags and if there are similar tags I wanted them to get the same ID, without having duplicates in table (that's why I need Clanak Tagovi table).

For example:

Clanak {(idClanak=1,...),(idClanak=2,...),...}, 

Tagovi {(idTag=1, naziv="Tag1"), (idTag=2, naziv="Tag2"), (idTag=3, naziv="Tag3"),..} , 

ClanakTagovi {(idClanakTagovi=1, idClanak=1, idTag=1), (idClanakTagovi=2, idClanak=1, idTag=2), (idClanakTagovi=3,

fetching values from multiple tables to show on crystal report

  
Can somebody guide me to make crystal report showing values from multiple tables?

Insert NULL values into Integer column in Access 2007 tables

  
hi  there:

  My source data  is below and it's in CSV format

Days waited

 NULL
 NULL
  1
  2
  300
  500
 NULL
  .......

My destination is a Number column in a 2007 access table  and the required property is set to NO

First question :

   I used a Data conversion task in DFT to convert [DT_STR] to Integer as SSIS seems to default the source as DT_STR type. However, SSIS keeps complaining that

"The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data."

I know that's because of those NULL values. how to solve this issue?


thanks


 Hui
--Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --

Modelling\Storing KPI Values

  
Hi

There is a requirement for the DW that we are building warehouse for the business managers to be able to set "targets" for their employees and for various the Contracts that they work on.

A front end application has been built to collect and store this information in a SQL database which we have assumed we would store as a FACT table in our warehouse and then get them turned into KPI's, however now we're a bit stuck with how to implement this

The Employees and the Contracts are stored as seperate Type 2 dimensions and we have a Fact Table which captures the events we are interested in and this obviously stores the corresponding surrogate keys for the Employee and Contract for that particular event/transaction.

However the targets that will be set are really against the dimensions naturalkeys ie the employeeid and contract id rather than the specific version of the dimension

any suggestions or pointers on how to attack this?

many thanks

Saving runtime decided values to different tables in db.

  

I have a view to create an "Instruction". I need to enter InstructionName, Description, and few Attributes to it. The number of attributes is determined at runtime. When "more attributes" is clicked I replicate a div which contains AttributeId(Dropdown) and AttributeValue(Textbox). The isntruction details are entered in Instruction table and the attribute details are entered in InstructionAttribute table. The definition for Create view is 
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master"

Storing XML data in multiple related tables at one shot

  

Hi, I am looking for some ways to store data in multiple related tables in one shot using the advanced features in SQL Server 2005. The store operation will always be the insertion into the different but related tables.

 

The scenario is something like this. I have an input XML data, on which I apply XSLT to convert them in relational format and to make it compatible with a dataset schema which I created from the related tables from the database. Then I load the refined XML data into a dataset. I am looking out for some ways to store the dataset in one shot into the database in relational format without breaking records parent-child relationship. Thanks in advance for your suggestions and feedback.

 


values from one dataadapter to multiple tables in a dataset through foreach loop

  

Hai,,

 How can i fill the values from one dataadapter to multiple tables in a dataset...ie,the adapter is fetching values through foreach loop...i want to take that values into different tables of one dataset....How to do this...Hope anyone will help me....

Thanks in advance


MS SQL Server: Search All Tables, Columns & Rows For Data or Keyword Query

  
If you need to search your entire database for specific data, this query will come in handy.

So when a client needs a custom report or some sort of custom development using Great Plains, most of the time I will have to track down the data in the system by running this query and find the table(s) it is in.

How to Pass Values Between Web Pages ASP.NET

  
You can pass information between pages in various ways, some of which depend on how the redirection occurs. The following options are available even if the source page is in a different ASP.NET Web application from the target page, or if the source page is not an ASP.NET Web page:

Use a query string.

Get HTTP POST information from the source page.

The following options are available only when the source and target pages are in the same ASP.NET Web application.

Use session state.

Create public properties in the source page and access the property values in the target page.

Get control information in the target page from controls in the source page.

How to Pass Values Between ASP.NET Web Pages

  
You can pass information between pages in various ways, some of which depend on how the redirection occurs. The following options are available even if the source page is in a different ASP.NET Web application from the target page, or if the source page is not an ASP.NET Web page:

Use a query string.

Get HTTP POST information from the source page.

The following options are available only when the source and target pages are in the same ASP.NET Web application.

Use session state.

Create public properties in the source page and access the property values in the target page.

Get control information in the target page from controls in the source page.

Temporary Tables - MS SQL Server

  
Usage of temporary tables in MS SQL Server is more developer friendly and they are widely used in development. Local temporary tables are visible only in current session while global temporary tables are visible across all sessions.

Temporary tables in SQL Server vs. table variables

  
When writing T-SQL code, you often need a table in which to store data temporarily when it comes time to execute that code. You have four table options: normal tables, local temporary tables, global temporary tables and table variables. I'll discuss the differences between using temporary tables in SQL Server versus table variables.

jquery autocomplete multiple values

  

i got some samples and i did autocomplete using jquery , its working well for single input values

but i need to pass multiples values after one by one in the textbox. Is it possible to pass multiple

values in the textbox for autocomplete in jquery in asp.net?

 


JQGrid Loading deleted values

  

Hi,

This is quite strange. here is the issue:

Some Info:

1. I'm using a multi-select jqgrid.

2. I have my own delete button to delete multiple orders

The problem:

When i press the delete button on the pager of my jqgrid, the records are deleted from the database but JqGrid shows some records (4-5). On refreshing the grid, correct numbers of records are shown.


Here is the code:


function delorder() {
        var amg = $("#horder").getGridParam('selarrrow');
        var cont = amg.length;
        if (amg.length > 0) {
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend