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!

TableType in Object Inspector

Status
Not open for further replies.

pingLeeQuan

Programmer
Jul 3, 2002
45
US
The program that I was working on used Paradox as the database. I changed the database to mysql and ported the data to it.

The problem that i am having is the "TableType" Field in the object inspector. It still says Paradox. The only options that i have are DBase, FoxPro, Paradox, ASCII and default.

How can i change the table type to say MySql.

P.S. The program works (kind of). I am in the process of porting the code to correspond to MySql processing.

Any Ideas?
thanks in advance
--quan

 
Hi there.

Its not as simple to connect a MySQL database to a TTable as its with DBase or Paradox.

You will need to install an OBDC link,

or use the API they provide

If you are using BCB6 you can use DBExpress

A quote from another reply,
[author=Mr. Vassiliev V.V.]
assume you are using ADO Express (or dbExpress as it is named in BCB6) and
MySQL is on your computer.

1. Create new project.
2. Drop TADOConnection on main form.
3. Press "ConnectionString button" (...).
4. Press "Build".
5. Choose "MySQL.OLEDB Provider". Press "Next"
6. Set Data Source to "test".
7. Press Check Connection - it should be successfull.
8. Press OK.
9. Set LoginPrompt property to False;
10. Set Connected property to True.
11. Drop TADOTable on the form and set its Connection property to
ADOConnection1.
12. Set TableName to "sample2".
13. Set Active property to True.
14. Add TDataSource and TDBGrid on the form, connect them to ADOTable1 as
usual.

Now you should see data from sample2 table from test database (this database
goes with MySQL). Look ConnectionString property of ADOConnection1 in IDE
for details.

Connection string in my case is
Provider=MySqlProv.2.5;Data Source=test;Integrated
Security="";Password="";User ID="";Location="";Extended Properties=""
but
Provider=MySqlProv.2.5;Data Source=test;
works too.

You can do all this from source code.

P.S. If in Connection String dialog you will choose "MySQL.OLEDB Provider"
and press "Check connection" without setting Data Source, you will see a
dialog where you can enter properties, such as Host IP etc.

Also have a look at these links:

 
Thanks BTecho for the information. I am using BC5 on 98/200 machines. I already ported the data and am using the ODBC from MySql. i am able to see the database/tables/ and fields in the BDEexplorer/and SQLExplorer. But when i look at the Object Inspector, The table still says ttParadox. I think i need to change this but i am not sure. The reason i am saying this because i am still having a hard time running the project at a 100% correct.

I am able to pull information from some tables so i know the connection is working. The problem is i keep getting (EDBEnginError with message "Operation not applicable"). I get this message when i try to set the Filtered property to true.

I checked the filtered result and it checks ok.

I am not using any TADOConnection. I am relying on individual queries and table to connect.

thanks again for any help you can offer.
--quan
 
Hi quan.

I can't say I know what the exact problem is :-(, I'm no MySQL expert. If this only happens when you set Filtered to true, there maybe some code on OnFilterRecord event you maybe using that's causing the problem it can also be the Filter property string aswell.


You can try and search the myodbc newsgroups.




If all else fails, you can try ask this question on the mailing.database.myodbc newsgroup itself , the MySQL experts there should be able to help you far better with this problem than I am. Also I see people suggest using the Zeos components,though I haven't tried them myself. You try and replace the TTables and TQueries with those and see...

Goodluck! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top