Jump to content

Search the Community

Showing results for tags 'insert data in sql database'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. this is a very simple task, it insert name, address and age to the database error when the sql data base from server is use. but when data base from folder app_data is used its working. using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Configuration; namespace WebApplication5 { public partial class WebForm1 : System.Web.UI.Page { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString); protected void Page_Load(object sender, EventArgs e) { con.Open(); } protected void Button1_Click(object sender, EventArgs e) { SqlCommand cmd = new SqlCommand("insert into listotable values('"+TextBox1.Text+"','" +TextBox2.Text+"', '"+TextBox3.Text+"')",con); cmd.ExecuteNonQuery(); con.Close(); TextBox3.Text=""; TextBox2.Text=""; TextBox1.Text=""; } } }
×
×
  • Create New...