[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Joining 2 dbase databases using SQL

Posted on 1998-07-10
3
Medium Priority
?
201 Views
Last Modified: 2013-11-24
Can anyone tell me how to do this properly?  I have 2 dbase databases in the same directory.  I want to use SQL to join them on a common field.  The following code works fine if I use it on 2 tables in a microsoft access database, but won't work with dbase databases

dim db as Database
dim Rs as recordset
dim SQL as String

SQL = "Select * from one, two where one.id = two.id"
set db = openDatabase("C:\directory",true, true,"dbase IV")
Set rs = db.openRecordSet(SQL,dbOPenDynaSet)

'This code assumes one and two are two dbase databases stored in the same directory.

Anyone know how to do this?
0
Comment
Question by:ssteeves
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
cymbolic earned 100 total points
ID: 1465454
If not there already, try creating an index on the fields to be joined.  In some cases, I have had to import the dbf's into access, create appropriate indexes in both tables, then perform the join on the imported tables.  One of the problems in using .dbf files in Access is its own weakness when multifield indicies are used, particularly when they consist of large character fields.  Another problem is that .dbf fields are often loosely or inappropriately typed, such as when the developer uses a text field to store dates, rather than using a Date type field, etc.
0
 
LVL 1

Author Comment

by:ssteeves
ID: 1465455
That didn't seem to solve the problem.  We don't want to have the databases in Access.  Once we import them and create an index, we can't export them back to dBase again.

However, we have decided not to worry about this problem, so we are no longer looking for an answer.  Thanks anyway for your help.
0
 
LVL 1

Author Comment

by:ssteeves
ID: 1465456
I figured out the problem.  It was kind of annoying, but our dbase databases started with a numeric character, and the program didn't like it.   Thanks for your help anyway.

Anyone know how to delete a question without giving out the points?
0

Featured Post

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

656 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