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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by Janoh

  1. Janoh

    Restart a context (webapp) from another webapp

    I managed to do the authentication stuff and call the tomcat manager. here's the important snippet import java.net.Authenticator; import java.net.PasswordAuthentication; String urlStr = "http://localhost:8080/manager/html/stop?path=/myapp"; try { Authenticator.setDefault(new...
  2. Janoh

    Restart a context (webapp) from another webapp

    Hi, Can I somehow restart my current context from the current app, or another one? I found somenthing like ContextManager in catalina api, but it doesn't help. I found it in a tomcat's 3.2 internal api I thought of accessing the tomcat manager to restart my app by calling...
  3. Janoh

    Check if any Form Elements have changed?

    Try the following for text fields and textareas etc. It might contain errors, I've typed it dirrectly here. For dropdowns and radio buttons use the onchange. <script> var isChanged = false; var oldValue; function saveOldValue(obj) { oldValue = obj.value; } function...
  4. Janoh

    Function doesn't accept expression as param

    yup nigelrivett, that's it. it works great this way. Thank you all for the help
  5. Janoh

    Function doesn't accept expression as param

    Yes, but it still has the flaw if it is the first or the last in the list, and if you trick it with another 2 clauses, it can happen, that the list will contain just one element and that must be treated too. Thanks for the tip, didn't see the commas.
  6. Janoh

    Function doesn't accept expression as param

    Thank you all the help. I did a workaround. Firs I extracted the pairs si.Additional_Departments with the si.Item_Id into a temprorary table and then did this: and sd.Department_ID in (select D_ID from #tmp_Dep_Id where Item_Id = st.Item_Id) this solved my problem. As for you Iker, thanks...
  7. Janoh

    Function doesn't accept expression as param

    select st.Item_Id, st.Item_Name, st.Quantity, st.Sale_Price, st.Quantity * st.Sale_Price as Value, cast(sd.Department_Name as varchar(5)) + ' %' as Comission, st.Quantity * st.Sale_Price * (cast(sd.Department_Name as int)) / 100 as Comission_Value, st.Purchase_Date, --...
  8. Janoh

    Function doesn't accept expression as param

    If nigelrivett is right there's not much left to do. If I run the subquery with hardcoded value (constant or @local_variable as nigelrivett said it executes fine). When I try to pass a table column as a parameter it gives me the error. It also gives an error if I want to use another function...
  9. Janoh

    Problems with SQL CONVERT

    LOL, yes, you're right AtomicWedgie it will take all where Remain = -1 regardless the date
  10. Janoh

    Problems with SQL CONVERT

    try using cast, you use a style and don't know how is the impact if your locale is set on a different one. Let the server handle the style, use it only when displaying. CAST (@StartDate AS smalldatetime) it's just a tought
  11. Janoh

    Function doesn't accept expression as param

    Hi, I made a user defined function that takes a varchar as a parameter. fn_split('1,4,6') where '1,4,6' is the varchar It returns a table with the items splitted. It works great, but when I try to use it in a select passing a field name it gives an error: I have something like this select...
  12. Janoh

    DIV and SPAN

    Clear and concise. Thank you.
  13. Janoh

    How to Uninstall to Upgrade

    Hi all I found this thread. I have the same problem as tgus but I have mysql built from source. Now I want to take it down and don't know how to uninstall it. Is it safe to just delete it from the install dir ? Or are there some switches of the ./configure method, something like ./configure...
  14. Janoh

    PHP as Apache module

    Check the ini files and the paths if are correct. You must have an php.ini file in your win dir and also a dll if i'm not wrong under system or system32
  15. Janoh

    gtk &amp; glib update (how to do it ?)

    Hi, I'm running Slack 8.1 and I want to install some apps that requires GTK 2+. This also requires glib 2.0 + Ok. I wanted to install gtk+ but it needed a newer version of the pkg-config tool. I had 1.12 of it and wanted to upgrade to 1.15. I installed it and the following things happened...

Part and Inventory Search

Back
Top