.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

sql in (list max

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

Is there a limit, either to the length of the string or the number of parameters, in a SQL "in" call.  e.g. select * from customer where custid in (n1, n2, ..., nx).

I will also be calling this from vb dot net, which might have a different (smaller?) limitation.  e.g. cmdtext = "select * from customer where custid in (n1, n2, ..., nx)", cmd.executeNonQuery()

View Complete Post

More Related Resource Links

Ready made List Types provided by SharePoint

SharePoint provides some out of the box List Types. Some of the most used ready made list types that SharePoint provides currently are listed below:

Export SharePoint List to Excel Spreadsheet Programmatically using C#

In SharePoint applications, Custom Lists are used to store business data and Document Libraries to store the documents. But for data manupulation and analysis, Microsoft Excel provides very rich features as compared to SharePoint Lists. That's why people still loves to work on Microsoft Excel Sheets.

Dropdown list in ASP.NET - How to get value selected

am sure this must be very simple, but unforunately I can't figure it out.
I have the following code which populates the dropdown lists from the database. This works fine. Now, when the user selects a particular employee name from the list, I want to get the Employee Id of the selected employee. i.e. I need to get the "Eid" value. I can do this if the EId is loaded in the dropdown list, but in this case only the employee name is displayed. Please let me know howI can get the Eid value even though it is not loaded in the dropdown list.
I would really appreciate your help

Creating Sites/Lists/List Items under Current User Context in SharePoint By Using SPUserToken

Usually we do this by performing the action under RunWithElevatedPrivileges method and updating the listitem using SPListItem.SystemUpdate() method (see here). but this approach has its own flaws like (RunWithElevatedPrivileges will run under system account, we cannot use SystemUpdate for SPSite,SPWeb,SPList, since it runs under system we will "CreatedBy" by as SystemAccount).

Editable Gridview with Textbox, CheckBox, Radio Button and DropDown List

This is an example of an editable gridview containing different ASP.NET controls. When user wants to edit values in gridview, she/he can use these controls to edit existing values in Gridview Edit Mode.

Using the Code

Get pixel format, raw format, property id list and property items image in VB.net - C#.net.

n this simple article you will learn that how we can get pixel format, raw format, property id list and property items image in VB and C#.net.

Get Pixel Format:

Image consists of pixels to get the format of the pixel we have a property named pixel format. This property returns an enumeration of pixel format. This enumeration tells the pixel format.

To demonstrate make a window application. Drag one button and a picture box on form.

Now write the following code on Button click event:

Binding an array to dropdown list


I have the following string which is a list of urls. How do I get this to work so the url shows for the selection and also is the value?      


allLinks = newAllLinks
        Me.DropDownList1.DataTextField = "Link"
        Me.DropDownList1.DataValueField = "LinkURL"
        Me.DropDownList1.Items.Insert(0, New ListItem(" - Select - ", 0))
        Me.DropDownList1.DataSource = allLinks


 ArgumentNullException: Value cannot be null.
Parameter name: container]
   System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName) +121
   System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName, String format) +8

Compare List


i have got two list<string> containing datas

i would like to compare the both list and the result to new list whch does not contains the same data.(basically unique data)

eg shown below..

list A       list b          list c

a             a                 d

b           d                    c

c            f                   e

f            e

plz let me knw..

Gridview with a dropdown list for editing


Hello. I am working through Scott Mitchell's ASP.Net in 24 hours book. I am finishing the photo album project.

I have a GridView that retrieves a list of uploaded photo rows for the logged-in user.
The GridView is for editing and deleting rows.

The photo Category field in the Gridview is a dropdown list. The text entry field was deleted after converting this field to a Template.

Like the uploaded photos, these Categories are user-specific. They are created in another web page.

Users also have the option to select "none" for the category when they upload an image.

For the GridView:  The Category ID field's ItemTemplate and EditItemTemplate both have a " - None - " choice added to them.

I am getting this error:

'pictureReadOnlyCategories' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value


Note: The ID for the ItemTemplate for that dropdown list is the ID listed above in the error: "pictureReadOnlyCategories".


Am I missing some step in this process of changing a GridViews text field to a dropdown that can be used for editing? I went through the book's instructions three times.

Here is my code for the dropdown list and a screenshot of the Design

Format Generic List Bound to Gridview


I have a generic list of a custom type. The custom type has a string and double.

I'm binding the list to a gridview and it outputs everything fine.

I'm trying to format the double column into a currency format. It is in a template field as I'm calculating a running total. I pass the value to a function that returns a double and adds the current value to a running total which I will show in the footer.

The format is not changing to currency as expected when using String.Format("{0:c}", GetTotal(Convert.ToDouble(Eval("Amount"))))

Any ideas on what might be going on and how to fix this?


Populating Dropdown List using FK


Hi Folks,

2 Questions. I am trying out Data Entities in VWD 2010 Express. I have a parent (Customers) and child (Orders) table. Customers table has FirstName, LastName and Email columns.

Q1. When I view/edit/insert an Order, it shows the customer's first name in dropdown list whereas I want the full name. How can this be done?

Q2. How can I change the default behavior of PK/FK relationship so that customer's Email is displayed instead of Name?

Any help will be much appreciated.


C#, LINQ: (List<>) Question???


Hi Everyone,

I have a strange problem:


There is an entity (Table) called "Filters" in my .edmx which has all my tables and stuff in it (to use it for LINQ queries)

I have created a class called "CustomFilters" which inherits "Filters". So now my cutom class has all the properties of the original "Filters" class (table) and 1 more additional property that i wanted which is a List of "CustomFilters":

List<CustomFilters> children = new List<CustomFilters>();

Now i get all my records into:

List<CustomFilters> theOriginalList = new List<CustomFilters>();

NOTE: first all records are tken into a List<Filters> and then these are added into List<CustomFilters> where List<CustomFilters> for children of that record is added, and then children of the child records, and so on......

so now, every record is an instance of CustomFilters which has a property named "children" which is a list again; and each child again has instanaces of "CustomFilters", and each instance again has children...and on and on and on.....

(basiacally its a data source for a treeview in my silverlight control)

every thing is good and working as expected.


Getting users list reporting to manager from LDAP


Dear All,

I need to get list of users reporting to a particular manager from the Active directory.

In the active directory there is manager property with contains the data in the following way.


Please help me in building the filter condition.

I am using the following

pUserName="Gegore Lid";

strSearch = "(&(objectClass=user)(objectCategory=user)((Manager cn=" + pUserName + "))";

DirectorySearcher dSearcher = new DirectorySearcher(dEntry, strSearch);

            //Account properites to load
            string[] arrPropertiesToLoad = { "displayName", "department", "manager", "sAMAccountName", "EmployeeNumber", "Title" };

          SearchResultCollection sResultColl = dSearcher.FindAll();

 the above code is not returning any result.

Please help me in this.



Getting list of users reporting from specific Manager from Active Directory


Dear All,

I am have requirement like displaying all the user information reporting to specific manager from Active Directory.

Please help me regarding this.



How to get an AD OU list


I'm new to this so please be gentle. All I'm trying to do is create a menu system from our OU tructure.So I will have like "Head Office" than inside all OU Departments etc...

 Is anyone could help me on this matter. Please give example in VB.net

I know how to connect to AD but what do I do after?

Dim entry As New DirectoryServices.DirectoryEntry("LDAP://Myserver.co.uk/OU=Head Office,DC=domain,DC=co,DC=uk")


Any help would be apreciated.


Crystal report with dataset and list - please help


Hi Guys;

i'm new in reporting so thanks to be patient with me,

here is my problem, i have created a report then a report viewer,, i passed some parameters to the report it goes well.

i'm working with local data stored in List<object>, i tried to fill my dataset (data) with those local data stored in the list, i filed Cry

looking for yor help


what is T in List


Dear all,

what is meaning of Type in asp.net like List<T> or IComparable<T> then what is significant of 'T', I really confuse regarding thing

Thanks in Advance

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