4
Answers

what is syntax error for the insert into qyery!! in c#

 string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Samples\\login.mdb";
               String uname, pass;
                uname = textBox1.Text;
                
                pass = textBox2.Text;
                OleDbConnection myConnection = new OleDbConnection(connectionString);
                myConnection.Open();
               
                String query = "insert into LOGIN_TABLE (UserName, Password) VALUES ('" + textBox1.Text.ToString() + "','" + textBox2.Text.ToString() + "') ";

                
                

                OleDbCommand myCommand = new OleDbCommand(query, myConnection);
                //myCommand.CommandText = query;
                OleDbParameter myParm = myCommand.Parameters.Add("@uname", OleDbType.VarChar, 50);
                myParm.Value = textBox1.Text;

                myParm = myCommand.Parameters.Add("@pass", OleDbType.VarChar, 50);
                myParm.Value = textBox2.Text;

                myCommand.ExecuteNonQuery();
                myConnection.Close();

Answers (4)
0
vijay
NA 160 17.6k 12y
hi..
Refer the below link to adjust the size of the  image..
http://www.dotnetcode.in/2012/06/resize-image-and-upload-in-to-server-in.html
0
Vishnujeet Kumar
NA 6k 895k 12y
http://webdeveloperpost.com/Articles/How-To-Resize-Image-In-ASP-NET-With-Good-Quality.aspx
http://forums.asp.net/t/1085119.aspx
0
Sumit Kumar Sinha
NA 231 57.7k 12y