• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Alter Table

Explorer ,
Dec 15, 2011 Dec 15, 2011

Copy link to clipboard

Copied

Hi everybody,

I would like to alter a table within a Coldfusion application. Can I do that with cfscript ? If, does anybody know how I can do that ?

Thanks.

TOPICS
Database access

Views

1.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Dec 15, 2011 Dec 15, 2011

Is there a cfscript equivalent for the CFQUERY Tag ?

Yup: Query.cfc:

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSe9cbe5cf462523a0693d5dae123bcd28f6d-7ffb.html

--

Adam

Votes

Translate

Translate
Guide ,
Dec 15, 2011 Dec 15, 2011

Copy link to clipboard

Copied

What kind of table? A database table? Why would you want to do that through ColdFusion?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 15, 2011 Dec 15, 2011

Copy link to clipboard

Copied

If you want to alter a database table, you can use CFQUERY to run that, just like you use it to run standard SQL DML (SELECT, INSERT, UPDATE, DELETE) commands. That kind of SQL command is called DDL.

That said, you generally don't want to run DDL commands from applications for both security and common-sense reasons, and your database login will need a higher level of privilege to do this than it would to run DML commands.

Dave Watts, CTO, Fig Leaf Software

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 15, 2011 Dec 15, 2011

Copy link to clipboard

Copied

THank you very much for your answers,

what I want to do is to build an Air Application for maintaining my Tables in a Mysql system. If you know Ruby on Rails, there you have a Feature called "Migrations" - that's what I want to do with that application. It is not planned as a "normal" application, it should make it easier to keep the different versions between the development and production Environment up to date.

Is there a cfscript equivalent for the CFQUERY Tag ?

Regards

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Dec 15, 2011 Dec 15, 2011

Copy link to clipboard

Copied

There is in ColdFusion 9, yes.As long as you have permissions, it's just the same as running any other query.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 15, 2011 Dec 15, 2011

Copy link to clipboard

Copied

Is there a cfscript equivalent for the CFQUERY Tag ?

Yup: Query.cfc:

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSe9cbe5cf462523a0693d5dae123bcd28f6d-7ffb.html

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 15, 2011 Dec 15, 2011

Copy link to clipboard

Copied

LATEST

Thanks a lot - that was the one I needed.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation