thanks
D.found my answer..used OPENDATASOURCE.
thanks for anyone that tried.
thanks
D.found my answer..used OPENDATASOURCE.
thanks for anyone that tried.
My school is runnnig SQL Server 2005 and i want to connect to it using authetication (userid & passphrase). As i coded the windows application i used localhost as my own computer and IntegratedSecurity shown below. I'm new in C# and SQL. I would appriciate if someone could help me out.
using System;
using System.Data;
using System.Data.SqlClient;
using System.Text;
namespace Personregister
{
class DBManager
{
SqlConnection conn;
SqlConnectionStringBuilder builder;
public DBManager()
{
builder = new SqlConnectionStringBuilder();
builder.DataSource="localhost";
builder.InitialCatalog = "Personregister";
builder.IntegratedSecurity = true;
conn = new SqlConnection(builder.ToString());
}
// more code fallows ......
}
}
Best Regards,
See the documentation for SqlConnectionStringBuilder at http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlconnectionstringbuilder_members.aspx.
For future questions on such topic, you should post on: SQL Server Data Access
Thanks
Laurentiu
SQL Configure,Sql server