.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

How to get information from a column

Posted By:      Posted Date: August 26, 2010    Points: 0   Category :SharePoint


I want to get information from a manually created column programmatically (C#).

For example:
The name of the created column is test and the type is choice. The option "multichoice is possible" is set.
When you create the column manually you can set the choices for example wood, steel, iron or anything else.
I need the information wood, steel and iron programmatically.

Thanks for helping


View Complete Post

More Related Resource Links

Get information about collation of a column of a resultant select query using oledb



I have executed a select query from a table using OLEDB (IID_ICommandText) . Now I want the information about collation(Case Sensitivity,Accent Sensitivity, Kana Sensetivity, Width Sensetivity, LCID) of all the eligible columns of a select query. Can anyone please help me with a way to retrieve all of them.



Title Column-Document Information Panel


Hi, I'm pretty new to Sharepoint 2K10; I have the following issue.

I create a content type based on the standard "Document" content type that has the Title Column required.

I've activated multiple content types in a library and I've associated a ppt template to the content type.

When I create a new document based on the above content type, the Title field in the Document Information Panel (Office 2010)doesn't appear as mandatory even if it actually is.

That's generate confusion on the user.


can a column pull information out of the same column?

I have a column name "employee" and I would like to group the data collected in all columns for the same employee if he has several entries. is there a fourmula that can help me pull the information with out?

ADO RecordSet Update Fails (Insufficient key column information for updating...)


Hi, I'd like to update one field in a recordset but I'm getting this error:

*** insufficient key column information for updating or refreshing" ***

My program consists in a .VBS file (VbScript), and the code goes as follows:

connectionString = "Provider=SQLNCLI; DataSource=dbABC;Initial Catalog=whateverCat;Integrated Security=SSPI"

set objConn = CreateObject( "ADODB.Connection" )
set objRs = CreateObject( "ADODB.RecordSet" ) objConn.ConnectionTimeout = 0
objRS.CommandTimeout = 0
objRS.CursorLocation = 3 ' adUseClient
objRs.LockType = 3 ' adLockOptimistic
objRs.CursorType = 2 'adOpenDynamic
objConn.Open ConnectionString
objRs.Open "Select ComputerID, ComputerName From ComputerTable", objConn
do until objRs.eof
objRs( "ComputerName" ).Value = "NewComputerName"
objRs.Update ' ****Fails here

I don't need that the changes made in the RecordSet to be propagated into the DB table, so perhaps here is my problem: I do only have read access to the tables. Could this be the problem? Thanks.

The merge process could not retrieve column information for table 'dbo.xxxx'. Verify that you have


Hi, we have a merge pull replication in SQL Server 2008 R2 (publisher) and SQL Express 2008 (subscribers)

The publication contains almost 200 articles.

We are having trouble in only one article.

When we update / insert a row in that table, all the subscribers fail to sync with the following error:

The merge process could not retrieve column information for table 'dbo.Tipo_Movimiento_Caja'. Verify that you have sufficient privileges on the database and retry the operation. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201016)

Cannot synchronize the subscription because the schemas of the article at the Publisher and the Subscriber do not match. It is likely that pending schema changes have not yet been propagated to the Subscriber. Run the Merge Agent again to propagate the changes and synchronize the data. (Source: MSSQLServer, Error number: 25007)

The script of that article is really simple, and it has no join filters:

exec sp_addmergearticle @publication = N'IPoint_Pub', @article = N'Tipo_Movimiento_Caja', @source_owner = N'dbo', @source_object = N'Tipo_Movimi

Tooltip for GridView Column Headers (ASP.Net)

I just wanted to add auto tooltips for my GridView headers. There are couple of ways but I don't want to use javascript and wanted to use simple 'title' attribute. It took couple of hours to get the working code supporting sortable columns. I thought it will be very useful for others. Here's the code and logic behind it.

How to get more information about the exceptions that can happen in SharePoint 2010 projects?

In case there is an exception anywhere in the SharePoint 2010 project (most common place an exception would happen is during deployment of your SharePoint project, custom deployment configuration or custom deployment steps), there's a registry key EnableDiagnostics available for you to use.

Multiple Column Dropdownlist for the ASP.NET DataGrid

Based on my previous control "Multiple Column DropDownList for ASP.NET", I received many emails asking for the same control to be used in the DataGrid for web applications. Here we go.. This control can be used as the regular MS DropDownList in the DataGrid and also as a regular dropdownlist. It has all the properties, like DataTextField, DataValueField, DataSource, SelectedIndex etc. The download file contains the samples both in VB.NET and C#. In this sample, I have used the Northwind database of SQL Server.

Alternating row background for first column of a report


is there a way to make the first column of a report use the an alternating background color? 

I have the background color set for the entire row however it does not work for the first column if the color is set to an expression.  If I just set it to a color i.e. red it works just fine. If I insert a dummy column to the left it works just fine (but the dummy column does not work, presumably because it is first??).

