Thanks for your help,
Chuck
[quoted text, click to view] "Miha Markic" <miha at rthand com> wrote in message
news:E6D31F2A-4E3E-42EF-91A7-476FF6A5CDBB@microsoft.com...
Take a look at
www.connectionstrings.com --
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development
www.rthand.com Blog:
http://cs.rthand.com/blogs/blog_with_righthand/ [quoted text, click to view] "Charles A. Lackman" <Charles@CreateItSoftware.net> wrote in message
news:e7iO7JnuHHA.4916@TK2MSFTNGP04.phx.gbl...
> 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
>
>