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.
| Author |
Topic |
|
wassteve
Starting Member
3 Posts |
Posted - 2011-05-13 : 08:22:48
|
| HiHope someone can help.Brand new to SQL - am trying to connect to a local instance of Sqlexpress 2008R2 from VBA (excel 2007).I'm using the connection string"PROVIDER=SQLOLEDB;DATA SOURCE=(local);INITIAL CATALOG=crashcourse; INTEGRATED SECURITY=sspi;"where my database is called crashcourseI can connect to this from Ms SQL server management studio where the server name is Steve-Ultimate\SQLEXPRESSand the connection is called Steve-Ultimate\SteveTried all combinations of replacing local with Steve-Ultimate, Steve-Ultimate\Steve, Steve-Ultimate\SQLEXPRESS, Steve-Ultimate\Steve\SQLEXPRESS but with all of them I get the error"SQL Server does not exist or failed to connect"Any ideas?Steve |
|
|
tmaiden
Yak Posting Veteran
86 Posts |
Posted - 2011-05-13 : 10:24:44
|
| TryData Source=local\SQLEXPRESS;Initial Catalog=crashcourse;Integrated Security=SSPI; |
 |
|
|
tmaiden
Yak Posting Veteran
86 Posts |
Posted - 2011-05-13 : 10:28:04
|
| Also look at http://www.connectionstrings.com/sql-server-2008 |
 |
|
|
wassteve
Starting Member
3 Posts |
Posted - 2011-05-13 : 16:37:03
|
| Thanks but have tried both of those....Steve |
 |
|
|
wassteve
Starting Member
3 Posts |
Posted - 2011-05-13 : 17:18:09
|
| Found the answer....The local part is(local)\SQLEXPRESSplacing of the brackets is crucialS |
 |
|
|
|
|
|