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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Borland Data Base locking up. when using CreateTable

Status
Not open for further replies.

MasterDwayne

Programmer
Mar 13, 2003
1
US
If following conditions occure, your computer will lock up:

1. TableName has a valid file assigned to it.
2. Active is Set to False

AND you have the following Code:

Line1: Table1->Active=false;
Line2: Table1->CreateTable();
Line3: Table1->Active=true;

BCB5 locks up on Line2, and you may have to do a complete reboot.

Line1 is your real problem, Not Line2 as the compiler
notifies you.


Change Line 1 to the following:
if(Table1->Active==true)Table1->Active=false;

Dwayne
 
I don't know what exactly you wanna do, so I hope this code help you
Table1->DatabaseName = "AliasName";
Table1->TableName = "TableName";
Table1->TableType = ttParadox;
//define the fields
Table1->FieldDefs->Add("Field_Key", ftString, 10, true);
Table1->FieldDefs->Add("Name", ftString, 10, true);
...
TIndexOptions Options;
Options << ixPrimary << ixUnique;
Table1->CreateTable();
Table1->Open();
 
if you have run into a problem with testing
a database app It will sometimes screw up
all the following builds. there may not be
any errors in the code afterward but I have run
into a problem were I have corrected a problem
but the bde has been so messed up by the
previous runs that I am forced to reboot
regardless.

tomcruz.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top