Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Display
Message
From
01/04/2004 05:22:47
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
01/04/2004 05:10:39
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00891373
Message ID:
00891401
Views:
27
>hi ,
>i did not useto wizard when i make my form,
>
>so if you can sent sample code

I didn't mean form wizard, query wizard. Select from menu 'Tools\Wizards\Query wizard' then choose the one that fits your case.

Here is a little sample showing fields from customer, orders, orditems, products and employee :
Public oForm
oForm = Createobject('myForm')
m.oForm.Show

Define Class myForm As Form
  DataSession=2
  Add Object testgrid As Grid

  Procedure TestGrid.Init
  With This
    .RecordSourceType = 4
    .RecordSource = ;
    'Select c.cust_id, c.company,'+ ;
      '  o.order_id, o.order_date,'+ ;
      '  e.First_Name-(" "+e.Last_Name) As Employee,'+ ;
      '  oi.line_no, p.prod_name,'+;
      '  oi.unit_price, oi.quantity'+;
      '  FROM  testdata!customer c'+ ;
      '  INNER Join testdata!orders o  ON  c.cust_id = o.cust_id'+ ;
      '  INNER Join testdata!Employee e ON  o.emp_id = e.emp_id'+ ;
      '  INNER Join testdata!orditems oi ON  o.order_id = oi.order_id'+ ;
      '  INNER Join testdata!products p ON  oi.product_id = p.product_id'+ ;
      '  order By c.cust_id,o.order_id,oi.line_no'+ ;
      '  into cursor crsGrid'
  Endwith
Endproc
Enddefine
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform