Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SHAPE and ADO from VFP
Message
De
13/12/1999 10:25:07
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00302702
Message ID:
00302725
Vues:
19
>Hi:
>
>I'm working with Fox (frontend) to .dbf by ADO with ODBC VFP Driver.
>
>The Q194156 have a SHAPE sample with Fox and SQL Server... and run well.
>
>But the same sample with dbf tables not run...!
>
>The SHAPE command run with the VFP ODBC Driver?
>
>Best,
>
>Alberto Rodriguez
>Spain


Yes it works. Below is a sample using VFP testdata.dbc :
#define TESTDATALOC C:\ddrive\TEMP\testdata.DBC

strCn =	[Provider=MSDataShape.1;Persist Security Info=False;]+;
	[Data Source="Data Provider = MSDASQL;]+;
	[DSN=Visual FoxPro Database;UID=;SourceDB=TESTDATALOC;]+;
	[SourceType=DBC;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;]+;
	[Deleted=Yes;";Data Provider=MSDASQL ]

strShp = [SHAPE { select Company, cust_id from customer } ]+;
	[APPEND (( SHAPE { select distinct First_name, Last_name, a.emp_id + cust_id as "Emp_sel", cust_id  from employee a inner join orders b on a.emp_id = b.emp_id }  ]+;
	[APPEND (( SHAPE { select order_date, order_net, shipped_on, emp_id + cust_id as "Emp_sel",order_id from orders }  ]+;
	[APPEND ( { select order_id, line_no, prod_name from orditems inner join products on products.product_id = orditems.product_id } AS rsOrditems  ]+;
	[RELATE order_id TO order_id )) AS rsCustomers ]+;
	[RELATE emp_sel TO emp_sel )) AS rsOrders  ]+;
	[RELATE cust_id TO cust_id ) ]
				
with this
	.CommandType = 1
	.ConnectionString = strCn
	.RecordSource = strShp
endwith
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform