System.ComponentModel.Win32Exception: The system cannot find the file specified
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Data.SqlClient; using Vipadm.ViewModals; namespace Vipadm.Models { public class DBConn { //SqlConnection con = new SqlConnection(@"Data Source=DESKTOP-PNV2C7S; Database=RI400;integrated security=true"); SqlConnection con = new SqlConnection("Data Source=DESKTOP-PNV2C7S\SQLEXPRESS;Initial Catalog=RI400;User ID=sa;Password=gajula"); public void Clientdata(Client cl) { SqlCommand cmd = new SqlCommand("insert into clients(ClientName,VATNumber,Address1) values(@ClientName,@VATNumber,@Address1)", con); cmd.Parameters.AddWithValue("@ClientName",cl.ClientName); cmd.Parameters.AddWithValue("@VATNumber", cl.VATNumber); cmd.Parameters.AddWithValue("@Address1", cl.Address1); con.Open(); cmd.ExecuteNonQuery(); con.Close(); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)