Re: linked tables in Access database



On Wed, 27 Apr 2005 18:50:13 +0100, John Provine <xxx@xxxxxxx> wrote:

Got an Access database that has some ODBC links to Oracle tables. When I
open one of the Oracle tables in my app, I get prompted for the Oracle
password. Obviously, I'm not going to want the users to know that password.


How can I connect my application into Oracle so that I don't see the
password prompt? I've tried a couple of things without success ... using the
"Open" method of the ADO connection object, using the "OpenCurrentDatabase"
method of the Access application object, using the "TransferDatabase" method
of the DoCmd object (which in the ADO docs sounds exactly like what I need).
But none of those do the trick.

Right, I'm just guessing here, but I have to do some futzing with Access linked tables in code.

If you import the ADOX type library, you should have a file called
ADOX_TLB. Add this to your uses clause.

Then you can use the ADO Catalog object to manipulate the Access database
(rather than the data, if you see what I mean).

For example, I have to change the path of a linked table in an MDB, so I
do this:

var
Cat : Catalog;
begin
Cat := coCatalog.Create;
Cat.Set_ActiveConnection(ADOConnection1.ConnectionObject);
Cat.Tables.Item['tb_foo'].Properties['Jet OLEDB:Link Datasource'].Value := Filename;
:
end;


Now, there is also a JET property called "Link Provider String", so I'm guessing
you can do something like this:


with Cat.Tables.Item['tb_foo'] do
Properties['Jet OLEDB:Link Provider String:'].Value := 'ORACLE;PWD=secret';


I'm not sure of the actual connection string, though.

HTH

--
jc
.



Relevant Pages

  • Re: ADO.NET and ODBC { CALL ..... } Syntax
    ... > Coonecting to Oracle 8i DB running on Unix ... > OleDB connection with provider as MSDAORA. ... > the same way as it works in ADO arena. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: ADO.NET and ODBC { CALL ..... } Syntax
    ... > Coonecting to Oracle 8i DB running on Unix ... > OleDB connection with provider as MSDAORA. ... > the same way as it works in ADO arena. ... You should really only do this at design-time, or with a command you will ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Table open times and rowsize discontinuity
    ... some manner related to ADO or the tool you are using. ... Puget Sound Oracle Users Groupwww.psoug.org- Hide quoted text - ... For the array fetching, the only parameter I can find in the ADO ... exceeding the SDU and the MTU. ...
    (comp.databases.oracle.misc)
  • Re: OO4O 2.1 vs MDAC
    ... We're planning to move VB3 using OO4O 2.1 ... Now I must distinguish and list out some of the features that ADO / ... (OLE DB or ODBC) ... Also you don't mention the Oracle version there are differences between ...
    (microsoft.public.data.ado)
  • Re: Stored procedures unter Windows XP mit Oracle ODBC Treiber 10.01.0
    ... mit jeder ORACLE Clientversion wird automatisch ein ORACLE ODBC-Treiber ... Über ADO kannst Du das nicht beeinflussen. ... > Public Function StartePruefung(ByRef s_GeVoNr As String, ... > Dim prmGeVoNr As ADODB.Parameter ...
    (microsoft.public.de.vb.datenbank)