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


Top 5 Contributors of the Month
david stephan
Asad Ali
Fauzul Azmi
Post New Web Links

How to save a collection to a table?

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :Sql Server
 
hi fiends, i have three tables UserRoles, Roles and the bridging tbale of them, UsersUserRoles . Therefore A User can have many roles, in my sp how to create collection that will be passed from the client app that holds all roles of a user? Is it possible to create variables to hold collection in SQL? thanks


View Complete Post


More Related Resource Links

xml as text will not save in table field in some cases

  
I have a stored procedure that saves 4 fields into a data table named xml.  One of the fields is called xml, and is just a text field.  Usually, my sp properly stores the data, but occassionally the xml portion of my record is not stored.  It's on a remote server, so I'm having trouble hooking up a debugger to it, but I may have identified some charactoristics of the data in the cases where the data is not saving into the field.  I think it has a lot of "......."s mixed in with the xml.  I'm wondering if SQL could be identifying this as some kind of security threat.  Any thoughts would be super appreciated. 

How to get table value and output save in data base using jquey ajex

  

how to get value this table output is
row 1, cell 1
row 1, cell 2
row 2, cell 1
row 2, cell 2

and save automatically in database no any where click




<table border="1">
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>




Save Changes not working correctly when SQL table has a trigger

  

Hi all,

My WCF isn't working currently when a SQL table has a trigger on it that updates a column.

My table:

(SalesID int, SalesNumber nvarchar(10), OrderType nvarchar(3), OrderDate datetime) the trigger creates a new formatted string value for SalesNumber based on the OrderType and the SalesID, e.g GRN00001

The trigger is applied when the WCF service adds a new record. But the return values for SalesNumber is still NULL. I'm not sure why it will not update. If I restart the programme it retrieves the correct data...

public tblSales tblSales_Save(tblSales dsUpdated)
{
  db.tblSales.ApplyCurrentValues(dsUpdated);
  db.SaveChanges();
  return dsUpdated;
}

public tblSales tblSales_Save(tblSales dsUpdated)
{
  db.tblSales.ApplyCurrentValues(dsUpdated);
  db.SaveChanges();

  tblSales dsNew = tblSales_FindID(dsUpdated.SaleOrderID);
  return dsNew;
}


Neither way works...

 

 

 


Save Changes not working correctly when SQL table has a trigger

  

Hi all,

My WCF isn't working currently when a SQL table has a trigger on it that updates a column.

My table:

(SalesID int, SalesNumber nvarchar(10), OrderType nvarchar(3), OrderDate datetime) the trigger creates a new formatted string value for SalesNumber based on the OrderType and the SalesID, e.g GRN00001

The trigger is applied when the WCF service adds a new record. But the return values for SalesNumber is still NULL. I'm not sure why it will not update. If I restart the programme it retrieves the correct data...

public tblSales tblSales_Save(tblSales dsUpdated)
{
  db.tblSales.ApplyCurrentValues(dsUpdated);
  db.SaveChanges();
  return dsUpdated;
}

public tblSales tblSales_Save(tblSales dsUpdated)
{
  db.tblSales.ApplyCurrentValues(dsUpdated);
  db.SaveChanges();

  tblSales dsNew = tblSales_FindID(dsUpdated.SaleOrderID);
  return dsNew;
}


Neither way works...

 

 

 


What is causing oracle datbase table failing to save inserted Record permenantly?

  

I have a table in orcale database where I am inserting records. I am able to insert a record in a table but it is not being saved permenantly.When inserting there is no error. what could be causing this?


Save Dimension member only when this have lines in Fact Table

  

I have one dimension table with over 600 item, but in my fact table only 40 of this member have lines (my fact have a filter for the 2 laste year)

 

How save on the dimension only this 40 members?

 

Best regards

 

 

Jaime


how to fire trigger and save it to another table?

  

I want to create a trigger for insert and whenever i insert the data the trigger should fire and notify some value inserted i want to create log table to save this information,now i have created a trigger but i dont know how to map it to log table to notify the changes??i want some idea about this thanks.


Save/Update/Delete Sql Server data base table using Sharepoint Designer

  

Can some one help me to achieve below task

Save/Update/Delete Sql Server data base table using Sharepoint Designer.


Save Image in table

  

Hi

I have the huge table that each record has an image. My question is: Do saving image in the table (Image Column) is good way? Or you have better way?

Of course, if I save image in table I will create new table for images and make relation between them.

Best regards. Morteza


datetime problem when save into table, doesn't display currentdate

  

Hi.
I have a gridview. in this gridview, I can checked a row to select the row. And I can save the row into database. I also have datetime (current date) and idsubject 
out of this gridview. I want to save date and idsubject in database, simultanously with save the checked field in gridview. I write the following code
and can save all three of them. But I have problem with the date. it doesnt save the current date, instead it appears 01/01/00 0:00:00 in table.
I dont know what is the problem.

Hi.


I have a gridview. in this gridview, I can checked a row to selec

Save to table or calculate

  

When I went to school my teacher always said that things we can calculate from values in the database should not be stored. Is this true?

An exemple. I have a shop and in the ordertable is it wrong to store things like Total without tax, Total with discount, tax and so on. If it's wrong why is it wrong? Is it for reduce the size of data in the database and mayby get faster answer from the db?

Also if it's wrong to store it in the db. Should I calculate it in the sp or in the c#-code? I have learned that the closer to db you do your calclation is better.


Export Visio Database Table Names to Excel

  
If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

Insert value using Table Value Functions

  
a real gem in Sql Server 2008. mostly people still using Stored procedure may be they shifted to SQL Server but they are not using TVF right now.

Using jQuery to Filter Table Rows

  
The project is using the .net GridView control, so I had limited control over the output HTML code. Still, I think this code can work for most tables. One thing to notice: you should use the class "filterable" on your table or on one of its parents for the code to work.
First, we need a text box:

RadioButton Groups, Table Rows And NamingContainers in asp.net

  
The RadioButtonList. Very handy for inviting users to select just one item from a list although because of the screen real estate it takes up, used less and less in favour of the DropDownList. In plain HTML, the browser knows to enforce the unique selected value amongst a list of radio buttons because they all have the same value for their name attributes.

RadioButton Groups, Table Rows And NamingContainers

  
(In which AJAX-enhanced CheckBoxes become more useful than RadioButtons but inheritance saves the day, and a simple RadioButton-derived control establishes the purpose of a control's naming container)

The RadioButtonList. Very handy for inviting users to select just one item from a list although because of the screen real estate it takes up, used less and less in favour of the DropDownList. In plain HTML, the browser knows to enforce the unique selected value amongst a list of radio buttons because they all have the same value for their name attributes.

Building a 3-Tier App with Silverlight 3, .NET RIA Services, and Azure Table Storage

  
Silverlight 3, .NET RIA Services, and Windows Azure Services Platform makes a 3-tier Cloud application easier to build: Silverlight 3 as presentation tier, .NET RIA services as the business logic and data access tier, and Windows Azure Table as the data storage tier. The sample application in this article demonstrates the architecture with a simple Survey application with all these technologies working together from Windows Azure.
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