CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Massive code changing

Print topic Send  topic

Author Message
gesto


Posts: 42
Posted: 07/02/2007, 12:19 PM

Hi,

I need to apply a project built in codecharge to another database, wich has the same table schema but the name of the tables has a different prefix in the name such as:

Project 1:

PREF_Table1
PREF_Table2

Project 2:

TB_Table1
TB_Table2


so, the project in codecharge has the same configuration in general, but i need to change all the table names of 130 pages from the first prefix to the seconde prefix.

I tried to use the dreamwearver to change from "PREF_" to "TB_" in all files (including *.ccp) but unfortunatelly when I did this i wasn't able to modify the project by the design view.


Anyone know how to do this?

Thanks
View profile  Send private message
wkempees


Posts: 1679
Posted: 07/02/2007, 3:17 PM

http://forums.codecharge.com/posts.php?post_id=87761

Out of curiousity what DB?
On the code side of things I imagine you could do a text replace using a good text editor.
A couple of macro's would do the trick, changing the raw code files.
Stil it would not change your project.
I will sleep on this one as I may need it very soon myself.

You at least have one advantage, being all tables already have a distinct naming convention TB_, imagine your tables having ordinary names, the challenge would have been immense.


Walter

_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
gesto


Posts: 42
Posted: 07/03/2007, 5:19 AM

thanks for your reply!

the tables are at a Sql server DB.

And I use this distinct naming convention to be able to use the same database to several apps, as we are restrict to some DB in our server.



if you or anyone else find some way to solve this pls contact me.

thanks.
View profile  Send private message
wkempees


Posts: 1679
Posted: 07/03/2007, 9:06 AM

Do not do this:
as a test I did the following.
Using a codeeditor PhPEdit I did a search/replace TB_ by PREF_ in the *.ccp *.ccs and in the *_events.php, then I deleted all *.php excluding the *_events.php.
Then opened the project, and published.
This sort of worked as long as the forms and grids are not named based on the tables which the would be if built through builders.
Cryptic maybe but tryed anyway.

The raw search/replace on the *.php should work and when put in a batchfile using a tool it could be fast.
Walter




_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.