Drag/Drop SQL Connection Fails
- From: "Jordan" <jfritts@xxxxxxxxxxxxxxxxxxx>
- Date: Tue, 27 Sep 2005 14:08:57 -0600
I've been working on using "Server Explorer" to ease the creation of my
datasets, connections, and other objects. I created a new connection to my
SQL2000 database and am using sql server logins. It works wonderfully, I can
navigate my tables via VS.NET ide sing the "Server Explorer;" run queries,
change tables, etc.
The problem occurs when I drag/drop the connection into a new page, compile
the project, and then run the application. I get an error on the conn.open()
call that says "Login failed for "<sql user>"." This is the odd part becuase
it works perfect in the ide. Having been a hand-coder for most of my life, I
try to adjust the connection string in the Properties window of the
sqlConnection object I drag/dropped into my page.
It looks something like:
workstation id=<local machine name>;packet size=4096;user id=<sqluser>;data
source=<server>;persist security info=False;initial catalog=<database>
So, I notice the pwd attribute is not set, so I add the following to the
string:
pwd=<sqluser password>;
I then recompile and now the page works wonderfully. I'm presuming that VS
intentionally leaves out this attribute so that hard-coded passwords aren't
being used in the project, although, I don't how this is possible.
Anybody have any ideas on this one? I'm assuming I'm missing something small
that's causing this to fail as I don't think it's a bug, but a setting or
preference or something of the like.
Thanks, j
.
- Prev by Date: Re: "Encapsulate field failed" Error while tring to Encapsulate a field
- Next by Date: Re: "Encapsulate field failed" Error while tring to Encapsulate a field
- Previous by thread: "Encapsulate field failed" Error while tring to Encapsulate a field
- Next by thread: RE: Quick Console removed from RTM of Visual Studio 2005 ? Why?
- Index(es):
Relevant Pages
|