Editing mysql script inside rad studio
-
- Posts: 135
- Joined: Tue 09 Jan 2007 13:44
Editing mysql script inside rad studio
If I edit a script (procedure) I created using the MySQL Query Browser within rad studio why does the text in the original script not change? Also, where does the mydac developer studio store the edited text?
Could you explain what exactly you do please?
I consider the following steps:
1. Open the 'Database Explorer' tool window.
2. Choose a particular connection and unfold nodes through 'Procedures' node.
3. Right-click (or 'App' key) on a desired procedure to show a popup menu.
4. Choose 'Open' to edit procedure's script.
5. Make some changes and press 'Save' button (or Ctrl+S).
6. Nothing happens.
Am I right?
And what is the name of the product you talking about? 'dbForge Fusion for MySQL' or 'DAC for MySQL'? What is the version of that product?
I consider the following steps:
1. Open the 'Database Explorer' tool window.
2. Choose a particular connection and unfold nodes through 'Procedures' node.
3. Right-click (or 'App' key) on a desired procedure to show a popup menu.
4. Choose 'Open' to edit procedure's script.
5. Make some changes and press 'Save' button (or Ctrl+S).
6. Nothing happens.
Am I right?
And what is the name of the product you talking about? 'dbForge Fusion for MySQL' or 'DAC for MySQL'? What is the version of that product?
-
- Posts: 135
- Joined: Tue 09 Jan 2007 13:44
That's what I did Tyro. I then closed rad studio, opened MySQL query browser, opened the script and the text was unchanged from the original. I then restarted rad studio and opened the file in that and the text contained the changes I had made. As I said, I'm confused as to where the changed file has been stored. It's dbForge fusion for MySQL v3.50.332 I'm using.
OK, you said "opened the file". Are you sure that you open a procedure editor, but not a script from a file on a disk? Are you sure that you are open the same connection (and schema) both in 'Database Explorer' and 'MySQL Query Browser'? Hint: right click on a connection node in the 'Database Explorer' and press 'Properties' to verify the connection string.
Please try again to open a procedure editor from the 'Database Explorer', made some changes and save it. BUT, before save, please open options dialog from main menu 'Tools->Devart Tools->Options...', then choose 'Environment->Output' node at the left of the dialog, and make sure that 'Schema Object Editor' option (under 'SQL Log' group) is set. Thus, when you save the procedure, a message will be added to 'Devart - Sql Log' output pane in the RAD Studio's 'Messages' tool window. That message contain the whole update script for the procedure, smth. like that:
------- Saving ``.`` to server -------
DROP PROCEDURE ``.``;
CREATE DEFINER = ...
PROCEDURE ``.``(...)
BEGIN
...
END;
---------------- Done: ``.`` ----------------
You must see this message to make sure that your changes were successfully applied to that procedure.
Please try again to open a procedure editor from the 'Database Explorer', made some changes and save it. BUT, before save, please open options dialog from main menu 'Tools->Devart Tools->Options...', then choose 'Environment->Output' node at the left of the dialog, and make sure that 'Schema Object Editor' option (under 'SQL Log' group) is set. Thus, when you save the procedure, a message will be added to 'Devart - Sql Log' output pane in the RAD Studio's 'Messages' tool window. That message contain the whole update script for the procedure, smth. like that:
------- Saving ``.`` to server -------
DROP PROCEDURE ``.``;
CREATE DEFINER = ...
PROCEDURE ``.``(...)
BEGIN
...
END;
---------------- Done: ``.`` ----------------
You must see this message to make sure that your changes were successfully applied to that procedure.
-
- Posts: 135
- Joined: Tue 09 Jan 2007 13:44
Hi Tyro, I downloaded and installed 3.60.380. Didn't make any difference. When I say "opened the file" in rad studio I mean I right clicked the procedure in database explorer window and selected "Open". In MySQL query browser I selected 'File | Open Script" from main menu and then clicked on the .sql file containing the procedure script. Im using the same connection in both and everything else tallies (Schema Object Editor is ticked etc).
It seems I've got your scenario.
Using MySQL Query Browser you've created a script of a procedure definition and saved it to a file on a disk. Then you open the same procedure via 'Database Explorer' in RAD Studio. Now, when you change it's body and save you expect to see these changes in your previously saved file.
If so, you'll never see any changes in that file on a disk, because you saved a copy of a procedure definition to a file, but your original procedure definition is still stored on a database. And dbForge Fusion's procedure editor interacts directly with that database, i.e. it fetches a procedure definition from a database, and when you edit it and save, it is saved directly back to that database, and don't use any temporary or intermediate file.
In this case, if you want to update your script in a file, you have to regenerate it again via 'MySQL Query Browser' or 'dbForge Fusion'. Or you can open that file with dbForge Fusion's SQL Editor, which has lot of useful features. Just select 'Tools->Devart Tools->Open file...' and choose the saved file.
Using MySQL Query Browser you've created a script of a procedure definition and saved it to a file on a disk. Then you open the same procedure via 'Database Explorer' in RAD Studio. Now, when you change it's body and save you expect to see these changes in your previously saved file.
If so, you'll never see any changes in that file on a disk, because you saved a copy of a procedure definition to a file, but your original procedure definition is still stored on a database. And dbForge Fusion's procedure editor interacts directly with that database, i.e. it fetches a procedure definition from a database, and when you edit it and save, it is saved directly back to that database, and don't use any temporary or intermediate file.
In this case, if you want to update your script in a file, you have to regenerate it again via 'MySQL Query Browser' or 'dbForge Fusion'. Or you can open that file with dbForge Fusion's SQL Editor, which has lot of useful features. Just select 'Tools->Devart Tools->Open file...' and choose the saved file.
-
- Posts: 135
- Joined: Tue 09 Jan 2007 13:44
-
- Posts: 135
- Joined: Tue 09 Jan 2007 13:44
It depends on the MySQL server location and its configuration. If you have a local server installed, the databases are stored in "%ProgramFiles%\MySQL Datafiles" directory by default. The database file has a binary format, so you'll not be able to look inside it and find your procedure's definition.
Please refer to MySQL Reference to find out more.
Please refer to MySQL Reference to find out more.