Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Error:Cannot connect sql server 2008 to vb 2010

Author  Topic 

balamithra
Starting Member

2 Posts

Posted - 2012-08-07 : 13:31:03
Hi,
*I have installed sql server 2008 management studio with "use sql server authentication".
*I have created a database with
database name:stock
owner:<default>
*In Vb.net
created a windows application;clicked on Add datasource;changed d datasource to microsoft sql server database file(SqlClient);clicked on option button use sql server authentication n then provided d user name and password;
browsed d database and clecked on open;This is when i get a error.
This is the error:
"Select sql server database file
stock.
you dont have permission to access this file
contact file owner or the administrator"

Plz let me knw the cause of d error and how to solve it

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-08-07 : 15:16:05
When you say you installed SQL Server Management Studio, did you mean that you installed a local instance of the server as well, or did you install only the client tools?

I am assuming the former, because you were able to create a database as well.

If that is true, instead of selecting "microsoft sql server database file(SqlClient)" select "microsoft sql server"
Go to Top of Page

balamithra
Starting Member

2 Posts

Posted - 2012-08-08 : 00:34:13
The options available for datasource are:
Microsoft access database file
Microsoft sql compact 3.5
Microsoft sql database file

When I select Microsoft sql compact 3.5 i could not browse the database. to browse d database I need to change d file type as "all files".
What should I try now?
Go to Top of Page

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-08-08 : 07:11:55
I don't know what plugin/feature you are missing that would cause the inability to create a Microsoft SQL Server data source. Here is what I did:

1. Created a VB.Net winforms application in my VS 2010.
2. From the Data menu, Add New Data Source
3. Selected Database in the dialog and clicked Next
4. Chose Dataset for Database Model
5. In the next window, selected New Connection.

In th next window that comes up, I choose Mircosoft SQL Server (SqlClient) for Data source.

If you are not able to do that, there are some features installed on my computer which you don't have - but I don't know what they are.
Go to Top of Page
   

- Advertisement -