.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

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

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :ASP.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

View Complete Post

More Related Resource Links

How to Encrypt and Decrypt a Password using SQLSERVER 2005?(Video)

Encypt and Decrypt a Password using SQLSERVER 2005(Video)

SQLServer 2008 Tools and SQL 2005 Cluster

I recently built a SQL Server 2005 cluster on the o/s Windows Server 2008 R2.  I have been attempting to connect to the cluster from my Windows 7 dekstop with my SQL Server 2008 Tool set.  I have been unable to attach to this cluster since its creation. The firewall is temp off, remote connections in the surface area configuration is set to pipes and tcp/ip and the Browser surface is up and running. I ran Wireshark against the cluster and I could see that there was UDP conversations for ms-sql-m (SQL Port) but that was as far as it would get.  I am using a named instance so not using 1433, but I do see the cluster offering up high RPC ports but the client never responds after the initial UDP response. When I noticed that there was a two way conversation taking place, I went to a seperate machine and fired up SQL Server 2005 Tools and I was easily able to attach to the cluster.  So my question is - Are there any known incompatibilities between SQL Server 2005 cluster services and SQL Server 2008 Tool set?  I can use my 2008 tools to attach to a non-clustered SQL Server 2005 w/o issue.   Error when attempting to connect: A network-related or instance-specific error occured while establishing a connection to sql server.  The server was not found or was not accessible.  Verify that the instance name is correct and the SQL Server is con

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?

Windows Mobile 5 , SQLSERVER/EXPRESS VB.Net 2005 Datareader NullException

Hi all, Recently I have started learning developing Smart Device Applications using .Net.Am using WM 5.0 SQLServer 2005 Express and VS 2005 (VB). In my application, I made a form with some comboboxes and other fields.In the form load am calling a function in my classfile.This function intends to fill the combobox.Please refer the codes below. 1 . The Form Load event in the Form Imports ShoppingList.DB Public Class frmMain Dim objDB As New DB Private Sub frmMain_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load objDB.FillComboBox(cmbCat, "SELECT * FROM TABLE ORDER BY ID_PK") End Sub End Class 2 .Now the DB cls file Imports System Imports System.Data Imports System.Data.SqlClient Public Class DB Dim strCon As String = "Data Source=,1010;Initial Catalog=DB_Shopping;User ID=***;Password=****" Public Sub FillComboBox(ByVal cmbTarget As ComboBox, ByVal Sql_SP As String) Dim dbConn As New SqlConnection(strCon) Dim sqlCMD As New SqlCommand(Sql_SP, dbConn) Try dbConn.Open() Dim dr As SqlClient.SqlDataReader dr = sqlCMD.ExecuteReader() 'dr = sqlCMD.ExecuteReader(CommandBehavior.SequentialAccess) While dr.Read() cmbTarget.Items.Add(dr(0)) End While

how to get datatype a column in sqlserver ?

hi all I want have datatype a field in sqlserver how to get it with (T-sql) thank you

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

PAGEIOLATCH_SH causing long delays after upgrade to SQLSERVER 2005

Some processes in our PeopeSoft system are running extremely long after upgrading from SQLSERVER 2000 to SQLSERVER 2005 SP4. Processes that use to run in 15 minutes now take 4 hours to run. Some processes run in the same amount of time and don't seem to be affected by the upgrade. When I examine the long running processes in Activity Monitor I see the wait type showing up as PAGEIOLATCH_SH. Any ideas as to what might be going on? Our SQLSERVER implementation is a standard install. What should we be looking at to improve the situation?

How to get sum of a column from sharepoint list into SSRS(2005)

Hi, I have a about 100 columns created for survey questions. I need to get the sum of each column into SSRS. Can it be done in dataset instead of adding the aggregate expression in the footer of ssrs table. Some research that I have done so far.......Under the sharepoint list there is an option for Total for each columns. I can select the sum option and it appears in the list, but how can I access this sum in SSRS.

SSIS 2005 imports column as null

