Drag/Drop SQL Connection Fails



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




.



Relevant Pages

  • RE: How to: List a table in Tables holder of Server Explorer
    ... 1.Click Connect to Database icon in Server Explorer. ... button in Add Connection window. ... 3.Select "Microsoft ODBC Data Source" from Data source list in Change Data ... 5.Select MS Access Database from Computer Data source. ...
    (microsoft.public.vsnet.general)
  • Re: Need help in VB.NET connecting to Access database
    ... >provier to MS Jet 4.0 OLE DB PRovider, then back to the Connection tab. ... create the data connection using Server Explorer no problem. ... Private Sub Button1_Click(ByVal sender As System.Object, ... perhaps as part of a Custom installation that may be missing? ...
    (microsoft.public.dotnet.languages.vb)
  • Re: ComboBox Row Source = Result of DB Query?
    ... The easiest way would be to drag the table from server explorer (you ... will need to create a new DB connection to the access table in the ... required connections and adapters get automatically setup, ... > I have an access database and I want to populate a combo box with the ...
    (microsoft.public.dotnet.framework.windowsforms)
  • RE: Server Error in /Access Application
    ... IDE's server explorer, but didn't close the connection, then at runtime, ... Microsoft Online Support ... Server Error in '/Access' Application ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: SQL Server Databases in VS
    ... When you drag and drop the connection onto your form you should be able to ... SQL authentication in Server Explorer. ... > VS.NET, it still creates a connection string using Windows Authentication, ...
    (microsoft.public.dotnet.academic)