Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 3rd, 2005, 03:41 PM
Registered User
 
Join Date: Mar 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am having a similar problem linking tables from Oracle 8i. I have a VB front end with data kept in Oracle & Access. I want to link the tables in Access from Oracle and access the tables from the VB code like they were Access tables. I have linked the tables and tried to run the code and as you might expect it prompts me for the Oracle password. I am trying to get rid of this prompt, but I don't want to create a new DSN that then needs to get loaded on everyone's computer. I saw the code in this chain, and I am going to try that (with the Oracle connection string), but is there some way in VB code (not Access VB) to access the linked tables with a user name and password using the same connection used to access the Access tables? Here is my Access connection string:
gcnnString = "Provider = MSDataShape; " & _
             "Data Provider = Microsoft.Jet.OLEDB.4.0; " & _
             "Data Source=" & db_path & "; " & _
             "Jet OLEDB:Database Password=" & pwd

Oh and I am using ADODB recordsets.

Thank you for your help!
Meg.
 
Old March 3rd, 2005, 05:15 PM
Registered User
 
Join Date: Mar 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I tried using the code provided in my VB frontend to Access and it doesn't error, but it doesn't work either. The table does not get linked. Any idea why this would happen. Note that I hardcoded the code to link 1 specific table just to see it work first.

I also tried created a macro in VB that uses the transferdatabase action to link tables. This does work, and I can rename the macro to AutoExec, but if the table exist, it does not delete it first. Is there a macro (name) that automatically runs at exit like the AutoExec runs at startup? Not that that will really work in a multi-user environment, but it would be nice to know. I think I can play with the RunCode code to just delete a table then do the transfer database.

Meg.
 
Old March 3rd, 2005, 05:26 PM
Registered User
 
Join Date: Mar 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Okay I got the Macro to work and it refreshes the link at startup with the username and password. However, when I try to access it from the VB code, it still prompts for a password with the wrong user name. So, I am at square one.

Any help would be most appriciated!
Meg.
 
Old January 20th, 2012, 02:32 AM
Registered User
 
Join Date: Jan 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Angry odbc

hi friends,

can anyone help me to find username and password to connect odbc to asp.net. And if anyone know default username and password for connecting asp.net to odbc





Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Server Access ID & Password sosborne BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 4 November 7th, 2006 05:34 AM
Username & Password Hennie Access VBA 2 July 25th, 2006 12:33 AM
VB6 Extract Access DB name that ODBC point to msandid Access 2 August 7th, 2004 02:37 AM
battling to add username & password too similar... Greywacke Javascript 4 October 8th, 2003 02:23 AM
ODBC & Access Ben Access 1 July 20th, 2003 09:41 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.