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

Dear Delphi lovers, I've been used

Status
Not open for further replies.

yomyom

Programmer
Dec 23, 2002
119
GB
Dear Delphi lovers,
I've been used to using paradox tables and I'm now trying to use interbase / sql to create my tables and database.
However, unlike with paradox tables where you use DBDesktop to create a table and use a TTable component to access the contents of a table(with the dbgrid ofcourse); I cannot seem to get the tables I created in interbase.
Specifically, I've located the database I created => c:\sqltest\test1.gdb.
I dropped a database component on the form and pointed to test1.gdb.
But now I'm stuck because when I dropped a TQuery component, I could not issue the right sql line to open the table named "yomi" contained in the "c:\sqltest\test1" Database. I tried with a TTable component also and failed.
Can anyone please show me how its done, step by step. The help files are either inadequate or I'm too impatient.
Thanks for your help in advance!!!!!
p.s sorry its long winded, I want the rigth help.
yom yom.
 
hi
do the following:
create a dataModule and go to the interbase page
in the pallete choose IBDatabase and insert it in the dataModule form and set its databasename property
to c:\sqlTest\test1.gdb and sqlDialect to 3
and drop an ibtransaction component into the datamodule
form and set the ibdatabase default transaction property
to your ibtransaction object.
then each time you want to use a table in your database
drop an ibtable into the datamodule and set its property databse to the name of your database(example IBDATABSE1)and
go to the table name property to choose the name of your
table from the list that will be displayed.
 
Seems strange and different from my old paradox stuff, but I thank you for your response and will get back to this thread to let u know how I'm getting along.
Thanks....
yomyom.
 
Did you set up the alias in the BDE?
If yes you could use the sql-explorer to find out what is wrong with your table.
If the alias is working (and your tdatabase connected) you should either see your tables or be able to use the build in graphical SQL editor.

Maybe you find something useful in:
How to use Look Up fields with Tables /Queries
faq102-1212 Steven van Els
SAvanEls@cq-link.sr
 
The difference with Paradox and Interbase is that Paradox uses the BDE (Borladn Database Engine) and Interbase uses InterbaseServer and IBConsole to communicate with the database.

Make sure your Interbase Service is properly installed and is running local or on a external pc. Create a connection to your database using IBConsole.

Now you can access your table through ODBC and use the standard TTable or by using Interbase components that ship with Delphi that talk to the database directly(much faster).
These components are e.a. IBTable, IBTransaction.

There is a good help file on the delphi cd in the Interbase directory that explains everything or you can download a manual on the internet.

Good luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top