zhshqzyc
asked on
Syntax error near coalesce
Thanks for help.
cmd.CommandText = "update dbo.User_Info SET COALESCE(@FirstName, FirstName),COALESCE(@LastName,LastName),COALESCE(@Degree,Degree),COALESCE(@Organization,Organization),COALESCE(@Phone,Phone),COALESCE(@Ext,Ext) where UserName =@username";
cmd.Parameters.Add("FirstName", SqlDbType.VarChar).Value = TextFirstName.Text;
cmd.Parameters.Add("LastName", SqlDbType.VarChar).Value = TextLastName.Text;
cmd.Parameters.Add("Degree", SqlDbType.VarChar).Value = TextDegree.Text;
cmd.Parameters.Add("Organization", SqlDbType.VarChar).Value = TextOrg.Text;
cmd.Parameters.Add("Phone", SqlDbType.VarChar).Value = TextPhone.Text;
cmd.Parameters.Add("Ext", SqlDbType.VarChar).Value = TextExt.Text;
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.