G
Guest
I have read some codes like following:
///////////////////////////////////////////
SqlConnection* conn =
new SqlConnection(S"Server=localhost;"
S"Database=Northwind;"
S"Integrated Security=true;");
adapter = new SqlDataAdapter(S"SELECT * FROM Employees", conn);
eventHandler = new SqlEventHandler(adapter, this);
commandBuilder = new SqlCommandBuilder(adapter);
conn->Open();
///////////////////////////////////////////
I wondered can we link to the database without username and password?
///////////////////////////////////////////
SqlConnection* conn =
new SqlConnection(S"Server=localhost;"
S"Database=Northwind;"
S"Integrated Security=true;");
adapter = new SqlDataAdapter(S"SELECT * FROM Employees", conn);
eventHandler = new SqlEventHandler(adapter, this);
commandBuilder = new SqlCommandBuilder(adapter);
conn->Open();
///////////////////////////////////////////
I wondered can we link to the database without username and password?