Solved

Login in VB to oracle server through Excel

Posted on 2015-02-04
7
209 Views
Last Modified: 2015-02-08
Experts,

I have a module in VB in Excel which logs me into an Oracle server using an ODBC driver

When we used a separate userid and password, this worked for me


cn.Open "Driver={Microsoft ODBC for Oracle};Server=myServer1;Uid=myname;Pwd=mypassword;"

We now use our network ID and password to get into the tables
When i put my network  IS and password into the the statement above, I get invalid id and password

Does anyone know what the issue is?
0
Comment
Question by:morinia
  • 3
  • 3
7 Comments
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 40590977
>>={Microsoft ODBC for Oracle};

First you should not use the Microsoft drivers.  They have been deprecated and only sit on top of the Oracle drivers anyway.

I'm afraid I don't understand what a network ID versus a network IS is.
0
 

Author Comment

by:morinia
ID: 40591034
In the past we were given user IDs s and passwords to  access the Data Warehouse.

Now as an added security to access the Data Warehouse you must use your network ID and password. This is what you use to sign into to system through windows. Prior to this one user could sign in to the company network using their network ID  and login using someone else's Data warehouse credentials.

One anomaly is that our network passwords must have a special character.  Mine has an asterisk in the password.  This may be causing a problem.
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 40591072
Do you have any other tools installed to attempt a database connection?  Sqlplus preferred since this is the simplest tool to try but SQL Developer will also work.

Before debugging the ODBC drivers, make sure the userid and password is correct and can connect you to the database.  Then we'll figure out how to get the ODBC drivers working.

I strongly suggest you use the Oracle drivers.  The Microsoft ones might have 'issues' with the new complex passwords.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:morinia
ID: 40591114
I am actually using oracle drivers in my odbc connection. It is in the VB code where I have tne problem.

I need vb code for ADODB connection.
0
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 40591129
>>I am actually using oracle drivers in my odbc connection

Then what you posted isn't what you are using?

You posted:  Driver={Microsoft ODBC for Oracle};

That is the Microsoft driver.

>>I need vb code for ADODB connection.

There are many sites out there that have connection strings for the various drivers.  Anything I post here wouldn't be any different.

I always seem to end up on:
http://www.connectionstrings.com/oracle/
0
 

Author Closing Comment

by:morinia
ID: 40597306
Thanks,

I was able to connect using just the name of my ODBC Driver.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question