Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: GetTableNames Returns Nothing


This question is answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 4 - Last Post: Mar 6, 2017 8:42 AM Last Post By: Earl Staley
Earl Staley

Posts: 99
Registered: 4/9/07
GetTableNames Returns Nothing  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 5, 2017 3:21 PM
First, I did not post this in the Database section of the forum because there is no category for BDE.

My problem: I am trying to write a program to convert a lot of BDE Paradox databases to SQLite.

I thought I could do it with a single program but my C++ Berlin Professional does not support BDE Paradox databases and my C++ Builder 2010 does not support SQLite databases. So my current plan is to use C++ Builder 2010 to put the data into csv text files and then use C++ Berlin to load the data into the SQLite tables. Is there a better way that doesn't involve expensive upgrades to either of my compilers?

I am having trouble with my program to extract the table names from the Paradox databases. The GetTableNames funtion is not returning anything. Here is my code:

__fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) {
	TStringList *CurrentAliases;
	CurrentAliases = new TStringList;
	Session->GetAliasNames(CurrentAliases);
	ComboBoxAlias->Items = CurrentAliases;
	ComboBoxAlias->ItemIndex = -1;
	delete CurrentAliases;
}
 
// ---------------------------------------------------------------------------
void __fastcall TForm1::ComboBoxAliasChange(TObject *Sender) {
	Alias = ComboBoxAlias->Items->Strings[ComboBoxAlias->ItemIndex];
 
	// get path
	String sMaybeAlias, DBPath, str;
	TStringList *ParamList = new TStringList;
	if (Session->IsAlias(ComboBoxAlias->Items->Strings[ComboBoxAlias->ItemIndex])
	) {
		Session->GetAliasParams
		(ComboBoxAlias->Items->Strings[ComboBoxAlias->ItemIndex], ParamList);
		DBPath = ParamList->Values["PATH"];
		DBPathstr = DBPath;
		LabeledEditPath->Text = DBPathstr;
		delete ParamList;
 
		DataModule1->Database1->Close();
		DataModule1->Database1->Connected = false;
		DataModule1->Table1->DatabaseName = Alias;
		DataModule1->Database1->DatabaseName = Alias;
		DataModule1->Database1->Open();
		DataModule1->Database1->Connected = true;
 
                //>GetTableNames doesn't return anything here...
		DataModule1->Database1->GetTableNames(ListBoxTableNames->Items, true);
	}
 
}


Why doesn't GetTableNames return any values?

Thank You...
Earl Staley
Jeff Overcash (...

Posts: 1,529
Registered: 9/23/99
Re: GetTableNames Returns Nothing
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 5, 2017 7:03 PM   in response to: Earl Staley in response to: Earl Staley
Earl Staley wrote:
First, I did not post this in the Database section of the forum because there is no category for BDE.

My problem: I am trying to write a program to convert a lot of BDE Paradox databases to SQLite.

I thought I could do it with a single program but my C++ Berlin Professional does not support BDE Paradox databases and my C++ Builder 2010 does not support SQLite databases. So my current plan is to use C++ Builder 2010 to put the data into csv text files and then use C++ Berlin to load the data into the SQLite tables. Is there a better way that doesn't involve expensive upgrades to either of my compilers?

Install the BDE into Berlin.

http://cc.embarcadero.com/item/30522

Realize the BDE was deprecated nearly 15 years ago and the reason why it is no
longer part of the product by default is support is being pulled. Moving off
the BDE should have been done a decade ago.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)
Jan Dijkstra

Posts: 206
Registered: 11/4/99
Re: GetTableNames Returns Nothing  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 6, 2017 2:49 AM   in response to: Jeff Overcash (... in response to: Jeff Overcash (...
Jeff Overcash (TeamB) wrote:
Earl Staley wrote:
First, I did not post this in the Database section of the forum because there is no category for BDE.

My problem: I am trying to write a program to convert a lot of BDE Paradox databases to SQLite.

I thought I could do it with a single program but my C++ Berlin Professional does not support BDE Paradox databases and my C++ Builder 2010 does not support SQLite databases. So my current plan is to use C++ Builder 2010 to put the data into csv text files and then use C++ Berlin to load the data into the SQLite tables. Is there a better way that doesn't involve expensive upgrades to either of my compilers?

Install the BDE into Berlin.

http://cc.embarcadero.com/item/30522

Realize the BDE was deprecated nearly 15 years ago and the reason why it is no
longer part of the product by default is support is being pulled. Moving off
the BDE should have been done a decade ago.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)

Further realise that using the BDE to support DBase or Paradox tables comes at no additional cost to the customer who buys an application using the BDE. While implementing a replacement database not using the BDE would saddle the customer with additional costs, in the form of purchasing a (SQL) database server + client access licenses. Which, for existing customers, will be unacceptable.

Only now, with FireDAC, and drivers for SQLlite, MySQL or PostGress, has this problem gone away.

That's why you now see multiple users (myself included) busy with migration projects from BDE to something else.
Earl Staley

Posts: 99
Registered: 4/9/07
Re: GetTableNames Returns Nothing  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 6, 2017 5:03 AM   in response to: Jan Dijkstra in response to: Jan Dijkstra
Install the BDE into Berlin.

http://cc.embarcadero.com/item/30522

Thank you Jeff for the link. I didn't know I could add the BDE to Berlin.

Further realise that using the BDE to support DBase or Paradox tables comes at no additional cost to the customer who buys an application using the BDE. While implementing a replacement database not using the BDE would saddle the customer with additional costs, in the form of purchasing a (SQL) database server + client access licenses. Which, for existing customers, will be unacceptable.

Only now, with FireDAC, and drivers for SQLlite, MySQL or PostGress, has this problem gone away.

That's why you now see multiple users (myself included) busy with migration projects from BDE to something else.

Jan,

That is the main reason I did not convert the Paradox tables sooner. My programs are written for family use and for our church. I did not want to spend extra money buying licenses.

I still would like to know why GetTableNames did not return any table names.

Earl
Earl Staley

Posts: 99
Registered: 4/9/07
Re: GetTableNames Returns Nothing  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 6, 2017 8:42 AM   in response to: Earl Staley in response to: Earl Staley
Earl Staley wrote:
I still would like to know why GetTableNames did not return any table names.

The identical GetTableNames code with Berlin returned the table names, whereas no table names were returned with C++ Builder 2010. I have no idea why, but I am moving on with the program.

Thanks all of you for your help.

Earl Staley
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02