c# - what is the query of sql database connection -
i want connect c# project sql database.
query have follow??
using(sqlconnection connection = new sqlconnection(connectionstring)) { connection.open(); }
i use this, not working
try this
namespace town { class clsconnection { string connection = @"data source=server name;initial catalog=databasename;integrated security=true"; public sqlconnection getconnection() { sqlconnection sql = new sqlconnection(connection); sql.open(); return sql; } } }
Comments
Post a Comment