Absent Member.. dahernan Absent Member..
Absent Member..
2120 views

Changing the DATACONST email address

Jump to solution

Hello!

 

I already assigned an email address to the FROM_EMAIL_ADDRESS in the DATACONST table.  What I am looking for the SQL Query on how to change it in the future if needed.  How do I change this field after it has been already assigned?

 

Thanks!

0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.. Trudy Claspill Absent Member..
Absent Member..

Re: Changing the DATACONST email address

Jump to solution

I think this is the query you need to execute against the table from the Site Admin interface

update DATACONST set DC_VALUE='email@company.com' where DC_CONST_NAME='FROM_EMAIL_ADDRESS'

 So, the problem with your previous "update DATACONST" syntax was still #2 - FROM_EMAIL_ADDRESS is not the name of a column in that table.  You have to specify the column/field name where you actually store the value in the SET clause, and to ensure you update the right row, you need the WHERE clause to identify which row to update.

[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)
12 Replies
Absent Member.. RoniRobinson Absent Member..
Absent Member..

Re: Changing the DATACONST email address

Jump to solution

I suppose you used an Insert statement to add the value.  Have you tried just using an Update statement to change it?

0 Likes
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: Changing the DATACONST email address

Jump to solution

Hi Dahernan

 

I agree with Robinsont hat you can use  SQL update statement to do that.

 

For example:

UPDATE DATACONST
SET FROM_EMAIL_ADDRESS = 'YourEmailAddress'

 


If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.”

Thanks and best regards,
Shoulian Zhao
SW Support Technical Consultant
0 Likes
Absent Member.. dahernan Absent Member..
Absent Member..

Re: Changing the DATACONST email address

Jump to solution

I tried that statement but got the "Failed to Run Query" message below:


Messages:
Failed to Run Query;
Failed to execute the query;
Failed SQL: /* ~~QC */ UPDATE DATACONST
SET FROM_EMAIL_ADDRESS = 'dahernan@test.test.com'
[Mercury][Oracle JDBC Driver][Oracle]ORA-00904: "FROM_EMAIL_ADDRESS": invalid identifier

 

Any ideas?

0 Likes
Absent Member.. QC_Admin Absent Member..
Absent Member..

Re: Changing the DATACONST email address

Jump to solution

Hi Guys-

 

I know we set that value by adding the parameter ( FROM_EMAIL_ADDRESS ) in Site Admin on the Parameters Tab, Note* - We added this value to be used when a user clicks the forgot password link at the logon screen

0 Likes
Absent Member.. dahernan Absent Member..
Absent Member..

Re: Changing the DATACONST email address

Jump to solution

Yes, I've added the parameter in Site Admin.  What I am looking for is the correct SQL Query on how to change the value.  For example, right now it is set as "administrator@test.com" and I want to change it to "example@email.com.

 

What is the correct Query for this?

0 Likes
Absent Member.. Trudy Claspill Absent Member..
Absent Member..

Re: Changing the DATACONST email address

Jump to solution

Looking at an ALM v11 system using SQL, I see that the data from Site Admin from the Site Configuration tab (listing two columns - Parameters and Values) is stored in the site admin database in a table called PARAMS.

 

To ensure that I would get the right parameter value for updating, I first constructed a Select statement

select PARAM_NAME, PARAM_VALUE from td.PARAMS where PARAM_NAME='AUTO_MAIL_WITH_ATTACHMENT'

 Then I constructed the Update statement to update that one parameter value

update td.PARAMS set PARAM_VALUE='N' where PARAM_NAME='AUTO_MAIL_WITH_ATTACHMENT'

 @daheman - I would presume that the error you encountered with the previous query is because

1. DATACONST is not the name of a table, or

2. FROM_EMAIL_ADDRESS is not the name of a column in that table.

 

In my ALM v11 system there is no DATACONST table in the Site Admin database, so I am unclear about why you set up the field/value pair there.  But, I'm not a DBA.

 

Hope that helps.

[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)
0 Likes
Absent Member.. dahernan Absent Member..
Absent Member..

Re: Changing the DATACONST email address

Jump to solution

Trudy, I'm not a DBA either.  But if you look at ALM 11 from site admin and scroll through the tables in your project you should see a DATACONST table.  Now, the reason for adding the "FROM_EMAIL_ADDRESS" value to the table is to eliminate a constant error that shows up in the SA logs daily.  Now that I've added a value to the table the error is gone but now I want to change that value to something else. This is where I'm having trouble as I am trying several statements but they all don't work.

 

If anyone has successfully attempted this with a SQL Query please let me know.

0 Likes
Absent Member.. Trudy Claspill Absent Member..
Absent Member..

Re: Changing the DATACONST email address

Jump to solution
Okay. I misunderstood. I thought you added a Site parameter. I'll do a little more research and post a solution shortly.
[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)
0 Likes
Highlighted
Absent Member.. Trudy Claspill Absent Member..
Absent Member..

Re: Changing the DATACONST email address

Jump to solution

I think this is the query you need to execute against the table from the Site Admin interface

update DATACONST set DC_VALUE='email@company.com' where DC_CONST_NAME='FROM_EMAIL_ADDRESS'

 So, the problem with your previous "update DATACONST" syntax was still #2 - FROM_EMAIL_ADDRESS is not the name of a column in that table.  You have to specify the column/field name where you actually store the value in the SET clause, and to ensure you update the right row, you need the WHERE clause to identify which row to update.

[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)
Absent Member.. dahernan Absent Member..
Absent Member..

Re: Changing the DATACONST email address

Jump to solution

Trudy, Thank You Very Much!  That worked!

0 Likes
Absent Member.. Rex99 Absent Member..
Absent Member..

Re: Changing the DATACONST email address

Jump to solution

Thank you!!!!!!  I've been working on this for 4 hours!

 

 

0 Likes
Absent Member.. Trudy Claspill Absent Member..
Absent Member..

Re: Changing the DATACONST email address

Jump to solution
Clicking on the STAR to give Kudos is an fabulous way to show your appreciation. 🙂
[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.