Connection String Help
- From: "Charles A. Lackman" <Charles@xxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 29 Jun 2007 10:25:34 -0700
Hello I am trying to connect to a liked table.
When I run this query a window pops up that wants a User Name and Password:
No User Name and Password is Required - If I click ok (without credentials)
the query runs fine. The problem is that I am trying to send the
credentials in my connection string so that the window doesn't pop up. I am
running a simple query (similar to this) in a Windows Service - so no window
pops up but nothing is returned.
Dim ADataAdapter As OleDb.OleDbDataAdapter
Dim AConnection As New
OleDb.OleDbConnection("Provider=Microsoft.jet.OLEDB.4.0;Data Source=" &
Me.DatabaseLocation & ";User Id= ; Password= ;")
ADataAdapter = New OleDb.OleDbDataAdapter("SELECT * FROM Table1,
AConnection)
AConnection.Open()
ADataAdapter.Fill(ADataSet, "Temp")
AConnection.Close()
I have experimented with multiple ways of getting this work with no success:
Dim AConnection As New
OleDb.OleDbConnection("Provider=Microsoft.jet.OLEDB.4.0;Data Source=" &
Me.DatabaseLocation & ";User Id= ''; Password= '';")
AND
Dim AConnection As New
OleDb.OleDbConnection("Provider=Microsoft.jet.OLEDB.4.0;Data Source=" &
Me.DatabaseLocation & ";User Id=admin ; Password= 1111;")
If I put "admin" in the UserName and "1111" in the password pop up box, it
lets me in - however, it does not work in the connection string: I receive
a workgroup logon error.
Any assistance will be greatly appreciated,
Thanks,
Chuck
.
- Follow-Ups:
- Re: Connection String Help
- From: Miha Markic
- Re: Connection String Help
- Prev by Date: Re: refresh ???
- Next by Date: Re: Ado.net DataSet Refresh
- Previous by thread: ASP.NET Professionals required for Asia's leading NBFC
- Next by thread: Re: Connection String Help
- Index(es):
Relevant Pages
|