Excel download and update records to oracle

folks

i would like to be able to download data from Oracle into excel via jcdb extract but thereafer be able to writeback to oracle with webservices, any clues where I can obtain this information?

thanks in advance
rutgermonsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Steven HarrisPresidentCommented:
See if the attached Oracle Fusion PDF will help any.

Reference 3-19 (aka pg, 43)

If you are looking into a VBA route, you will need Oracle Objects for OLE (OO4O), which can be used from Visual Basic, Visual C++, VBA in Excel, Active Server Pages, etc.

Than you could use VBA such as:

Sub uploadListOfItems()
'Oracle connection variables
Dim dbUserName As String
Dim dbPassword As String
dbUserName = "ORACLE_USERNAME"
dbPassword = "ORACLE_PASSWORD"

Dim dbDSN As String
dbDSN = "MY_TNS_ALIAS"

'Create and Set Session / Create Dynaset = Column Names
Dim OraSession As Object
Set OraSession = CreateObject("OracleInProcServer.XOraSession")

Dim OraDatabase As Object
Set OraDatabase = OraSession.OpenDatabase("" & dbDSN & "", "" & dbUserName & " / " & dbPassword & "", 0&)

Dim Oradynaset As Object
Set Oradynaset = OraDatabase.DBCreateDynaset("SELECT * FROM MY_ORACLE_TABLE", 0&)

'Upload data variables
Dim site As String
Dim item As String

'Initialize upload
ActiveSheet.Activate
Range("A2").Select
order_id = 1

'Iterate through each cell and upload to MY_ORACLE_TABLE
Do Until Selection.Value = ""
site = ActiveCell.Value
item = ActiveCell.Offset(0, 1).Value

'Add new record
Oradynaset.AddNew
Oradynaset.Fields("USERNAME").Value = Application.UserName
Oradynaset.Fields("SITE").Value = site
Oradynaset.Fields("ITEM").Value = item
Oradynaset.Update

Selection.Offset(1, 0).Select

order_id = order_id + 1
Loop
End Sub

Open in new window

e18862.pdf
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Alexander Eßer [Alex140181]Software DeveloperCommented:
@ThinkSpaceSolutions:
Why so complicated?! Just use ADODB, as shown here: http://www.vb6.us/tutorials/oracle-and-visual-basic-using-ado
0
Steven HarrisPresidentCommented:
@Alex:
Never used it myself...  No since steering him toward something I have no experience with and therefore could not help him with if he ran into more questions.
0
rutgermonsAuthor Commented:
works for me
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.