In the file below only the textbox for part number does not show an alternating background.  All others work correctly.

                    <Textbox Name="PartNumber">

Use a column as parameter for a sds in another column; gridview


Hola, I have a gridview which is bound to a sds which returns 7 columns and I added two columns from the GUI.  What I want is to fill up the 9th column with DDLs and these  DDLS will get their data from a different sds which is using a stored procedure with a single parameter.  I created the 9th row, used template field, made the sds for 9th row, the stored_procedure, threw a DDL in Item template and all  I need now is to pass a parameter in the first column to the sds in the 9th column.  I can code this but i'm getting tired of aspx.cs :) and would like to do it from the GUI.

Pass a grid column value to a Modal


Hi, I have a requirement to hide a field called details on a gridview and show it in a jQuery modal dialog when users click on the Customer ID hyperlink. This grid is created programmatically. I will be hiding the details column via the CSS display:none property. Does some one know how can I pass the grid's selected hidden column value to the modal? Here is some of the code I started:

            GridView mygrid = new GridView();
            //.....................................More columns code for the grid

            //Here is where I need to pass the Details column value associated with the customer ID field selected to the Modal and open the Modal dialog.            
            HyperLinkField linkField = new HyperLinkField();
            string[] dataNavigateUrlFields = { "CustomerID" };
            linkField.DataTextField = "CustomerID";

Bug: Does not change column type from nvarchar to ntext


Scenario: If you create a table with a column of type nvarchar, populate it with some content and try to modify it using the WebMatrix editor, from nvarchar to ntext, it does not display any error message or warning that this is not possible. It silently saves and reverts the change, back to nvarchar. Wasted some hours on this issue as I thought my column was ntext, but in fact was still nvarchar.

Expected behavior: It should change to ntext, or if SQL CE doesn't support that, it should notify the user that no change was applied.

Display column from child table. Possible ?



I'am using dnamic entity with EF4. On a list page of a table, I would like to display a column containing information from a child table of the current element. Sample :

Order List :

Order Data | Required Date | Shipped Date | etc... | ... | Customer Name (foreign key with tostring() method override) | Customer Postal Code (Column that I want to add) |

I don't known how to do that. Is it possible ? Maybe I have to to create my own Metadata proxy that will add dynamicly a column on the MetaColumn list of the table.

Does someone have an easier or better idea ?

Thank you for any help.

Rendering data with HTML tags in the DD Gridview for a selected column


I am having trouble finding out where and how to HTML Encode a cell's data on the Dynamic Data (v4.0) gridview of List.aspx.  As a simple case, suppose I have formatted cell data that is A<br/>B in the DB.    Obviously, I want A stacked on B in the cell.

It seems gridView1.HtmlEncode = true has gone away.

So maybe I'll try to catch it on the RowDataBound event:

protected void GridView1_RowDataBound(Object sender, GridViewRowEventArgs e)

            if (e.Row.RowType == DataControlRowType.DataRow)
                // Html Encode the cells


but this event never fires?

Has anyone figured out how to properly render HTML tags data in the List.aspx's GridView1? 

If I figure this out, then I can add a MetaAttribute called something like [EncodeAsHtml(true)] and be on my way.  Thanks!

Information about sessions


Some questions about sessions:

I know sessions information is stored in the form of cookie and you can use qurystring for that if you set cookieless session in web.config. But I don't exactly understand the scope of a session.

What I believe is when you login to a website, a session cookie is created and the scope of that session is within that page only. If you close the browser that session gets killed and when you open the browser again and go to that site then a new session is created ie a new session is created on every request. Is this correct?

But I have seen in many websites, even if you close the browser and open it again the session is not killed, how does that happen?

Can anyone clear out and explain the scope/lifetime of sessions


Filter by Computed Column



After looking for a driver to open legacy dbf drivers to connect, the next level trouble a have is this one:

first, i can retrieve the data but when trying to filter by a parameter (somesc columns) i get an error.

The error says about the database can't determine some blah blah!

The error is a columm tha is formated (  1234  ) about  8 space, fixed. The values in the query appears like that. I resolve this by Trimming Ltrim(ColumnName) and i get this (1234).

Now in SqlExpress, how can i filter by the new Trimmed Expression? (This is a primary key that the DBF use)


SELECT column1, column2, column3


SELECT Ltrim(column1) as NewExp, column2, column3
Where NewExpre = @NewExpres                  -Error-


Unique text value in databse column


Hi Everyone!

I know this is probably a very basic question but how do I keep a column's text values unique in SQL server (ie for a unique username)?  The column is not an integer it's varchar(50), and it's not the primary key but I could make it the primary key if recommended.

The front end could handle it;  where the user would enter text, it's validated, then a query is done to see if that username is available.  If so, then user can decide to choose it and an insert is done, if not they pick a new username and process repeats.  With this approach, the responsibility of keeping the value unique solely rests on the front end, nothing on the database side.

Is this the correct way to handle this? 

Thank you!


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