connecting to jbase from excel spreadsheet

433 views
Skip to first unread message

ppna...@gmail.com

unread,
Oct 24, 2008, 8:51:58 PM10/24/08
to jBASE
Hi, I would want to connect to the jbase database from my excel
application and read data, any suggestions will be appreciated. thanx

Simon Verona

unread,
Oct 25, 2008, 6:05:36 AM10/25/08
to jB...@googlegroups.com
You need to investigate either objex or jrcs - both of which can be used
with vbscript to connect using Excel...

HTH
Simon

Simon Verona.vcf

NADEEM PERVAIZ

unread,
Oct 25, 2008, 6:11:51 AM10/25/08
to jB...@googlegroups.com
haye dear,
there's no way to connect your database(whether jbase or oracle or anyone) because every database is secured with some username & passwords & their rights are defined in managment area, to login there you must need some database managing software. there's only one thing possible that you can fetch ur data from your desired table in your database into an excel file, if you are planning to connect & ammend ur database with your excel file its not poosible. because excel is a spread sheet & database is a database.. ok dun ask such a silly questions..or if there's an embiguity make it clear...Bu Bye

 
On 10/25/08, ppna...@gmail.com <ppna...@gmail.com> wrote:

Hi, I would want to connect to the jbase database from my excel
application and read data, any suggestions will be appreciated. thanx


--
Regards

Nadeem Pervaiz
Jr. T24 Trainer
NDC-TA Lahore

Tony G

unread,
Oct 25, 2008, 12:17:32 AM10/25/08
to jB...@googlegroups.com
> From: ppnartey

> Hi, I would want to connect to the jbase database from
> my excel application and read data, any suggestions
> will be appreciated. thanx

I discuss the topic of Excel-to-MV (jBASE) in my blog here:
removeNebula-RnD.com/blog/tech/2007/11/excel-to-mv1.html
(remove the text 'remove')
There you will find code so that you can do this on your own,
without buying anything new.

If you want something more in product form and supported, rather
than a do-it-yourself project, email me about NebulaXChange. On
that blog page you'll also see a reference to NebulaXLite which
allows you to generate Excel documents (OpenOffice and Google
docs too) from BASIC in jBASE. NebulaXLite is completely free for
developers. Follow the links to download NebulaXLite for
jBASE/Win32. A port will be done for Linux, AIX, and other
platforms as required.

HTH
Tony Gravagno
Nebula Research and Development
TG@ remove.pleaseNebula-RnD.com
Nebula R&D sells mv.NET and other Pick/MultiValue products
worldwide,
and provides related development and training services
remove.pleaseNebula-RnD.com/forum

Brad Burleson

unread,
Oct 25, 2008, 4:19:18 PM10/25/08
to jB...@googlegroups.com
I'd suspect that if the OP has an Enterprise license, this is the exact problem that jDP was designed to solve:  Allow users to pull jBASE data into an application such as Excel, Access, or another ODBC-enabled application.

Let me know if you'd like more details.

Hope this helps,

Brad.

Rick Weiser

unread,
Oct 25, 2008, 6:28:33 PM10/25/08
to jBASE
This is not correct. I have used jBASE OBjEX to pull data from the
jBASE in many applications. You can also use jRCS. No matter which
you use, you will need to include the reference in the VBA section of
Excel. Then start the connection object and away you go. If you want
me to post an example, then please let me know.

Rick

On Oct 25, 6:11 am, "NADEEM PERVAIZ" <ndcnad...@gmail.com> wrote:
> haye dear,
> there's no way to connect your database(whether jbase or oracle or anyone)
> because every database is secured with some username & passwords & their
> rights are defined in managment area, to login there you must need some
> database managing software. there's only one thing possible that you can
> fetch ur data from your desired table in your database into an excel file,
> if you are planning to connect & ammend ur database with your excel file its
> not poosible. because excel is a spread sheet & database is a database.. ok
> dun ask such a silly questions..or if there's an embiguity make it
> clear...Bu Bye
>

Richard Kann

unread,
Oct 25, 2008, 8:53:19 PM10/25/08
to jB...@googlegroups.com
Assuming you are talking 3.x or 4.x that would be a ODBC program called
JDP. It allows you to connect to the Jbase database and pull data out
using excel's import from database wizard.

I am not sure of the going price of Jdp so you will need to talk to your
dealer if you d not already have it.

Richard Kann

Lumi, Marin

unread,
Oct 25, 2008, 7:25:00 PM10/25/08
to jB...@googlegroups.com
Rick,

I would be interested in an example.

Thank you,

Lumi Marin
Omega Electronics Inc
(416)667 -9909

Rick Weiser

Rick Weiser

unread,
Oct 26, 2008, 10:50:32 AM10/26/08
to jBASE
Lumi,

Here you go. This example is for OBjEX but can easily be adapted to
jRCS. It assumes that OBjEX is installed on the client PC and that
the files are local but the files can be located on another server.

Dim jb As jBase
Dim jc As jConnection

Dim NamesFile As jEDI

Dim Rec As jDynArray
Dim SelectError As jDynArray

Dim sList As jSelectList

Dim Sel, Path, Name, CSV, Addr
Dim xRow As Integer
Dim xCol As Integer
Dim DisplayIDs As Boolean

Set jb = New jBase
Set jc = New jConnection

Path = "D:\Accounts\Lists\Names"
On Error Resume Next
Set NamesFile = jc.Open(Path)
If Error <> "" Then
MsgBox Error
End
Exit Sub
End If

Sel = "SELECT " & Path & " BY LastName"
jc.Execute Sel, 0, SelectError, Junk, sList
If SelectError.Extract(1, 1) = 401 Then
MsgBox "No Names where selected to print", vbOKOnly +
vbCritical
DoEvents
End
Exit Sub
End If

xRow = 1
xCol = 1

Cells.Select
Selection.Delete Shift:=xlUp

Do
Err.Clear
ID = sList.ReadNext
If Err = OBJEX_E_NO_MORE_RECORDS Then Exit Do

Err.Clear
Set Rec = NamesFile.Read(ID)
If Error <> "" Then
MsgBox Error & vbCrLf & "Record skipped", vbCritical
GoTo NextId
End If

If Rec.Extract(11) = "1" Then
GoTo NextId
End If

Name = ""
Select Case Rec.Extract(3)
Case 0
Name = "Mr. "
Case 1
Name = "Ms. "
Case 2
Name = "Mr. & Mrs. "
Case 4
Name = "Mrs. "
Case 5
Name = "Dr. & Mrs. "
Case 6
Name = "Dr. "
End Select

Name = Name & Rec.Extract(2) & " " & Rec.Extract(1)

Cells(xRow, 1) = ID
Cells(xRow, 2) = Name

Addr = Rec.Extract(4)
If Rec.Extract(5) <> "" Then
Addr = Addr & vbLf & Rec.Extract(5)
End If

Addr = Replace(Addr, "^", vbLf)

Cells(xRow, 3) = Addr
Cells(xRow, 4) = Rec.Extract(6) & ", " & Rec.Extract(7) & " "
& Rec.Extract(8)

xRow = xRow + 1
NextId:
Loop

I hope this helps,

Rick

John Watson

unread,
Oct 26, 2008, 4:45:25 AM10/26/08
to jBASE
Hi,

Not sure if you are a T24 user or not; if so the Desktop product
offers a DDE link.

Check the desktop/samples/xlink folder in your desktop installation
directory - there is a VB and an excel sample.

Cheers,

John.

Lumi Marin

unread,
Oct 28, 2008, 7:27:07 AM10/28/08
to jB...@googlegroups.com
Rick,

Thank you.

Lumi

Reply all
Reply to author
Forward
0 new messages