| View previous topic :: View next topic |
| Author |
Message |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Wed Mar 12, 2003 3:16 pm Post subject: More than one table in VDSDB? |
|
|
I am trying to learn to use some of the database functionality of VDSDB.dll. I would like to use it to begin using an ODBC-compliant database such as Advantage Database Server or CodeBase. These can use my existing clipper/foxpro-style data tables without requiring too many changes.
I understand the basics of SQL. My question is this:
The VDSDB help file shows how to connect to a single table with ODBC. How can I connect to 2 or more tables if I need to do a JOIN to pull data from 2 tables with one query? (Also so I don't have to disconnect and reconnect constantly.)
Can I just use multiple 'DLL DB, Connect' lines, and all those tables will then be open and "query-able"? And will that accept a query on 2 tables at once?
Any help is appreciated. |
|
| Back to top |
|
 |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Wed Mar 12, 2003 7:30 pm Post subject: Follow-up |
|
|
One other part of my question above: These two databases (CodeBase and Advantage Database Server) have activeX components and .DLLs also that I guess you could use through Visual Basic to access the data, bypassing ODBC.
I don't know much about this. Is there a way in VDS to use those forms of access to these databases, bypassing ODBC? I didn't think so but I thought I would ask.
Also, maybe I should be posting this in a different folder ... |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Mar 12, 2003 7:38 pm Post subject: |
|
|
It's in the right place - but apparently no one with the proper
experience has seen it yet. I'm sure someone will answer ya
soon.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
arcray Valued Contributor


Joined: 13 Jul 2001 Posts: 242 Location: Aude, France
|
Posted: Thu Mar 13, 2003 10:16 am Post subject: |
|
|
You can have more than one table in a connected database! It depends on the database. I have an access mdb file that contains ten tables on which I can run multi-table queries on through the one vdsdb connection.
In my experience I have found that only one connection is possible using vdsdb, but you can query other databases with little applets that run outside your current application.
i.e. RUNH gethouseno.exe postcode,WAIT from your current application will run a tiny VDS exe that queries another database and passes the results back... _________________ Andrew GRAY
If you don't know I am looking for work, I won't get the job.
andrewrcgray.com |
|
| Back to top |
|
 |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Thu Mar 13, 2003 9:50 pm Post subject: more than one table |
|
|
Thanks for the reply, Andy.
I have not used ODBC very much. It sounds like you can set up an ODBC connection to an Access database that contains several tables within it. But as far as I've been able to tell, dBase ODBC connections are set up to individual .dbf tables, so one connection = one table.
If I am wrong, someone please let me know.
Thanks again. |
|
| Back to top |
|
 |
nick Contributor

Joined: 15 Aug 2000 Posts: 50 Location: hamburg,nj
|
Posted: Fri Mar 14, 2003 9:18 pm Post subject: |
|
|
Hi:
I would think you should be able to access data from different tables in the same database using the DLL DB, QUERY, command.
Example (simple join):
Select Employee_Table.Emp_Id, Employee_Pay_Table.Salary FROM
Employee_Table, Employee_Pay_Table
WHERE Employee_Table.Emp.Id=Employee_Pay_Table.Emp_Id;
The results would give you records listing all the Employee IDs and their Salary (If i didn't make a mistake).
Have you tried this yet?
Let me know if I can help you any further.
Nick |
|
| Back to top |
|
 |
|