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

Post New Web Links

Invalid column name 'Infinity'. + SQLException

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

Hi All,

I am inserting the values to the table using the table adapter. And all columns except the datetime and messageid that is unique identification column are the varchar then also i am facing problem of "Invalid column name 'Infinity'. + SQLException".  StackTrace is as below:


   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean ret

View Complete Post

More Related Resource Links

Trying to use distrib but gets error, invalid column name 'publisher'

I have a pull subscription setup between sql server standard 2005 and windows 7 sql server 2008 express. When I run the distrib exe I get the error "invalid column name 'publisher'". I have searched the internet for a solution to this problem and keep coming up empty. Can someone help me debug this error?

Invalid column name 'PasswordSalt' - When session dies?

Server Error in '/' Application. Invalid column name 'PasswordSalt'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: Invalid column name 'PasswordSalt'. Source Error: Line 12: login_password = Request.Form["login_password"]; Line 13: var login_username = Request.Form["login_username"]; Line 14: if(WebSecurity.Login(login_username, login_password)){ Line 15: Response.Redirect("~/"); Line 16: } Source File: c:\login.cshtml Line: 14 Stack Trace: [InvalidOperationException: Invalid column name 'PasswordSalt'.] Microsoft.Data.DynamicRecord.VerifyColumn(String name) +146 Microsoft.Data.DynamicRecord.get_Item(String name) +18 Microsoft.Data.DynamicRecord.TryGetMember(GetMemberBinder binder, Object& result) +11 CallSite.Target(Closure , CallSite , Object ) +130 System.Dynamic.UpdateDelegates.UpdateAndExecute1(CallSite site, T0 arg0) +438 Microsoft.WebPages.SimpleMembershipProvider.GetPassword(Database db, Int32 userId, String& passwordSalt) +641 Microsoft.WebPages.SimpleMembershipProvider.CheckPassword(Database db, Int32 userId, String password

Invalid column name sqlserver 2005, asp.net, vb.net

Hello Friends.
  I am getting an error while tryng to write to sql server. I can't figure out whats wrong. I tried over and over and through some of you may be able to see through the erro instantly. 
the error says "Invvalid "ClientID"" whcih is not true. I double checked the typos and the type. I declared it as varchar(250) and its not declared as identity field,w hich I knew I should but I didnt' in this case
Little background on the set up
I have a table named jobs where I have a jobID as the pk(autogenerated colum) and clientID which his not foreign or any kind of key, yet anyway. and rest of hte field as you see below in my code. Why am I getting this error? Any clue?
I really appreciate if you could help me.
My relevant code
If Page.IsValid Then
            Dim jobdsn As New SqlDataSource
            jobdsn.ConnectionString = ConfigurationManager.ConnectionStrings("CandidatesConnectionString").ToString()
            jobdsn.InsertCommandType = SqlDataSourceCommandType.Text
            jobdsn.InsertCommand = "INSE

System.Data.SqlClient.SqlException: Invalid object name


I am getting this error message

System.Data.SqlClient.SqlException: Invalid object name 'Members'.

The database name is ACEStaff

I copied it accross from my old server to my new one

The table name in the database is Acestaffrm.members. Is the Acestaff prefix giving me this problem. I notice other table have dbo. prefix

Any suggestions on the problem here



Invalid column name SERIALNOLEFT


I am writing a report in SSRS and when my report calls the stored proc below I receive an error stating query execution failed:  Invalid column name SERIALNOLEFT.  However, I have searched the script used ot create the Stored Procedure and I do not see where I am specifying a column name SERIALNOLEFT.





/****** Object:  StoredProcedure [dbo].[CustomerActivityCustomerName]    Script Date: 09/24/2010 11:11:44 ******/





CREATE Procedure [dbo].[CustomerActivityCustomerName]

Why am i getting a note that says 'Invalid Column name'



I,m getting a messeage that i use 'Invalid Column name'. The qury still works but it,s frustrating not knowing what is wrong. I have one table in which i alter a new Column and then update this column from another table, see my code below. When i type in the name of the Column i altered i get this error message. I also use this column later in my query and get the same error. Anybody that knows what i,m doing wrong? 






How to validate invalid column in subquery in script

How to validate invalid column in subquery in script.
What i have a full script for all of my stored procedures and function.
In some stored procedures there are some inner/sub queries which have invalid column name but there is no error in the script when i run it or Parse it.IS tehre anyway i can find the error in my script without going in each of Stored procedures/Functions

Kamran Shahid Senior Software Engineer/Analyst (MCP,MCAD,MCSD.NET,MCTS,MCPD.net[web])

Invalid column name 'difference'


Here is my code:

else if (str == "View Portfolio")
string url;

this.GridView2.Visible = true;
String usr = Membership.GetUser(false).ToString();
int x,count=0;
float total_value,t_c,c_t,d=0,c=0;
string[,] cmp = new string[30,2];
DbDataReader reader1;

DbProviderFactory dbproviderfactory = DbProviderFactories.GetFactory("System.Data.SqlClient");
using (DbConnection conn = dbproviderfactory.CreateConnection())
string s = ConfigurationManager.ConnectionStrings["Project_FinanceConnectionString"].ConnectionString;

conn.ConnectionString = s;


DbCommand cmd = conn.CreateCommand();
DbCommand cmd1 = conn.CreateCommand();

cmd.CommandText = "SELECT Company,Num FROM investment WHERE username=@Uname";
SqlParameter Uname = new SqlParameter("@Uname", SqlDbType.NVarChar, 256);
Uname.Value = usr;

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.

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!

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-


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