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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Data field

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :Sql Server
How do I change a column which is varchar 255 to varchar 400?

View Complete Post

More Related Resource Links

Linq getting data from field on record



   I would assume this is possiable but I cannot seem to find it anywhere. I just one the contents of a single field, I don't see why I have to return the how

record to get get that information, here is my current code, how can I make this better without returning the entire record, for just getting contents of one field.

var patternrecord = storedb.Patterns_Table.Single(a => a.Pattern_GUID == id);
PMEDIA.Pattern_Key = patternrecord.Pattern_Key;

Combining data from 2 lists, then summing a field


I have 2 lists, one is a contact list (client, client title, address, etc.), the other is a list of meetings with these clients (client name, type of meeting, date, etc.).  The 2nd list has multiple entries for the same client.  I am trying to create a report that combines the data in these lists and displays them like this:

Client--Client Title--MeetingType1--MeetingType2




In addition to combining the list data, I also need to break up the Type of Meeting field and sum the number of different types of meetings for each client.  I added the 2 lists to a linked source, then inserted the data into a DVWP adding data from the 2nd list as a joined subview.


I tried this: xsl:value-of select="count(/dsQueryResponse/Rows/Row[@TypeOfMeeting = 'MeetingType1'])" but it just returns 0.  I'm not sure if that's the correct method though as I think it will return a count of ALL the rows, not the current row.  Any ideas would be appreciated!

How do you create a custom BDC data field that allows for multiple selected values?

I need help creating a custom data field using the BDC column as a base.  We need to allow for multiple selected values instead of just a single one.  I can't find anything on the net which shows how to do this.

Extracting XML Data from a Field SQL Server 2005

I have extracted XML data in the past, but I have received data from a vendor and they basically dumped information into this one XML field.  I am having issues extracting and was wondering if someone might know how?Here is a sample snipit of the info: <form><text id="vwdateneeded" label="Date Needed *">2-2-09</text><text id="vwdesklocation" label="Desk Location *">kljklj</text><text id="vwreportsto" label="Reports To *">kjhjkh</text><text id="vwcostcenter" label="Cost Center *">jkhjklhj</text><select id="vwhardwarerequired" label="Hardware Required *" style="combo">IT Desktop<option label="" /><option label="Business Desktop">Business Desktop</option><option label="Business Laptop">Business Laptop</option><option label="IT Desktop">IT Desktop</option><option label="IT Laptop">IT Laptop</option><option label="IT Project Computer">IT Project Computer</option><option label="Other">Other</option></select><text id="vwcomments" label="Comments *" multiline="true">kjgjhg</text></form>' I took some help from an on

How can i add prefix to any field data?

I have a table 'CLIENT' where i want to prefix 99 to all the existing customer IDs in the integer field 'CUID'. How can i do this? For eg. CUID 12 123 1234 will be: CUID 9912 99123 991234  LuxCoder

Read data from BLOB field and write to sharepoint list

Hi, I want to read the data from BLOB field and write it into sharepoint list item. Please provide some pointer to archive above objective.   Thanks in Advance.

Calculated date field displays differently in List View and Data View web parts

In SharePoint GUI I created a simple custom list with a calculated Date/Time field (Due).  The calculation is =[Created]+7.  I'm trying to display this data on a page using a DVWP.  But first, for testing purposes, I also created a second calculated Date/Time (TestCreate) field in my custom list that is simply =[Created]. In the List View from within SharePoint, the dates show as expected (for example): Created = 8/12/2010 3:45 PM Due = 8/19/2010 3:45 PM TestCreate = 8/12/2010 3:45 PM In SharePoint Designer, I added a Data View web part and the above three data elements (each configured to display mm/dd/yyyy hh:mm:ss tt).  I see the time displayed for the example list item as: Created = 8/12/2010 3:45:30 PM Due = 8/19/2010 10:45:00 AM TestCreate = 8/12/2010 10:45:00 AM I've tested a couple scenarios and the calculated fields always display five hours in the past (along with dropping the seconds).  It seems like the DVWP is returning the date in a different time zone (with no seconds).  The lcid is set right (1033).  I didn't see any time zone settings for the DVWP specifically.  I'm basically stuck.  Could someone help me figure this one out. Thanks.

Set up a validator that compare the value of the current field with an other (using Dynamic Data)

Hi! Most of it is in the title : I'd like have a validator on the DateTime_Edit template for example that allows to compare this field with an other DateTime field. My problem is when I am in the DateTime_Edit template of my "master field" (the one I want to check), how can I access to the other field given the architecture of Dynamic Data FieldTemplates? But perhaps I'm not thinking in a good way on this control. Any advice will be welcome. Thanks Raphaelp

how to read a custom dynamic data meta data attribute in a field template

All --Please help.I need to know how to read a custom dynamic data meta data attribute in a field template.I know how to do it in a page template because I have a handle to the meta table on the page.However, I do not know how to get a handle to the meta column at run time in a field template.Can you help?Please advise.Thank you.-- Mark Kamoski

Get attachment data to a Field in the ListItem

Hi All, I have a list with Attachments,Title and Description fields in the List. And i have a requirement that when an attachment is added to the List(while adding a new item), the attachment data sholud be entered into the Description Column and save the item into the List. Can i do this functionality without using custom webpart..... Please suggest me the ideas.....  

changing font color on a data column field based on the contents

I am trying to change font color if the datafield has the string EMERGENCY. This is my original template field: <asp:TemplateField HeaderText="Type" SortExpression="DigType"> <EditItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Eval("DigType") %>' ></asp:Label> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Eval("DigType") %>' ></asp:Label> </ItemTemplate> </asp:TemplateField>   and this is what I thought would work: <EditItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Eval("DigType") %>' ForeColor='<%# IIf(Eval("DigType")="EMERGENCY","Black", "Red") %>'></asp:Label> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Eval("DigType") %>' ForeColor='<%# IIf(Eval(&quo

SSRS 2008 R2 Dataset Field Value Property Data Type not numeric

We're building SSRS 2008 R2 reports using SSAS as data sources.  There are several occaissions where the data types of certain dataset field values that represent cube measures are not numeric.  As such, when these fields are used in an aggregate function they throw an error.  Is there a way to remedy this in the dataset? Thanks for your help.

"String or binary data would be truncated" and field specifications

Hi all,   i have "String or binary data would be truncated" error when i try to execute an insert statment.   can i find witch field is affected by this error? (for return it to the user)   thank's all

ASP.Net Dynamic Data - DropDownList Field Template with AJAX Cascading DropDown Extension

Hi all,   Have spent hours trying to create a Dynamic Data Field Template holding a DropDownList which is extended by the AJAX Cascading DropDown extension. Final form holds multiple cascading dropdown boxes. User selects Country (Land) then Postcodes, Counties (Provincie) are populated. Once postcode is selected then towns (Plaats) are populated.  The problem I am now facing is that the viewstate for the dropdown lists is not being saved/restored after an insert action or custom validation error. So basically the dropdown lists are being reset to their default values. Some code (if missing parts, just ask and I will post them) - Don't mind the code structures etc... needs some refactoring :) Attribute I created:using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Data { [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)] sealed public class CascadingDropDownParametersAttribute : Attribute { //public string TargetControlID; // The ID of the DropDownList to populate. public string Category; // The name of the category this DropDownList represents. public string PromptText; // Optional text to display before the user has selected a value from the DropDownList. public string

Binding list to form not working with '&' character in list field data

Hi, I have a SharePoint list with a field called Title. I have a form based on this list with the field bound to the form as a label (for workflow to access). Here is the code for the form field. <asp:Label runat="server" id="ff2{$Pos}" text="{@Title}" __designer:bind="{ddwrt:DataBind('u',concat('ff2',$Pos),'Text','','ID',ddwrt:EscapeDelims(string(@ID)),'@Title')}" /> I have a workflow that runs through a form action button which take ff2 (title) and  does other stuff. The problem I have is with records where the value of 'title' contains the '&' character (example ab&cd). Blank is pulled in by the workflow when I get the value of ff2. I am guessing it has to do with the data binding and/or escape (special) characters coming through but I don't know how to fix it. Any help will be greatly appreciated

Is there a way to manually or programmatically set the dataset field's data type? This dataset is

Is there a way to manually or programmatically set the dataset field's data type?  The reason I am asking this question is that I am trying to sum a column of data in a report.  I noticed it is possible to sum a column of data if the datatype of a field in the .rdl file is of type <rd:TypeName>System.Int32</rd:TypeName>. Whereas it is not possible to sum a column of data in an .rdl file when the datatype of a field is <rd:TypeName>System.String</rd:TypeName> . When I create a dataset in BIDS 2008, by default, the dataset gives a field a type System.String.  I need to be able to change the field type to System.Int32 in order to sum the column. My datasource is a web service.  The results returned by the web service method has a datatype of int as follows: <xs:element name="Dollars" type="xs:int" minOccurs="0" /> So it seems the dataset created by the reporting services is giving my webservice a type of System.String. Is there some way of manually changing the type? thanks, Lloyd

XML data stored in text field

Hi there, I need to extract XML data stored as text from any number of given rows of a table. The stored XML data typically looks like this: In the ATTRIBUTES field from NODEMEATADATA table <T41><A93>S46 SE Trade &amp; Investment</A93><A35>3284</A35><A84>28 November 2008</A84><A33>S Polkinghorn Bband</A33><A46>S46 0501-KEYF Keyfort Limited</A46><A89>400.68</A89><A90>0</A90><A88>400.68</A88><A66>560200 Broadband</A66><A70>ITAC</A70><A54>N/A</A54><A86 /><A87>Awaiting Posting</A87><A91>Mashudul Karim</A91><A94>Chris Burchell</A94><A92 /></T41> I need to be able to extract the invoice numbers from any number of rows based on a WHERE clause that referes to another column of a date/time format. The invoice numbers are with the <A35>****</A35> tags What I have noticed in the table is that element is not always the same. SOme are <T41> some <T6> or <T7> which I think might have something to do with the document status within the <A87> tags. If possible I need to pick up within multiple elements. I then need to add this to my current simple query: SELECT METAID, CONVERT(VARCHAR(10), CAST(CAST(CREATEDON AS VARCHAR) AS DATETIME), 103) AS 'CREATED', FROM N
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