forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


More than one table in VDSDB?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Wed Mar 12, 2003 3:16 pm    Post subject: More than one table in VDSDB? Reply with quote

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
View user's profile Send private message
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Wed Mar 12, 2003 7:30 pm    Post subject: Follow-up Reply with quote

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
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Wed Mar 12, 2003 7:38 pm    Post subject: Reply with quote

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 Smile

_________________
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
View user's profile Send private message Send e-mail
arcray
Valued Contributor
Valued Contributor


Joined: 13 Jul 2001
Posts: 242
Location: Aude, France

PostPosted: Thu Mar 13, 2003 10:16 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Thu Mar 13, 2003 9:50 pm    Post subject: more than one table Reply with quote

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
View user's profile Send private message
nick
Contributor
Contributor


Joined: 15 Aug 2000
Posts: 50
Location: hamburg,nj

PostPosted: Fri Mar 14, 2003 9:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group