If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > MySQL & Delphi Data-Aware Components

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-04-03, 18:04
johnbarri johnbarri is offline
Registered User
 
Join Date: Nov 2003
Location: rep of sa
Posts: 7
MySQL & Delphi Data-Aware Components

Hi. I'm a newbie to mysql, delphi, oop et al. I have two identical delphi projects. One is linked to an Access db, the other to a MySQL db, both through ODBC and wach linked to a table of the same structure..

I have a Delphi componen DbNavigator - data aware. It has a post (update) button. Clicking that button on the access project yields a post to the access table. Clicking the same button on the same data but on thhe MySQL project yields an SQL error.

"Check the manual that corresponds to your MySQL server version for the right syntax to use near ','detail' SET '(' "

So far as I can see, all MySQL permissions exist for read/write access to
the DB.

My confusion arises from the fact that to give entry level experience, I
chose data aware controls which I presumed would not need coding to function at a basic level. This works with Access but apparently not with MySQL. Clearly I am missing something fundamental regarding differences between MySQL's and Access's interactions with data aware components.

Can anyone suggest what it is that I am missing and how can I coax my
project to write to MySQL?

Last edited by johnbarri; 11-04-03 at 18:07.
Reply With Quote
  #2 (permalink)  
Old 11-10-03, 13:47
khibinite khibinite is offline
Registered User
 
Join Date: Oct 2003
Posts: 63
Hi!

DBNavigator is the db-aware control to have navigation via dataset. And which components do you use to have an acces to MySQL table? Any TQuery, TTable or something like that?
Reply With Quote
  #3 (permalink)  
Old 11-11-03, 17:01
johnbarri johnbarri is offline
Registered User
 
Join Date: Nov 2003
Location: rep of sa
Posts: 7
MySQL with Delphi data-aware components.

Hi khibinite,

I was using adoconnect, adodataset and adoquery - communicating to by use of the DBNav. I since dropped the query and added adocommand to update, triggered from a button - this on advice received.

Thanks for the interest. Whether or not tha above works (which I suspect it will - I have more to learn but at the end, more control) I would love to hear your take on the original problem.

Thanks,

John.

Last edited by johnbarri; 11-11-03 at 17:15.
Reply With Quote
  #4 (permalink)  
Old 11-12-03, 02:16
khibinite khibinite is offline
Registered User
 
Join Date: Oct 2003
Posts: 63
Hi!

I think you'd better to consider any another way to relate with MySQL. Ie, Zeos library - this is very popular for such tasks. Or you could find another components to have direct connect to MySQL on www.torry.net .
Reply With Quote
  #5 (permalink)  
Old 11-12-03, 02:57
johnbarri johnbarri is offline
Registered User
 
Join Date: Nov 2003
Location: rep of sa
Posts: 7
MySQL & Delphi Data-Aware Components

Are you saying MySQL has problems with ODBC and/or ADO? Or merely that there are better was of dealing directly with MySQL?

I have a strategic reason for using middleware.

Regards and thanks,

John
Reply With Quote
  #6 (permalink)  
Old 11-12-03, 03:16
khibinite khibinite is offline
Registered User
 
Join Date: Oct 2003
Posts: 63
Re: MySQL & Delphi Data-Aware Components

Quote:
Originally posted by johnbarri
Or merely that there are better was of dealing directly with MySQL?
Yes
Reply With Quote
  #7 (permalink)  
Old 11-13-03, 15:57
johnbarri johnbarri is offline
Registered User
 
Join Date: Nov 2003
Location: rep of sa
Posts: 7
MySQL & Delphi Data-Aware Components

Yes - well I heard of Zeos, downloaded it and struck difficulties compiling & installing. I'm not a very techy sort of guy.

As I said, a prime objective is to use and master a 'universal' middleware product.

Can you comment more on use of Zeos?

Regards & thanks,

John.
Reply With Quote
  #8 (permalink)  
Old 11-14-03, 01:15
khibinite khibinite is offline
Registered User
 
Join Date: Oct 2003
Posts: 63
Which version of Delphi do you use?
Reply With Quote
  #10 (permalink)  
Old 11-14-03, 18:08
johnbarri johnbarri is offline
Registered User
 
Join Date: Nov 2003
Location: rep of sa
Posts: 7
MySQL & Delphi Data-Aware Components

Quote:
Originally posted by khibinite
Which version of Delphi do you use?
Delphi 6 Pro
Reply With Quote
  #11 (permalink)  
Old 11-17-03, 04:18
khibinite khibinite is offline
Registered User
 
Join Date: Oct 2003
Posts: 63
Hm, I have Delphi 7 Ent, but I haven't any problems. Which kind of trouble did you get?
Reply With Quote
  #12 (permalink)  
Old 11-17-03, 15:47
johnbarri johnbarri is offline
Registered User
 
Join Date: Nov 2003
Location: rep of sa
Posts: 7
Quote:
Originally posted by khibinite
Hm, I have Delphi 7 Ent, but I haven't any problems. Which kind of trouble did you get?
I will have to revisit this later and come back to you. I do hope I can do that as I want to follow up on this.
Reply With Quote
  #13 (permalink)  
Old 08-20-04, 18:12
tgrigsby tgrigsby is offline
Registered User
 
Join Date: Aug 2004
Posts: 10
Cool Give me a break

Obviously, if you managed to get that error from MySQL, you did just fine connecting to it. For each SQL engine, there is a different dialect of SQL, and MS Access hardly uses a standard dialect.

If you want your application to be able to switch between these two databases, your best bet is to put the SQL statements in an external file, something that gets loaded at run time. Have a version for Access and a version for MySQL. Then drop in the appropriate SQL statements file depending on which database you're working with.

Now that that's cleared up, you just need to work out the correct syntax for what you want to do in MySQL. Access requires quotes in some places and MySQL doesn't.

'nuff said.
Reply With Quote
  #14 (permalink)  
Old 08-20-04, 21:31
johnbarri johnbarri is offline
Registered User
 
Join Date: Nov 2003
Location: rep of sa
Posts: 7
MySQL & Delphi Data-Aware Components'

Thank you for responding.

You suggest something like using multiple files or multiple statements from which user selects an appropriate file or statement set, probably by means of a run-time parameter selection?

An interesting idea. Isn't that what middle-ware components normally attempt?

Regards,

John.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On