Quote:
quote:Originally posted by Imar
Hi there,
Take a look here: http://www.connectionstrings.com/
Under SQL Server| SqlConnection you'll find the proper syntax. You shouldn't set the Data Source to a file path (to the .mdf) but to the server's (instance) name.
|
Thanks for the reply, I also found this in another Wrox book when I was hanging out at Borders yesterday. But shouldn't the paragraph I cited read as follows?:
"...If you want to use SQL Server, you can simply replace OleDb with SqlClient in the object names; just
import the System.Data.SqlClient namespace, change the connection string
to "Server=myservername;Database=mydatabase;Trusted_C onnection=True | False"
and continue working."
--
'bonehead
-------------------------
"The most likely way for the world to end,
most experts agree, is by accident.
That's where we come in.
We're computer professionals.
We cause accidents."
Nathaniel Borenstein, Senior Computer Scientist, IBM