connecting to sql server 2008 from visual studio 2008

Posted by Writetopallavi under Sql Server on 11/7/2011 | Points: 10 | Views : 1326 | Status : [Member] | Replies : 5
Hello

I have created a database named as Example in sql server 2008
now I want to connect this DB in Visual studio 2008

so I had followed the following steps :-
1. On server explorer right click on Data Connections select Add Connection
2. choose Data Sourse as Microsoft SQL Server & Data Provider as .Net framework data provider for sql
3. Then add server name example: myComputerName\SQLEXPRESS
4. when I choose Select or enter database name option at this point it's not showing me Example database
but showing only system database names (master,model,msdb,tempdb) I am using windows authencation

why it is not showing Example database name into dropdownlist
how to resolve this problem please help me




Responses

Posted by: Umeshdwivedi on: 11/7/2011 [Member] Starter | Points: 25

Up
0
Down
Hi
in some case many times happen this
i suggest you that you can delete your database and make a new database then connect
some software make a self error
so i suggest you,you can make DB again

Latest Technology Trainer
And Part time software consultant

Writetopallavi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Writetopallavi on: 11/8/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,
Thanks for your immediate reply, I tried by creating new DB instead of deleting Example DB.
But the same problem I am facing

Please reply...

Writetopallavi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Blessyjees on: 11/8/2011 [Member] Bronze | Points: 25

Up
0
Down
hi,

Are you sure the same sqlserver triying to connect using code. I tthink you created db in another sql server.

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Writetopallavi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Umeshdwivedi on: 11/8/2011 [Member] Starter | Points: 25

Up
0
Down
ok
can you tell me whats the default location to save the db

Latest Technology Trainer
And Part time software consultant

Writetopallavi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Writetopallavi on: 11/9/2011 [Member] Starter | Points: 25

Up
0
Down
Hi ,
My problem gets solved guise
Actually I was accessing Example DB from SQL manager light for SQL
so when I created a new DB in SQL server management studio & tried to connect it from VS 2008
it gets connected successfully.
Thanks for your replies





Writetopallavi, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response