Excel 2007 :: Connecting To Oracle Database By IP

Jun 14, 2012

I am running Excel 2007 and connecting to an Oracle DB.

I have created a VBA macro to connect to an oracle DB and retrieve data then place it in a table. The code works, but it uses DSN entries which are specific to my computer. I want to be able to distribute this Excel spreadsheet to others in my company and have them be able to click one button and update the data. I figure the most logical way is to connect to the DB using an IP address that should work for anyone on the intranet.

How do I modify the connection info below to have it connect via IP?

I tried "Data Source = 10.1.1.10orcl" and "Data Source = 10.1.1.10", both of which VBA dislikes.

Here is what I have now:

Code:
Sub Create()
Dim Servername As Range
Set Servername = ActiveWorkbook.Sheets("Summary").Range("B16")

Set StartDate = ActiveWorkbook.Sheets("Summary").Range("B3")

[Code] ..........

View 2 Replies


ADVERTISEMENT

Connecting To Oracle 10g Database Using VBA?

Aug 13, 2012

I need to connect to an Oracle 10g database using vba. Google has loads of snipets of code but I don't seem to be able to get it to quite work correctly.

This is what I have:

Code:
Sub ADOExcelSQLServer()
Dim Cn As ADODB.Connection
Dim Server_Name As String
Dim Database_Name As String
Dim User_ID As String
Dim Password As String
Dim SQLStr As String

[code]....

When the connection attempts to open (red code) I get the following error:

Run-time error '-2147467259 (80004005)':
[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed

My best guess is that I do not have the correct drivers installed... If this is the case which drivers do I need and where can you get them from?

View 1 Replies View Related

Excel 2007 :: Clicking Checkbox In Oracle Form Using VBA

Jun 7, 2012

One of my engaging tasks at work is to disable/enable general ledger accounts (accounting speak) in our Oracle ERP application using one of their forms.

In this case it would be a list of gl accounts and to the left of the gl account would be a check box that I can click.

Checked means enabled.
Blank would mean disabled.

If I have a list of currently enabled gl accounts that are to be disabled (unchecked) then I have to do so one by one. I can click with the mouse on the checkbox or I can using the keyboard use the space bar followed by the down arrow key and repeat. As fun as that sounds sometimes I'm faced with dozens or hundreds at a time.

Therefore my question is can I automate this using VBA? or any other tools out there.

Using Excel Office 2007, Oracle ERP (9.5.8) I think - it's old

View 1 Replies View Related

Import From An Oracle Database

Jan 17, 2008

I have a report that I import from an Oracle database.. My problem is "Sometimes" Column "L" is there and sometimes it isn't. It is a blank column that the system uses as some sort of place holder & I need to test if its there, then delete. See example below ...

View 20 Replies View Related

ODBC Connection To An Oracle Database

Nov 14, 2009

I am currently querying data from an Oracle database through MS Access and then passing it to Excel for the user to work. Not all users have MS Access so I would like to automate the data pull from Excel

Database information:

The DNS is: a150
The Tables are:

MFE.Items
MFE.Vendors

Sample SQL string would be:

View 2 Replies View Related

ODBC :: Importing External Data From An Oracle 9i Database

Mar 18, 2008

I'm having some issues importing external data from an Oracle 9i database.
Here is what is happening:

I am initially able to import data from the table I want to into Excel.
I do this through "Data -> Import External Data -> New Database Query" where I have my .ORA data source. I'm able to log in using my user and password and import the table. My problems come after I import this first set of data.

If I try to "Edit Query…" I get an error box that says "[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed".

If I try to "Refresh Data" I get two error boxes. The first is just: "[Microsoft][ODBC driver for Oracle][Oracle]" and the next says: "[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed". It then prompts me for the User name and password of the DB I'm connecting and after I enter the information, I get the same two error messages.

Also, if I attempt to establish another connection following the "Data -> Import External Data…" steps I run into a different problem. Upon entering the information for the User Name and password prompt I get two error messages. One says "!" and the next box says "Couldn't read this file". Once I click "OK" in those boxes, the Microsoft Query window automatically opens with nothing in it.

I can't seem to figure out why I can initially pull down data and then cannot succeed afterwards. I'm unable to connect to the DB I have through Excel until I completely closed all Microsoft Excel instances.

I also use this data source in Microsoft Access without any problems.

View 9 Replies View Related

Connecting To A Database Without The Local Machines Odbc

May 4, 2007

I'm working on a spreadsheet that will connect to a firebird DB (Programmed using VBA and ADO intially).. The spreadsheet itself will reside on a server in a shared folder..

When a user opens the file up, I'd like for the spreadsheet to use the servers ODBC connection, and not the client machine.. This way we don't have to install the Firebird ODBC driver on each client workstation..

View 9 Replies View Related

Excel 2007 :: Compare Two Database?

Jul 9, 2014

I got two sheets of database and I need to fill the gaps in one of then, taking the information for the other one, I been told that I can do it with vlookup or if function?

View 1 Replies View Related

Connecting Between VBA Excel And Web Site

Dec 7, 2009

I have a some problem with connecting between VBA Excel and web site.

I wrote a macro to insert the data from excel but there is one problem with displaying the correct view.

I use this site to get the price of the bonds:
[url]

it is the site of russian exchange

First of all I write the ISIN code, for example RU000A0E6X12, in the "Quote Search" field and then press Enter for getting the data. After it I can choose the History information or Online from the last field in the left margin. I want to chose "History" and after it the dates from and till are appearing automatically. The automatization of it is my task. And I have only one problem in the end.

The program:

View 9 Replies View Related

Connecting Outlook Through Excel Sheet

Apr 25, 2014

Due to one of our business requirement I have to fetch so many users Alias name through Outlook.

I am following below steps to achieve that Open new mail, giving user's name in to list, press ctrl+k, then right click properties. In properties I use to find alias name of user. I want to automate this process through excel sheet. I want to provide names in one column as Input to excel sheet and want to fetch alias name in next column of excel sheet.

View 1 Replies View Related

Excel 2013 :: Sorting And Connecting With Formula?

Jan 15, 2014

I have a list with different categories and several characteristics per category. My goal is to identify the 10 strongest growing characteristics (I guess by sorting them in descending order) and then show them in this order, but organized in the respective categories. e.g.: if "Psychographic">"Demographic" and "geographic" and "behavioralistic", then put "Psychographic, including its subordinated characteristics that are included in the top 10, first. Follow this order until all Top10 members are included.

View 2 Replies View Related

Creating Images Database Where Pics Are In Excel Database

Mar 31, 2004

I am currently trying to create a database of products for my company. For each product I would like to include an image associated with it. I then want to have on another sheet a place where the user will click an error and be able to cycle through the products. As tehy cycle the associated image will pop up.

What I need to understand is after importing the image into excel, how do I associate that image to a cell so I can reference it in another sheet of the database. I am not concerned with how large the database will get, my pictures are quite small.

View 4 Replies View Related

Connecting Excel To Access Queries - Named Ranges

Jan 11, 2014

So I have an excel workbook that is connected to an Access database I use. When the workbook opens, it refreshes the data from a couple queries in Access. However, every time it refreshes the data, it modifies several named ranges pulling from areas of those tables.

Example: $A$2:$A$50000 becomes $A$2:$A$50002 if there are two new lines entered into the table.

Because of this, some of the lookups and arrays I use are mismatching and giving errors. How to prevent the ranges from updating when the table refreshes?

View 3 Replies View Related

Query That Pulls Data From A 2007 Access Database

Nov 11, 2009

I need to create a new query that pulls data from a 2007 Access database into Excel 2007. When I invoke the 'From Microsoft Query' option after 'Data/From Other Sources', and then select 'MS Access Database*', the only file type presented is '*.mdb' . However, I need to pull from an '*.accdb' file type. I have both Office 2003 and Office 2007 installed.

View 8 Replies View Related

Excel 2013 :: Mail Merging From Excel Database To Outlook

Apr 15, 2014

Using EXcel 2013, Windows 8

I have an Excel worksheet with one column being e-mail addresses. Other columns are Christian names, etc

Ideally can I create a full Mail merge with Outlook using whatever data I want. But probably just e-mail address and Christian name?

Otherwise be able to send one e-mail to all the e-mail addresses, without a major re-type.

View 2 Replies View Related

Message Box In Oracle

Sep 30, 2006

I have a code which sends some keys to oracle and performs some actions. What I want is, I need to check a screen in Oracle and then continue or stop, based on the screen. So, I need a msgbox with a yes or no. Is it possible that a msgbox with yes/no be popped up on the screen or oracle? I understand that it can happen on excel screen.

View 2 Replies View Related

Open A Folder From Oracle

Aug 22, 2006

It says that she has to install excel when she tries to open a folder from oracle. I tried to associted to excel but it did not work.

View 2 Replies View Related

Formatting: Date Imported From Oracle

Dec 17, 2008

I'm generating a report on an oracle based software which then I export to Excel. Unfortunately the dates come out very messy. I've included an .xls file with the dates. They are untouched. As you can see, some are left aligned some right aligned. Nevertheless, all dates are of the format dd/mm/yyyy with zeros (0) automatically omitted - this is how they're shown on the Oracle report, I've changed nothing.

I want all the dates on column B to have the same format as the date on cell D3. Of course, the format must remain dd/mm/yyyy.

Please feel free to ask me questions if any of this is confusing.

View 8 Replies View Related

Macro To Pull Data From Oracle?

Nov 29, 2011

I Have a workbook which consists of 50 worksheets and i use Edit query window to pull the data from oracle on all these sheets. We run this once in a month. I have to go to every sheet and execute this code which is time consuming and i have to change the date value everytime. macro that can execute this process at once and we should give the date only once.I use OLEDB driver to connect to oracle.

Attached is the Command line code.

Select protocol, patient, Page, (date_indexed) Indexed,(first_entry_date) FirstPass,( second_entry_date) SecondPass,trim( modified_date) modified, trim(CRF_ERROR_COMMENT) Comments from JJA38377_96_crf where date_indexed>='1-May-11' and date_indexed

View 2 Replies View Related

Oracle Date/Time As A Parameter In MSQuery

Nov 7, 2002

I am attempting to use MSQuery to extract records from an Oracle transaction table by passing user defined Date/Time field parameters.

So if the date range for the query is for Fiscal Period 10 of this year, my parameters would be:
[StartDate] = #2002/10/1#
[EndDate] = #2002/11/1#

Daily transaction activity is in the early morning hours ending at 6:00AM so my Criteria is:
Between [StartDate] + .25 and [EndDate] + .25
Note: The +.25 represents 1/4day = 6hrs (6:00AM)

If I use the hardcoded Start/End Dates, my query works fine, but if I try and
pass the dates as parameters I get "ORA-00932 inconsistent datatypes" error. And I can't seem to pass the Date/Time combination successfully....

If anyone has encountered a solution for how to pass a Date/Time Paremeter into MSQuery I would love to hear how you did it.
I'm starting to pull my few remaining hairs out!

[ This Message was edited by: Tuner on 2002-11-07 12:23 ]

[ This Message was edited by: Tuner on 2002-11-07 12:28 ]

[ This Message was edited by: Tuner on 2002-11-12 12:51 ]

View 6 Replies View Related

Excel As A Database

Dec 31, 2009

Has anyone ever tried to make a database out of Excel? I know that Access would be a better choice, but i have never done anything in Access and have no clue where to start. i know Excel, but i'm worrying that i will end up having too much data and my program will be slow.

View 9 Replies View Related

Querying Data From Oracle Based On A Date(s) In Cell H1 (or H1 & H2).

Mar 19, 2008

I currently have an Excel file with the ODBC connection and using my own SQL. Doing it this way would require the super user to go into each sheet then to the SQL each time to change the dates. I know there is a way to allow them to simply change the dates in cells H1 (or H1 and H2) then refresh data and whoolaa it would be updated.

My goal if possible via this board and all the knowledge available would be to have a spreadsheet allowing a super user to change the date in Cells H1 and H1 & H2 on sheet Tst1 and have the data returned to sheets (Tst2, Tst3) based on my own SQL statements.

Here are some parameters that I think you might need to know.
(And as you may guess I do not have much VBA experience so if at all possible use my naming convention shown below. and feel free to write for a first grader.)

User Name (not actual): "UID"
Server (not actual): "DEV"
Password (not actual): "PWD"
File Name: Excel_ODBC.xls
Sheet Name: "Tst2"
"Tst3"
Output Cell: "A1" for both sheets.
Oracle table name: UAB .................

View 9 Replies View Related

Run SQL Queries In Excel Against Database Using Macro?

Jan 29, 2014

I have sql queries in spreadsheet column and which needs to run against Db2 database daily and then update the result back to spreadsheet. This is tedious process and could there be a way to create a a macro using VB which performs the following?

1. connect to db2 database

2. take the sql query one at a time from every row and then run against database

3. Obtain the result and then update it back to last column of the spreadsheet.

View 3 Replies View Related

Extract Data From EPR Database Into Excel

Dec 9, 2011

I'm tasked with looking up part numbers in Epicor's ERP database and entering the labor cost into excel. Is there any way to write a macro or VB program that lokks at the part number in excel, goes into epicor, pulls finds the part number and cut and pastes the cost data.

I have about 30,000 of these to look up.

View 1 Replies View Related

Close Access Database From Excel Using VBA

Jul 19, 2012

I have an access database that runs some excel subs. If the excel sub doesn't meet a certain criteria, I want to close the excel workbook and close the access database. Most google searches yield how to close excel from access but I need closing access from excel. I was thinking that if the "detonate" criteria was met, I could pass a variable over to access and terminate that way....

If x 5 then
thisworkbook.close
myaccess.accdb.close
end if

or

if x 5 then
appAccess.application.run "Self-Detonate"
thisworkbook.close
end if

View 1 Replies View Related

Using Excel As Database And To Create Quotations

Sep 19, 2013

My situation is as follows:

1. I have one sheet with all the information about my customers, such as customer name, address, mobile number and email. I have also added customer reference no...... this could act like a primary key in databases...... This is SHEET 1.

2. my other sheet, lets call it SHEET 2.... is basically a template of my quotation where at the top I need to enter the customer details such as customer name, address, mobile number and email.. Sometimes I have returning customers and I need to enter their details again and again.... it is time consuming.

Initially I would like to enter all my customers detail into SHEET 1.

When I have to create a quotation in SHEET 2, I would like to enter a customer reference number and it should bring all the data from SHEET 1 about that customer and place it into SHEET 2 (quotation template)...

View 3 Replies View Related

Use SQL To Connect An Excel Document To Database

Feb 26, 2007

Some time ago, a friend of mine told me he didn't use any Pivot Tables at all, due to the imense space they require.

Instead, he made connections between Forms in Excel and the Databases using SQL.

Do you know of any Internet site where I can start to learn something about this?

View 9 Replies View Related

How To Set Up And Store Information In Excel As A Database?

Oct 14, 2008

Are there any good website for a beginner on how to set up and store information in excel as a database? I have mutliple sheets that I use everyweek for payroll and I would like to store the previous weeks data in a seperate sheet so I dont have to save each weeks sheets.

View 9 Replies View Related

Importing Excel Data Into A Database

Jul 20, 2006

which databases people are using with importing excel data into a database.

I want to know people's experiences on different databases and suggestions on which database i can use maybe.

On this moment i do everything in excel, but excel is not longer working properly because of large files that need to be connected to 1 or more sheets.

This is the situation now:

VAX (Dos bases database) -> Comma seperated Files -> Importing in Excel -> Linking the data to sheets.
Now I want to have a database where i can do all normal operations to have a good look and the situation of stock status, ordered parts, sales etc. (inventory control)

Who has experiences with databases ? And what are you doing with that database?

View 3 Replies View Related

VBA Code To Prepare Database From Five Excel Files

Dec 16, 2013

I wantto prepare a database in excel. This is database of five different excel files.Consolidate them in one excel file under five sheets.

Thesefiles have name say A, B, C, D, E. Macro should ask user to browse these filesone by one and copy data in new excel under individual sheet. Finally databaseshould save as name X and should contain sheet 1 as A sheets 2 as B etc.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved