Re: database project



Hello TS,
Thanks for your reply,

As you seen, the ".dbf" file in my previous post means ".dbp" file.
I'm truly sorry for this mistake.

There are two different DB reference in VS 2005 IDE. I'm like to check
which connection you are talking about.

1) The DB reference (Data Connections) in "Server Explorer" in VS 2005 IDE.
As far as I know, each connection is encrypted and stored on local for each
user. If you connected database before, this information will be stored in
VS until you remove it explicit.

2) Another DB reference is (Database References) in DataBase Project.
If you double-click this DB reference, VS IDE will check if this reference
has been added in Server Explorer before. I'm talking about this DB
reference. This information is stored in .dbp file which could be shared
with other users.

For detailed information, would you please follow the below steps.

The .dbp file is the Database Project file. If you create a Database
project in VS 2005, VS 2005 IDE will create a project file on disk. This
project file is .dbp file
1) Click File|New|Project in VS 2005
2) Select "Other Project Types"|Database|Database Project in left panel on
"New Project" dialog.
3) Type "DBProjectTest" in Name textbox.
4) Type "your profile\Document\Visual Studio 2005\project\" in Location
textbox.
5) Click "OK" button.
6) Select your database reference in "Add Database Reference" dialog when
VS 2005 IDE creates the new project for you.

Then VS 2005 IDE will create a Database project for you on "your
profile\Document\Visual Studio 2005\project\" folder.
1) Please check there should be a file named "DBProjectTest.dbp" in "your
profile\Document\Visual Studio 2005\project\" folder.
2) Please open "DBProjectTest.dbp" by Notepad.exe
("C:\Windows\notepad.exe").

This file should be something like as below:
# Microsoft Developer Studio Project File - Database Project
Begin DataProject = " DBProjectTest "
MSDTVersion = "80"
DefDBRef = "sha-dng-wywang.testDB.dbo"
Begin Folder = "Change Scripts"
End
Begin Folder = "Create Scripts"
End
Begin DBRefFolder = "Database References"
Begin DBRefNode = "sha-dng-wywang.testDB.dbo"
ConnectStr = "Data Source=.;Initial Catalog=testDB;
Uid=myUsername;Pwd=myPassword"
Provider = "{91510608-8809-4020-8897-FBA057E22D54}"
Colorizer = 0
End
End
Begin Folder = "Queries"
End
End

=============================================================
ConnectStr = "Data Source=.;Initial Catalog=testDB;
Uid=myUsername;Pwd=myPassword"
=============================================================
ConnectStr is used by VS IDE to connect underlying database.
Uid=myUsername;Pwd=myPassword is the user credential.

If you specify the UID and PWD, VS use this user name and password to
connect database. Thus this User Credential will be shared with each team
member.

In order to make sure each member in your team should use his own username
and password to connect DataBase, please remove the Uid and Pwd from the
ConnectStr
For example:
ConnectStr = "Data Source=.;Initial Catalog=testDB"

After you modify the .dbp file, please reopen DB project in VS 2005 again.
If you double-click the DB reference in "Database References" of Database
project, VS 2005 IDE will prompt a dialog. You should have to type your
userid and password in this dialog. After that, VS 2005 IDE will encrypt
and stored connection string on local profile and then create a new
DataConnections in Server Explorer.

Please check the above method and let me know if you have any issue or
anything unclear. I'm glad to assist you.
Have a great day,
Best regards,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

.