I am trying to create a grid view table where i want to show some selected data from a checkboxlist. THe problem is that whenever i select some data from the checkboxlist, the gridview will only show …
Tag: asp.net
Data type mismatch in criteria expression. whats wrong?
how do I put an int variable in sql? int x = Convert.ToInt32(Session[“id”]); string MySQL = @”UPDATE users SET email = ‘”+Request.Form[“email”]+”‘, pname = ‘”+Request.Form[“pname”]+”‘, …
NHibernate IN Expression / Restrictions Hitting 2100 Parameter Limit SQL Server
Is there a way to force NHibernate to run a query without executing it as a parameterized query. Basically I’m running into an issue where I am hitting SQL Server’s 2100 parameter limit. I’m hitting a limit because of an “IN” restriction on my query. For reasons I won’t get into details about I need to use an NHibernate In
Get Sequence Current Value
I have a created sequence on my DB Server, used for generated registers and the detail of every one. I have to create a plain document of that detail in the moment of the generation, so I have to …
Arabic Text Shows Encoded
I have a problem that file encoding was windows-1256 and it shows strange text when using ie11 and arabic text, so i changed the file encoding to utf-8 and it works fine but i need to convert back the …
Join multiple tables and single output using Entity Framework mvc5
I am very new to linq query so I need to join multiple tables and single output using Entity Framework mvc5 Below is my 3 table structures and Table_Application is a main table 1) Table_Application …
How to keep DropDownList1 selected value after postback?
I have two DropDownLists. Once a DropDownList1 value is selected, DropDownList2 will populate based on Dropdownlist1. But after the page refreshes, the dropdownlist1 selected value is changed to the …
how to get the ID of the record that is update in C#
I am able to get a sql query that can return the ID of a record that is update in the Database; that ID is needed to update other records. but I don’t know how to get that updated ID value in C#. Answer I think you’re really asking how do you retrieve the resultset returned by an INSERT or
System.Data.SqlClient.SqlException (0x80131904): Invalid column name
I am getting this error while trying to execute the attached code. Please help. I am getting values as list array in controller method successfully but when I try to read data from sql database I am getting error. Controller method: Execption:- Answer Since you are using inline SQL, every value within dogCSV string that’s comma separated needs a single
the name is not a valid identifier. error in dynamic stored procudure
my stored procudure is : when execute show this error: The name ‘SELECT IDproduct,name_product,first_price,final_price,max_registered_price, date_record_shamsi,final_date_view_shamsi, count_views,image_1,collection_1 from Table_asbabbazi where active=0 AND (name_product LIKE %@name_product%) AND (collection_1 = @collection_1 )’ is not a valid identifier. please help Answer Some parameters in a query string are not parsed correctly, and you are using dynamic sql it must be executed by EXECUTE sp_executesql