inserting a record in the table of a database on the server

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
alpha
Posts: 9
Joined: Thu 15 Jan 2009 22:57

inserting a record in the table of a database on the server

Post by alpha » Thu 15 Jan 2009 23:08

Hi, I'm a newbie :oops: but impressed by the ease with which I could reacht my database on my lamp server using de demo program
However there are no simple basic examples, in my case to insert a record.
Which components should I use besides Myconnection etc
Tnks

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 16 Jan 2009 13:20

To solve this problem you should use the TMyTable or TMyQuery component.
Also you can use the TDBGrid component to display and edit the records from a database table.
You can look at the example of using these components in MyDacDemo.

jkuiper
Posts: 138
Joined: Fri 04 Aug 2006 14:17

Post by jkuiper » Fri 16 Jan 2009 14:03

Hi, I'm a newbie Embarassed but impressed by the ease with which I could reacht my database on my lamp server using de demo program
Where is your L.A.M.P. server running. Be sure that you can reach your database on port 3306 or via SSH if available.

alpha
Posts: 9
Joined: Thu 15 Jan 2009 22:57

LAMP mydacdemo

Post by alpha » Fri 16 Jan 2009 16:10

Tnks for the replies, My LAMP server is indeed open as are the database with proper permissions.
Accessing the table and inserting a record works fine when using MYdacdemo/table, but when I use a connection, source and table component and try to update after an insert I get the message: cannot update, read only (while using Mydacdemo works!)
Probably doing something stupid as a newbie :(

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 19 Jan 2009 13:17

Please make sure that the TMyQuery.ReadOnly property is set to False.

alpha
Posts: 9
Joined: Thu 15 Jan 2009 22:57

Tnks

Post by alpha » Mon 19 Jan 2009 20:58

Tnks for helping me getting started, I can reach my LAMP server and database and update records.
Should/can I close this topic, or does the moderator do that, well I'll see
Bye

Post Reply