How to solve error in ExecuteNonQuery() in asp.net
C#
SqlConnection con = new SqlConnection();
con.ConnectionString = @"Data Source = (LocalDB)\MSSQLLocalDB; AttachDbFilename = C:\Users\Harry\Documents\Visual Studio 2015\WebSites\WebSite2\App_Data\Database.mdf; Integrated Security = True";
con.Open();
// insert command
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText="INSERT INTO firsttb VALUES ( @n , @p ) ";
cmd.CommandType = System.Data.CommandType.Text;
cmd.Parameters.AddWithValue("@n",TextBox1.Text);
cmd.Parameters.AddWithValue("@p", TextBox2.Text);
cmd.ExecuteNonQuery();
con.Close();
Also in C#:
- Title
- c# auto property set default value
- Category
- C#
- Title
- unity timer
- Category
- C#
- Title
- print gridcontrol devexpress
- Category
- C#
- Title
- linq in c#
- Category
- C#
- Title
- unity serializefield
- Category
- C#
- Title
- odbc command parameters c#
- Category
- C#
- Title
- array to list C
- Category
- C#
- Title
- c# public static string
- Category
- C#
- Title
- asp.net core mvc not triggering client side validation
- Category
- C#
- Title
- how to hide a panel ui unity
- Category
- C#
- Title
- set int to null c#
- Category
- C#
- Title
- javascript append
- Category
- C#
- Title
- c# how to exit program
- Category
- C#
- Title
- c# if statement
- Category
- C#
- Title
- what is type unity
- Category
- C#
- Title
- sum of digits in c#
- Category
- C#
- Title
- unity list
- Category
- C#
- Title
- perlin noise unity
- Category
- C#
- Title
- write string multiple times c#
- Category
- C#
- Title
- unity button interactable
- Category
- C#
- Title
- c# bool list count true
- Category
- C#
- Title
- Unity how to put IEnumerator in update and loop once with yeild return new waitforseconds
- Category
- C#
- Title
- check version of asp.net core
- Category
- C#
- Title
- displayname c#
- Category
- C#
- Title
- c# read a webpage data
- Category
- C#
- Title
- c# inline if
- Category
- C#
- Title
- find negative version of integer in c#
- Category
- C#
- Title
- whats a string
- Category
- C#
- Title
- unity check tag
- Category
- C#
- Title
- c# make http request
- Category
- C#
- Title
- unity load text resources from subfolder
- Category
- C#
- Title
- freeze position unity c#
- Category
- C#
- Title
- public enum c#
- Category
- C#
- Title
- unity c# public all codes
- Category
- C#
- Title
- how to see if they are aholding down a key unity
- Category
- C#
- Title
- remove all array elements c#
- Category
- C#
- Title
- condition when a animation finishes in unity
- Category
- C#
- Title
- c# window instantly close
- Category
- C#
- Title
- c# declare an int list
- Category
- C#
- Title
- c# print
- Category
- C#
- Title
- zip file ignoring directory starting with dot
- Category
- C#
- Title
- loop through string array c#
- Category
- C#
- Title
- open file in explorer c#
- Category
- C#
- Title
- csharp datetime string format
- Category
- C#
- Title
- how to add object in dictionary in c#
- Category
- C#
- Title
- nullreferenceexception c#
- Category
- C#
- Title
- c# windows forms draw pixel
- Category
- C#
- Title
- unity rotate around axis
- Category
- C#
- Title
- c# list all files in a directory and subdirectory
- Category
- C#
- Title
- read xml file c#
- Category
- C#
- Title
- no overload for 'useItemOnSceneLoad' matches delegate 'UnityAction<Scene, LoadSceneMode>'
- Category
- C#
- Title
- how to wait in c#
- Category
- C#
- Title
- what is the namespace for textmesh pro
- Category
- C#
- Title
- degree to radians c#
- Category
- C#
- Title
- list c#
- Category
- C#
- Title
- convert from xls to xlsx C#
- Category
- C#
- Title
- invalidoperationexception c# ui thread
- Category
- C#
- Title
- appsettings in console application c#
- Category
- C#
- Title
- how to switch scenes unity
- Category
- C#
- Title
- first person camera controller unity
- Category
- C#
- Title
- devexpress objectspace to session
- Category
- C#
- Title
- copy to clipboard unbity
- Category
- C#
- Title
- C# downloadstirng download old
- Category
- C#
- Title
- how to add a componet to a gameobject throgh code unity
- Category
- C#
- Title
- unity ai wander script
- Category
- C#
- Title
- what is the or symbol in C#
- Category
- C#
- Title
- sort c#
- Category
- C#
- Title
- unity array of child objects
- Category
- C#
- Title
- CS0103 C# The name 'Request.Url.Scheme' does not exist in the current context
- Category
- C#
- Title
- import regex c#
- Category
- C#
- Title
- c# string to float
- Category
- C#
- Title
- asp.net mvc 5 codefirst dropdown list
- Category
- C#
- Title
- unity switch to scene and transfer data
- Category
- C#
- Title
- c# creating exceptions
- Category
- C#
- Title
- unity remove gameobject
- Category
- C#
- Title
- unity create a child object
- Category
- C#
- Title
- asp.net tag helper checkbox
- Category
- C#
- Title
- c# get set
- Category
- C#
- Title
- c# change cursor
- Category
- C#
- Title
- c# negation
- Category
- C#
- Title
- c# making a folder
- Category
- C#
- Title
- unity method on scene loaded
- Category
- C#
- Title
- f reachable queue in c#
- Category
- C#
- Title
- what is the and in c#
- Category
- C#
- Title
- unity on trigger enter
- Category
- C#
- Title
- decimals not stored in azure tables
- Category
- C#
- Title
- microsoft input tool need .net framework
- Category
- C#
- Title
- unitt only 1 number float
- Category
- C#
- Title
- entity framework core
- Category
- C#
- Title
- .net core authorizationhandlercontext
- Category
- C#
- Title
- c# close window
- Category
- C#
- Title
- c# graphics draw filled rectangle
- Category
- C#
- Title
- loop datagridview c#
- Category
- C#
- Title
- c sharp exit while loop
- Category
- C#
- Title
- how to remove vowels from a sttring using regex c#
- Category
- C#
- Title
- visual studio C# hintergrund bild ändern
- Category
- C#
- Title
- gersener waves
- Category
- C#
- Title
- c# foreach namevaluecollection
- Category
- C#
- Title
- download file from url asp net web api c#
- Category
- C#
- Title
- c# or
- Category
- C#