Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Toms
  Where is Toms?
 
 Hong Kong
 Toms
 To: Ken Blum
  Where is Ken Blum?
 Chicago
 Illinois - United States
 Ken Blum
 Tags
Subject: RE: Connections
Thread ID: 33294 Message ID: 34240 # Views: 5 # Ratings: 0
Version: Visual FoxPro 8 Category: Databases, Tables and SQL Server
Date: Thursday, December 11, 2003 2:12:35 AM         
   


I don't know is that what you need.

My company is using VFP 6.0 and SQL2000.
We have a program that need to retrieve data N update data cross two different database but under the same server.
Our primary database is DB01 while the DB02 is the second database.
In some programs, we need to retrieve data from the DB02 N update data to DB02.
The database container is pointing to DB01, and in order to access the data in DB02, we need to create views in DB01 using DB02 tables in SQL2000 query analyer.
********************************************************
*!* Here is the examples(my position now is in Query Analyer)
use DB01
go

create view test
as
select field1, field2, field3 from DB02.dbo.testing
*******************************************************
after you create the view 'test' in DB01 in SQL2000 server, you can use the SELECT command to view the result of 'test' in database DB01.

if everything is ok, your next step is go to VFP and you can start to create a remote view pointing to the SQL view your created using current database connection.

The view your created in SQL2000 can INSERT, UPDATE, DELETE and SELECT.

Hope this help.

Toms
> > > > > > I have 2 databases DB1 and DB2 written in VFP8
> > > > > > On DB1 is code written on the database events "OPENDATA"
> > > > > >
> > > > > > I want to create a connection from DB2 to DB1
> > > > > > I receive the following message > Connectivity error: [Microsoft][ODBC Visual Foxpro driver]FIle was created in a later version of Visual Foxpro than the current version
> > > > > >
> > > > > > When I disable the database events on DB1 the connection is working fine
> > > > > >
> > > > > > I have Downloaded from MSDN the latest ODBC driver called VFPOLEDB.dll and installed in C:\Program Files\Common Files\System\Ole DB
> > > > > >
> > > > > > Who can help ????
> > > > > >
> > > > > WHat do you want to achieve? maybe you don't need a connection through OLEdB!
> > > > >
> > > > > Boudewijn LutgeĀ®ink
> > > > > Boudewijn.Lutgerink@foxite.com
> > > > > A positive attitude may not solve all your problems, but it will annoy enough people to make it worth the effort.
> > > > > Herm Albright (1876 - 1944)
> > > >
> > > > DB 1 is an employement /timeregistration database (User are logged in bij a card Reader)
> > > > DB 2 is a task provider database
> > > > So I want to create a view of Logged in user's and make it Visible in DB2 so that they can see all the task's
> > > >
> > > >
> > > I guess that there is some field that can connect the two tables (logged and tasks in their respective DBC's).
> > > What you can do is set a relation by hand between the two tables even though they are in different DBC's.
> > > Use the "set relation to" command.
> > >
> > >
> > > Boudewijn LutgeĀ®ink
> > > Boudewijn.Lutgerink@foxite.com
> > > The music, played at a wedding, reminds me every time to music played when soldiers march to the frontier... (Heinrich Heine)
> >
> > Boudewijn,
> > The promlem lies in the fact that I could not connect to DB1, I do not want to open the datyabase, but use a view from DB1
> > When I have the view from DB1, I know that I can use Set relation to, but the error comes when I tray to make a connection to DB1
> >
> >
> That's impossible. A view does not contain any data. It's just a SQL-Select statement. So, you must be able to connect to the datasource in order to use a view. Your view could contain an ODBC connection to the second database.
>
> KTB


ENTIRE THREAD

Connections Posted by Peter Kooten @ 11/24/2003 10:28:17 AM
RE: Connections Posted by Boudewijn Lutgerink @ 11/24/2003 10:46:57 AM
RE: Connections Posted by Peter Kooten @ 11/24/2003 2:16:51 PM
RE: Connections Posted by Boudewijn Lutgerink @ 11/27/2003 2:04:14 PM
RE: Connections Posted by Peter van Kooten @ 12/10/2003 3:28:53 PM
RE: Connections Posted by Ken Blum @ 12/10/2003 3:47:31 PM
RE: Connections Posted by Toms @ 12/11/2003 2:12:35 AM
RE: Connections Posted by Boudewijn Lutgerink @ 12/11/2003 8:12:28 AM