Connection String Help

Tech-Archive recommends: Speed Up your PC by fixing your registry



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


.



Relevant Pages

  • Re: Connection String Help
    ... When I run this query a window pops up that wants a User Name and Password: ... Dim ADataAdapter As OleDb.OleDbDataAdapter ... Dim AConnection As New ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Connection String Help
    ... the query runs fine. ... credentials in my connection string so that the window doesn't pop up. ... Dim ADataAdapter As OleDb.OleDbDataAdapter ... Dim AConnection As New ...
    (microsoft.public.dotnet.framework.adonet)
  • Microsoft Cleanliness
    ... I guess I've been working with A97 too long. ... In the database window they added a couple of wizards to clutter it up instead of. ... MS preceeds each table with the word TABLE and each query with "QUERY". ... I guess MS programmers have never heard a dropdown can have more than one column. ...
    (comp.databases.ms-access)
  • Re: Mailmerge from Access
    ... Query linked to the Access db. ... > manipulate the z-order (i.e. which window in front of which) will work. ... >> So the problem is that the queries parameter window opens up first, ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Microsoft Cleanliness
    ... In the database window they added a couple of wizards to clutter it up instead of. ... MS preceeds each table with the word TABLE and each query with "QUERY". ... Somebody at MS had common sense at one time and allowed you to select from Table, Query, or both in A97. ...
    (comp.databases.ms-access)