Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Altering a Table within a PowerBuilder Script

Status
Not open for further replies.

connoq

IS-IT--Management
Apr 1, 2003
5
US
is it possible to use ALTER TABLE (to add columns to a table) from within a PowerBuilder Script? Anyone have the syntax?
 
Hi,

String s_str
s_str = "alter table table_name add name varchar(20)"

EXECUTE IMMEDIATE :s_sql USING SQLCA;

Hope this help.
 
shiongss, Thank you! Your tip was very helpful. It bothers me that we were unable to find this information through the PowerBuilder help. When you search for ALTER you get nothing. Not knowing that the EXECUTE IMMEDIATE was available, we would have never figured this out. Can you recommend any books or online documentation that is comprehensive (i.e, in this case when looking up ALTER TABLE having it tell you that you can only utilize ALTER TABLE through EXECUTE IMMEDIATE)? Thanks again.
 
Hi,

That statement i was not learn from book, it's from my work experience.

The help file in PB do have a help regarding of EXECUTE IMMEDIATE.

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top