Hi, I am using SSIS 2005 to import excel files to sql server. I have a large excel file with many columns. I have one column -qty that not all rows have data for it-empty. For such rows a another column-value that i need to export is imported as NULL. If column QTY contains a value than column Value is imported fine but if column QTY is blank Value is NULL even if it does have a value. I have played with TypeGuessRows but it doesn't help. Any ideas? Thanks

how to hide a column in Matrix : SSRS 2005

I would like to hide a column in matrix using SSRS 2005 but when i use visibility : hiden then it shows white space and if i reduce a width to 0in; but it accepts by default 0.035in something.i really would like to hide a complete column without any whitespace and all.

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]

Invalid column name 'Infinity'. + SQLException


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

Permissions needed to run DTS packages in SQLServer 2005



I was asked to document the permissions to enumarate, modify and execute DTS packages which we have on our SQLServer 2005 production server(s).

I know that the user needs read-access to sysdtspackage to list the DTS package(s), the user also needs to be the Owner of the package or sysadmin inorder to modify the package.

Now, there are three ways of running a DTS package stored in the msdb

[1] Run the package from the DTS designer

[2] Run from the command line via DTSRun

[3] As a DTS Task in SSIS

I have a DTS package (ExtractWestCoast.dts) which I wanted to test for permissions. So, I created a login named DTSTest and gave it db_datareader role to the msdb database (Note that I also have a Windows Authentication based login - CorpDomain\grajee - into the sqlserver with sysadmin role). With this role given, I logged into SSMS using DTSTest and made sure I was able to see the list of DTSPackages. I did a sample run of ExtractWestCoast DTSpackage expecting it to fail. But to my surprise the DTS package executed successfully. Using my regular id (CorpDomain\grajee), I enabled the logging feature on the DTS package so that it creates entries in the sysdtslog msdb system table for every run to see under whom the package runs. Using the DTSTest login, I executed the DTS package and it executed successfully. I checked the

Column Alias in ORDER BY Clause -- not supported in SQL Server 2005/2008 -- Causes enter migration



We are migrating from SQL Server 2000 to SQL Server 2008 R2 and our web application having thousands of SQL Statement with "Column Alias in ORDER BY Clause ".It is very difficulty to change all statements.

One of article says that SQL Server 2005/SQL Server 2008 not support "Column Alias in ORDER BY Clause and we have to replace with column name" because of this issue If we change Alias name to column name, we have do enter application/integrity testing. it is going to be big deal.

our client Decided to stop migration, Please some help is there any other alternative.



Conditional column selection in SQL Server 2005


I'm attempting to use a SQLDataSource to only pull those fields that are "different".  For example:  I have two tables; Artist & ArtistPendingChanges.  When an Artists updates their online profile, it's saved to the ArtistPendingChanges table, which is almost an exact copy of the Artist table.  I want the Artist to be able to go to a page where they can see what changes are pending.  Ideally I'd like to be able to build my SELECT statement to do something like this (in plain English):

SELECT ArtistPendingChanges.FirstName if it's different from the Artist.FirstName

Right now this is my query and it's displaying all fields which isn't that helpful if the user only updated one column:

SELECT     ArtistPendingChanges.LastName, ArtistPendingChanges.FirstName, ArtistPendingChanges.HomeAddress, ArtistPendingChanges.HomeAddressPublic, 
                      ArtistPendingChanges.MailAddress, ArtistPendingChanges.MailAddressPublic, ArtistPendingChanges.PostalCode, 
                      ArtistPendingChanges.PostalCodePublic, ArtistPendingChanges.HomePhone, ArtistPendingChanges.CommunityID, 
                      ArtistPendingChanges.HomePhonePublic, ArtistPendingChanges.AltPhone, ArtistPendingChanges.AltPhonePublic, ArtistPendingChanges.PhoneTypeID, 

How to customize column names in Drill through action of SSAS 2005?

Hi Everyone,

Can somebody tell me about:How to customize column names in Drill through action of SSAS 2005?

I have defined drillthrough actions in SSAS 2005 cube. Drillthrough action is working very fine.

But while browsing the cube when i drillthrugh the data, my column names are shown as [$Employee Details].[Employee No], [$Employee Details].[Employee Name] etc.

I want to depict it only as Employee No, Employee Name etc.

Please help...


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? 






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