Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
9
Reply
Connection string & sql server problem ?
SUNIL GUTTA
Feb 26 2013 1:43 PM
2.9k
Reply
Hi friends
Well coming to my issue
I planned to test my connection using " State " member of connection class . so i have written
Logic :
Declarations: using System.Data.OleDb;
private void button1_Click(object sender, EventArgs e)
{
OleDbConnection con = new OleDbConnection("provider=SqlOleDb;Integrated Security =SSPI;Database=Master");
con.Open();
MessageBox.Show(con.State.ToString());
con.Close();
MessageBox.Show(con.State.ToString());
}
under button when i click it i should tell me the status of connection :)
But i am facing errors like : Invalid authorization specification
Invalid connection string attribute
some other time :[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
I installed SQL server 2008 on my local machine :)
Any ideas about this :)
Thank you
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
9
)
Next Recommended Forum
auto complete in data gridview??
How to bind data to gridview's textbox column