Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataGrid
Message
De
01/12/2000 11:39:13
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
01/12/2000 11:26:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Divers
Thread ID:
00448103
Message ID:
00448117
Vues:
26
>Has anyone used the above ActiveX control, I just want to know how to bound it to one of my tables.
>
>Thanks
>Kev
lcTablePath = 'c:\mySamplesDir\testdata.dbc'
strCn =	[Data Provider = MSDASQL;]+;
  [DSN=Visual FoxPro Database;UID=;SourceDB=]+lcTablePath+[;]+;
  [SourceType=DBC;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;]+;
  [Deleted=Yes;]

oRecordset = CreateObject("adodb.recordset")
oConnection = CreateObject("adodb.connection")

With oConnection
  .Provider = "MSDataShape"
  .ConnectionString = strCn
  .Open
Endwith
With oRecordset
  .ActiveConnection = oConnection
  .Source = [ select * from customer order by company ]
  .Open
Endwith

With ThisForm.OleDataGrid
  .Datasource = oRecordset
  .RowDividerStyle = 4
  .Headlines = 4
  For ix = 0 to .Columns.Count-1
    With .Columns(ix)
      .Caption = .Caption + " Other lines of header"
      .DividerStyle = 4
    Endwith
  Endfor
  .Caption = "Customer Table"
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