Asked by:
Insert a data without using insert command

Question
-
User1997423929 posted
Can I insert a data into my table without using insert command in asp.net project.Sunday, January 20, 2019 3:15 PM
All replies
-
User475983607 posted
Unclear, what kind of table? Please post your code?Sunday, January 20, 2019 3:25 PM -
User409696431 posted
If you are referring to a database table, you use the insert command to put new rows in, and the update command to replace existing data with new data. So, are you inserting new rows, or updating existing rows?
Sunday, January 20, 2019 5:11 PM -
User1120430333 posted
Can I insert a data into my table without using insert command in asp.net project.no
Sunday, January 20, 2019 9:09 PM -
User283571144 posted
Hi Adwin Jha,
Can I insert a data into my table without using insert command in asp.net project.Could you please share more details information about insert a data into my table without using insert command in asp.net project?
Do you mean you don't want to write insert sql command in your asp.net application?
If this is your requirement, I suggest you could consider using store procedure to achieve your requirement.
By using store proceduce, you could just call store proceduce name in the application.
More details about how to use store procedure with ADO.NET, you could refer to below article:
https://www.c-sharpcorner.com/article/using-stored-procedures-with-Asp-Net/
Best Regards,
Brando
Monday, January 21, 2019 5:31 AM -
User1997423929 posted
If you are referring to a database table, you use the insert command to put new rows in, and the update command to replace existing data with new data. So, are you inserting new rows, or updating existing rows?
I am inserting new rows.
Monday, January 21, 2019 7:14 AM -
User409696431 posted
If you are inserting new rows, you need an insert command. Why are you not wanting to use one?
Monday, January 21, 2019 4:43 PM -
User753101303 posted
Hi,
Unclear. It can be hidden from you if using a DataSet or Entity Framework but ultimately a SQL statement is sent to the server (at least those based on SQL): INSERT for adding new rows, UPDATE for updating existing rows and DELETE for deleting rows.
What is the exact problem you have ?
Tuesday, January 22, 2019 9:34 AM