Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programmatically add a table to data environment
Message
From
04/06/2001 09:20:37
Fida Shamsoodeen
Combined Systems (Pty) Ltd
Centurion, South Africa
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00514484
Message ID:
00514515
Views:
11
Hi Mark...

Maybe I have asked my question incorrectly. Let me try again.

I have two tables in my DE namely ASSETS and TSAMP.
TSAMP is a table with 2 fields only : Asset_No and Contents.
I have a form where i have a Text Box (5 chars)
Assume the user types in T0001, I search the assets file for T0001. If it does not exist, I copy the TSAMP.DBF to T0001.DBF including the indexes.

Then next on the form I have a grid which should NOW use T0001 as the datasource and the two fields as columns on the grid. At the same time I wish to add records to T0001 directly from the grid.

Any suggestions?
Thanks in advance
Fida



>>Hi to All
>>
>>Can anyone please help with this...
>>
>>I want to copy structure A's table to B.
>>Then I want to programmatically add table B to the DataEnvironment.
>>Then i would like to make the RecordSource the table B and the RecordSourceType the Alias of B.
>>
>>Thanks in Advance
>>
>>Fida
>
>In a method of your DE, probably Init, you need to add a cursor object: This.AddObject("CursorNameHere", "Cursor")
>
>Then you can specify properties:
>with This.CursorNameHere
>   .CursorSource = "Talble_or_View_Name"
>   .Database = "MyDBC"
>   .Alias = "SomeAlias"
>   .Order = "LastName"
>   .BufferModeOverride = 5
>   .Exclusive = .F.
>endwith
Wannabe FoxPert!!!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform