Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding tables to data environment

Status
Not open for further replies.

newapocalipsis

Programmer
Aug 10, 2001
48
0
0
MX
how can i add tables to data environment in running time, without changing all the rest to dataenvironment tables and its propertys. Golden Dragon Is Coming Soon...
 
At runtime, you open new tables the normal way:
[tt]
USE mytable IN 0
[/tt]
Just make sure you close these tables when the form closes or the data environment will not be able to release.

Ian
 
As chpicker stated you could just USE the table or :
1. Use the thisform.dataenvironment.addobject()
2. It's not pretty but you could also do it this way:
use FORM.SCX
INSERT INTO form1 (platform,uniqueid,class,baseclass,objectname,parent,properties) VALUES ;
("WINDOWS",SYS(2015),"cursor","cursor","cursor3",;
"dataenvironment","LEFT=150"+CHR(13)+"TOP=20";
+CHR(13)+"WIDTH=90"+CHR(13)+"HEIGHT=90"+CHR(13)+"ALIAS='mytable'"+CHR(13)+"Database = tcp2002.dbc";
+CHR(13)+'CursorSource = "driver"'+CHR(13)+'Name = "Cursor2"')
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top