views:

69

answers:

2

i added the bindingsource control on my winform. here are the details of my connection:

http://img43.imageshack.us/img43/3797/42119312.jpg

when i test the connection, it says "the connection cannot be tested because the specified DB file does not exist"

the DB is located in http://sql0234mjf-2.ordfsweb.com. how should i set up bindingsource?

+2  A: 

it looks like you're trying to use a database file instead of a database server, you may need to modify your data source.

John Boker
+1  A: 

You are using the wrong provider. The "Microsoft SQL Server Database File" provider is not the SQL Server provider. Is the provider for user instances attached files (RANU). User instances are a SQL Express edition only feature and they can only be accessed locally.

To connect to a true SQL Server instance you need to use the proper provider, the Data Provider for SQL Server. When you choose this provider you are presented with a different dialog that ahs options to specify the server name and database name.

Remus Rusanu
this is good but which control handles sql server? can you please be more specific on what i should do
I__
When you define the connection in you project you should choose the proper provider in the very first step. Or define the connection in code and use SqlConnectionStringBuilder class: http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnectionstringbuilder.aspx
Remus Rusanu
can you be more specific please on where and how i can choose the provider?
I__