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

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

Parent Columns and Child Columns don't have type-matching columns.

Posted By:      Posted Date: October 26, 2010    Points: 0   Category :ASP.Net


i am making  relation between two datatables and m getting this error

in this ds.Tables(0).Columns("In_ID") datatype is string

ds.Tables(1).Columns("row_id") datatype is integer

how i do the type casting here to make dataset relation

ds.Relations.Add("Rel_1", ds.Tables(0).Columns("In_ID"), ds.Tables(1).Columns("row_id"), True)

View Complete Post

More Related Resource Links

Sql Order by not working with decimal/money type columns

Error Message:- Cannot convert a char value to money. The char value has incorrect syntax. DECLARE @Order NVARCHAR(50) = 'asc', @OrderBy NVARCHAR(50) = 'Shape'SELECTtop 1 Row_Number() OVER(ORDER BY  CASE WHEN @Order IS NULL OR @Order = 'asc' THEN    CASE WHEN @OrderBy IS null THEN Shape    WHEN @OrderBy = 'Shape' THEN Shape    WHEN @OrderBy = 'Cut' THEN Cut    WHEN @OrderBy = 'Color' THEN Color    WHEN @OrderBy = 'Clarity' THEN Clarity    WHEN @OrderBy = 'Price' THEN FinalPrice    --MONEY    WHEN @OrderBy = 'Carat' THEN [Weight]   --DECIMAL   END  END ASC,  CASE WHEN @Order = 'desc' THEN    CASE WHEN @OrderBy IS null THEN Shape    WHEN @OrderBy = 'Shape' THEN Shape    WHEN @OrderBy = 'Cut' THEN Cut    WHEN @OrderBy = 'Color' THEN Color    WHEN @OrderBy = 'Clarity' THEN Clarity    WHEN @OrderBy = 'Price' THEN FinalPrice  --MONEY   WHEN @OrderBy = 'Carat' THEN [Weight]  --DECIMAL   END  

Sharepoint export to spreadsheet gives two extra columns in excel 2007 named as type and path, is th

When i export a list in excel 2007, it creates two extra columns named as type and path. At the same time this behaviour is not exhibited in office 2000. Is there any way to remove these two columns without using code ? Is there any configuration settings required for this, to remove it on the fly ? Thanks Ravish Verma

Removing columns inherited from parent not working

I'm trying to install a couple of custom workflow task content types that are based on the standard workflow task type, but I want to remove some of the attributes defined on the std worfklow task type.  Per the MSDN online info you can use the <RemoveFieldRef/> tag in your XML content type definition file to remove such columns.  For some reason mine does not appear to work, however.  In addition to not removing the columns specified by the <RemoveFieldRef/> tags, it also does not create my custom "Comments" column -- It DOES create the custom "Respoinse" column. The following are my XML definition files for the feature (which installs fine and the content types are created, but the columns I want to remove still show up).  Any idea what I'm missing to remove these columns from the custom types?  I pulled the IDs for the columns I want to remove from the std type definition XML under the 12-hive FEATURES folder Type Definition File <?xml version="1.0" encoding="utf-8"?> <!-- See this blog for specifics: http://www.scribd.com/doc/2278897/Part-4-Custom-Workflow-Forms-TaskEdit-Form --> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ContentType ID="0x010801003D9E4ED01F024d28AF0056E2654CECB0" Name="MoreInfo Task" Group="

comparing two database tables to all find matching columns



is there any query to find matching columns from two database tables(not system tables).




Thanks and regards, Rishabh

Not all content type columns show up in DisplayForm.aspx


I have a list that when displaying the DisplayForm.asp does not show all the columns of my content type.  I double checked that the column Status was Optional( not Hidden), so I don't understand why they don't show up.  Can anyone advise please?  For site visitors that only have View rights, DisplayForm is the logical way to view the list item, so they need to see all columns.


Edit - I was able to get the missing elements to display by switching the column to Required rather than Optional.  While I think this will work in my case because the new items are coming from a webservice that provides this data, it doesn't seem like this should be required.  I thought by default ALL columns/fields displayed on the forms UNLESS marked as hidden.

There are no mistakes; every result tells you something of value about what your are trying to accomplish.

What new in XML Data Type if we can store data into separate columns?


Being new to XML Data Type I want to know what is the need to store our data in XML format if we can save it into separate Columns?

1. Is this practice being widely using in creating databases and maintaining information more efficiently?

2. Does this process follows Normalization rules?

3. What are the pros & cons?


Formatting -- Tucking the child columns under the group header:


I seem to have missed something somewhere.

How do you get a report organized like:


Rather than:


You can't be successful at this unless you're at least 1/2 a bubble off level.

Adding columns to content type

I am usine the Bugs Database site template.  On the Bugs List I want to add some additional columns.  If I add those columns to the content type, am I changing the content type throughout the site collection for anyone else that uses the Bugs List, or is my change just local to my site?
There are no mistakes; every result tells you something of value about what your are trying to accomplish.

Content Type or Lists Lookup Column can't show additional fields which are Choice or lookup columns


I am trying to create some content types, but this also happens when creating new columns in a list.

Ok, here is my setup (which is the most basic way to replicate the issue):

List 1: Department List
Columns: Department Name (Single Line of Text)

List 2: Document Owners
Columns: Document Owner (single line of text), Department (Choice or Lookup from Department List), Email (single line of text), Lookup Field (Calculated).

Content Type: Quality Document
Columns: File Name, Title, Document Owners (Lookup from Document Owners List), Email (pulled in with Document Owner), Then i want to also pull in Department from the Document Owners list.

That is where my problem is.  When i select the Document Owners List as the list to get the information from, there isn't the option under "Add a column to show each of these additional fields" to pull in the Department column.  This occurs if i use a Choice in the Document Owners list, or if i do a lookup from the Department List.

My preferred method of implementing this system would be to have a multi-value lookup field in the Department List for Document Owners so that the Owners are attached to the Department, and if the owners change for the department they also change for the document that is for said department.  But, i run into the same issue that i c

Programatically adding the "SummaryLinks" type column to the Site columns list



Can anyone help me with the sample code to programatically add the "SummaryLinks" type column to the Site columns list.



showing NULL under "Amount" and "Type" columns

When i run this code it brings back data for "Amount" and "Type" columns for 1st week only, and for rest of 14 weeks it shows NULL under "Amount" and "Type" columns.
I need to get the date for all 15 weeks under "Amount" and "Type" columns.
@parm_account Varchar(50),
@parm_currency Varchar(10),

@parm_location Varchar(50),

--@parm_month Int,

@parm_week Int,

@parm_year Int

--SET @parm_account = 'CITINETTING-417A'
--SET @parm_account = 'CPS-465-USD'
SET @parm_account = 'WAR-458-USD'

SET @parm_currency = 'USD'

--SET @parm_location = '(417A) - Cebu, Philippines Div. Office TM'
--SET @parm_location = '(465) - Juarez Div. Ofc. (368) - Juarez, Mexico'
SET @parm_location = '(458) - Tampa, FL'

--SET @parm_month = 1

SET @parm_week = 1

SET @parm_year = 2009

CREATE TABLE #date_fill( 

      date   DateTime,

      year   Int,

      week   Int


DECLARE @date_from DateTime

DECLARE @date_to DateTime
--SELECT @date_from = Min(beginday) FROM Lex_Reporting.lex.learfiscalcal WHERE year = @parm_year and month = @parm_month

SELECT @date_from = Min(beginday) FROM Reporting.fiscalcal WHERE year = @parm_year and week = @parm_week

--SELECT @date_to = Max(endday) FROM Reporting.fiscalcal WHERE year = @parm_year and month = @parm_month
SELECT @date_to = (SELECT max(T.MaxEnddate

sharepoint Duplicate Site columns and updating content type failed when publishing to sharepoint


1many duplicate columns in my library

we can see image here:

2run  sql :

select * from AllUserData 
where  tp_LeafName = 'xxxx.xml' and tpid='1123' 
and tp_DeleteTransactionid = 0x 

should find only one row,but then can find 7 rows:

row1                    0
row2                    1
row3                    3
row4                    4
row5                    6
row6               &

SPD Adding Joined Subview Stretches Parent Columns


In SharePoint Designer, added a Linked Source Data View to a page.  After adding the Data View, I'm adding a row to the table. 

Formatting looks perfect at this point.

Once I add a Joined Subview to the new row in the Data View, the parent Data View columns are being streched out.

My goal is to have a parent row, with a child row spanning the table.

Any suggestions? 



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.

Adding Multiple Columns and Rows in GridView without using a Database

This article describes on how to add multiple columns and rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in each TextBoxes on Button Click and retain the GridView data on post back.

add columns with textboxes in gridview using C#

'm working on a shopping cart in a website and I have my items(which have been added to the cart) in an arraylist. And using these values I've read the rest of the values from the db and and have populated on the gridview successfully.

Custom Editing Behavior for DataGridView TextBox Columns

For various reasons I'm using a DataGridView instead of a ListView, and while configuring the DataGridView to look like a ListView wasn't much of a problem, there's one thing that got on my nerves, which is the behavior of textbox cells in edit mode: It is much too easy to leave the edit mode accidentally, simply by pressing the cursor keys at the wrong time. For example when the text caret is positioned behind the last character of the textbox cell content, and you press the right arrow key
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