Re: Connection problem with Access

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



If you don't need the Word object to connect, remove the relevant code as it's probably a distraction.

However, I'm not sure you can manually connect Word to an Access data source that has a securit database, unless the Admin username and a blank password will give you access to the table you need. I think you'd probably have to do it the way I suggested, at lleast for an OLE DB connection. For a DDE connection, if the database is already open, you're OK.

Even with an OLE DB connection, once you have set it up programmatically, Word should retain the necessary connection information. Whether it always uses it when you reopen the document is a different matter.

Peter Jamieson

http://tips.pjmsn.me.uk

Murray Muspratt-Rouse wrote:
From what I have observed there should be no need for the VBA code to
reconnect with the database. It is running under MS Access, not under
MS Word. Task Manager shows the current applications as 1. the main
application form 2. the 2nd form 3. Microsoft Access [the 3rd form].
Word does not appear (because it has not been made visible yet). I have
checked this theory by running a mail merge in db1 with debug and saw
Word appear only when the code made it visible.

If you set up a mail merge document from Word you have to connect to
the merge data source. Does Word then store the connection with the
document so that it can be made when the document is opened? That would
explain some of the problems others have encountered when they have
distributed the function to PCs running other versions of Access and
Word.

Murray

Peter Jamieson;394386 Wrote:
hello Murray,

I'm not completely sure what is going on here but...
a. if trying to access db2 is affecting db1, I wonder if you are
using the same database pathname in both the Name and COnnection string parameters?
b. frankly, a Word 2003 VBA reference manual is unlikely to help
because
- almost every time I have seen documentation for the OpenDataSource method, it is wrong. That said, it is mostly "benignly"

wrong (i.e. it wouldn't matter if you followed the documentation), but

clearly written by someone who has followed earlier documentaiton and not checked for themselves.
- /Word/ VBA reference material typically does not document the connection strings, which are generally regarded as part of the
database documentation.

That said, I'll try and do some tests here to check the facts. It would

be useful to know for sure which type of database security you are dealing with - "database password" or "workgroup security file".

You may or may not know that with the workgroup security file approach,

permissions can be relatively fine-grained, e.g. an individual may have

read/write permission for tablea, read only permission for tableb, and

no permissions for tablec.


Peter Jamieson

http://tips.pjmsn.me.uk




.



Relevant Pages

  • Re: ActiveConnection works at one host but not at another
    ... I'd set the permissions for the .mdb file, ... I used a connection string because I'd read some forum ... Access 2002 database. ... I notice that instead of an explicit connection object, ...
    (microsoft.public.inetserver.asp.db)
  • RE: Jet database access problem from web service
    ... "Sonya" wrote: ... > I have trouble connecting to Access database from my web service. ... > normal user who has full permissions over Data directory; ... > I also tried an Odbc connection with with the follwoing string: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: (Newbie)Application Roles
    ... level: the database itself. ... SQL Server accommodates these needs through the use of application ... the user's connection through a specific application. ... the connection permanently loses all permissions applied to ...
    (microsoft.public.sqlserver.security)
  • Re: Dont understand my permissions to my SQL Server DB
    ... Have you checked the Logon account permissions for each user? ... Open that procedure in the .adp. ... UID in the connection string have the same name as the name returned by ... > I have an offsite SQL Server database. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: VC++ ADO VFPOLEDB: DB locally works; DB on NT server does not
    ... The VFP database itself doesn't have a password on it, ... application that normally accesses the database does require a user password. ... you raise the question of ADO permissions or user. ... and its Data Connection Wizard to create the connection to my database on ...
    (microsoft.public.fox.programmer.exchange)