Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataGrid
Message
From
01/12/2000 11:39:13
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
01/12/2000 11:26:24
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Miscellaneous
Thread ID:
00448103
Message ID:
00448117
Views:
25
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform