Re: Connection String Blues
Can you post the connection string and the complete error message?
Re: Connection String Blues
Quote:
Originally Posted by
hspc
Can you post the connection string and the complete error message?
The error message varies slightly with the string but if I use my PC login (xxxx is not the real password) in the string -
"Data Source= GEMINI\\SQLEXPRESS;Initial Catalog=HWDB2;User Id=GEMINI\\peter;Password=xxxx"
I get
Exception: Message: Login failed for user 'GEMINI\peter'. The user is not associated with a trusted SQL Server connection.
Source: .Net SqlClient Data Provider
if I use no user id and password, hoping it will default to the current user (which is, after all, what SSMSE says it's using) . . .
"Data Source= GEMINI\\SQLEXPRESS;Initial Catalog=HWDB2;"
I get
Exception: Message: Login failed for user ''. The user is not associated with a trusted SQL Server connection.
Source: .Net SqlClient Data Provider
Note that GEMINI is the name of the PC.
Re: Connection String Blues
SQL server is probably using windows security - try this :
Code:
Data Source=GEMINI\\SQLEXPRESS;Initial Catalog=HWDB2;Integrated Security=True
Don't have any spaces between the '=' and the connection string.
Darwen.
Re: Connection String Blues
plnelson!
What happend to your problem ?
Re: Connection String Blues
Quote:
Originally Posted by
darwen
SQL server is probably using windows security - try this :
Code:
Data Source=GEMINI\\SQLEXPRESS;Initial Catalog=HWDB2;Integrated Security=True
Don't have any spaces between the '=' and the connection string.
Darwen.
THANKS!! That worked!
Re: Connection String Blues
Another satisfied customer. Ding ! Next please... :D
Darwen.
P.S. I'm glad it was something that simple...
Re: Connection String Blues
Quote:
Originally Posted by
darwen
P.S. I'm glad it was something that simple...
Until he tries it across a network whose machines don't share credentials.. ;)
Integrated Headache = True
Re: Connection String Blues
Quote:
Originally Posted by
cjard
Until he tries it across a network whose machines don't share credentials.. ;)
Yes, but:
- Windows authentication is the recommended mode because it is considered more secure
- Most enterprises now have domains that make credentials normally shared