View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
BEDE BEDE is offline
external usenet poster
 
Posts: 2
Default link to Perl/Java

I understand that you have to get the data from somekind of a database. To do that, you normaly need an OLEDB provider for that database, and, then, you'll use ADO to get the data through recordsets
For instance, I connect to Oracle databases from Excel, like belo

...
Dim cn As ADODB.Connectio
Set cn = New ADODB.Connectio
On Error Resume Nex
cn.Open "Provider=MSDAORA.1;Password=" & Conectform.f_passw.Value & ";User ID=" & Conectform.f_user.Value & ";Data Source=" & Conectform.f_source.Valu
If Err.Number < 0 The
MsgBox Err.Number & ": " & Err.Description, vbExclamation + vbOKOnly, "Eroare conectare baza de date!
On Error GoTo
Exit Su
End I
On Error GoTo

Dim adocmd As ADODB.Comman
Set adocmd = New ADODB.Comman
Set adocmd.ActiveConnection = c

Dim rst1 As ADODB.Recordse
Set rst1 = New ADODB.Recordse
Set rst1.ActiveConnection = c
...

What I use is a programatic solution that simply gets data from the database and puts the values in Excel sheets without having "links" that persist
Of course, besides the OLEDB provider, that came with MSOffice, I must have an Oracle client installed on the machine where I wish to run this macro

Or, having the same OLEDB Provider, you may get the data using MSQuery, without having to code that much, but that creates persistent "links" to the database

Something similary is for MSSQLServer databases (only you don't need anything like Oracle client installed
Depending on the kind of database you have to do with, there must be a way, but you have to get the info about your DB..

As for Perl or Java, those don't actually hold data (like a database), but simply access the database (or datafiles, provided there is not a DBMS), so you can't have "links" to those (like you may have links to other workbooks or databases