SQL database connection

I've just downloaded VB 2005 Express and SQL server 2005 express.

Built SQL database and trying to connect and open DB.I was trying different connection strings, OLEDB and SQL connections,reinstall Sql server and VB, but have the same massage:"Cannot open database.Login failed". When I bind DB in application, everithing is OK.First guess that something is missing in the code.But maybe Express Edition is not capable to deal with SQL DB?

Public p_conFirst As New SqlConnection()

p_conFirst.ConnectionString = "Server=bk\;SQLEXPXESS;Database=First;Trusted_Connection=True;"

p_conFirst.Open()

'error 4060

Maybe somebody has answer

Thanks,Boris

[719 byte] By [BorisKofman] at [2007-12-28]
# 1

The Express products can only connect to the local instance of SQL Express (Using te Wizards), if you want to connect to tremote databases you will first need to make sure tat the Database Server is configured to accept remote connections, and then you will have to build you database code manually. If you do want to use the binding wizards the best way is to build your code so that it exposes the database objects, then you can bind to the data objects that you have created.

GlennWilson at 2007-9-4 > top of Msdn Tech,Visual Studio Express Editions,Installing and Registering Visual Studio 2005 Express Editions...
# 2

Hi,Glenn

I'm trying connect to local DB in code

Boris

BorisKofman at 2007-9-4 > top of Msdn Tech,Visual Studio Express Editions,Installing and Registering Visual Studio 2005 Express Editions...
# 3

Change the above connection string from "Server=bk\;SQLEXPXESS;Database=First;Trusted_Connection=True;" to "Server=.\SQLEXPXESS;Database=First;Trusted_Connection=True;"

GlennWilson at 2007-9-4 > top of Msdn Tech,Visual Studio Express Editions,Installing and Registering Visual Studio 2005 Express Editions...
# 4

GLENN

Same result

BorisKofman at 2007-9-4 > top of Msdn Tech,Visual Studio Express Editions,Installing and Registering Visual Studio 2005 Express Editions...