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

Search results for query: *

  1. Discord

    if object exists

    you're getting the id from the other database but checking your current database's sysobjects table. and i think OBJECTPROPERTY only works in the current database. this should work. if exists (select * from GLOBAL_POS.dbo.sysobjects where id = object_id('GLOBAL_POS.DBO.NA_052003_BP') and xtype...
  2. Discord

    need to get a sum of numbers in a number

    i don't know of a built-in function that will do this. here is a function that will do it though Create function dbo.AddDigits ( @intNumber int ) Returns int AS Begin declare @strNumber varchar(20), @intReturnValue int Select @strNumber = Cast(@intNumber as varchar), @intReturnValue =...
  3. Discord

    Script produces HTTP Error 405 ??

    <form action=&quot;calc_score&quot; method=&quot;post&quot; name=&quot;myForm&quot;> should be <form action=&quot;calc_score.asp&quot; method=&quot;post&quot; name=&quot;myForm&quot;>
  4. Discord

    IsDate troubles

    looks like a SQL Server error. try calling SET DATEFORMAT dmy to tell sql server to expect the day first.
  5. Discord

    How to search for Null values

    SELECT * FROM TableName WHERE FieldName IS NULL
  6. Discord

    page breaks when printing

    sorry. that should be <thead style=&quot;display:table-header-group;&quot;>
  7. Discord

    page breaks when printing

    try <thead style=&quot;&quot;display:table-header-group;&quot;&quot;> <tr> <th>Header</th> </tr> <tbody> <tr> <td>Rest of page</td> </tr> when you print or print preview it will display the header at the top of all the pages
  8. Discord

    Hyphen in server name causes incorrect syntax error

    try SELECT * FROM [server-1].msdb.dbo.backupset
  9. Discord

    Date functions

    this should work RIGHT(CAST(Year(CreateDate) AS VARCHAR), 2)+'^'+ CASE WHEN Month(CreateDate) <= 9 THEN '0' ELSE '' END+ CAST(Month(CreateDate) AS VARCHAR)+'^'+ CASE WHEN Day(CreateDate) <= 9 THEN '0' ELSE '' END+ CAST(Day(CreateDate) AS VARCHAR)
  10. Discord

    Does 'INSERT' return a value when used with SQL Server?

    you could create an INSERT trigger that returns the newly created identity value. SELECT IdentityField FROM Inserted
  11. Discord

    help creating HTML string

    str = &quot;<li><A HREF=&quot;&quot;javascript:doMarker('abc');&quot;&quot;></a>&quot; you have to have the two different types of quotes if you're going to nest them.
  12. Discord

    Problem with netscape

    try changing document.location to document.location.href
  13. Discord

    on error resume next

    i don't want to know if an error has occured. i know how to check that. i want to know if there's a way to check to see if &quot;on error resume next&quot; has been called.
  14. Discord

    on error resume next

    is there anyway to check to see if a page has set on error resume next? i want to do something like check to see if on error resume next has been set on error resume next do something that may raise an error if on error resume next was not set then on error goto 0 does anybody know if that's...
  15. Discord

    Looping in javascript: form validation

    ok. i changed if (isNaN(claimsBox.value))) to if (isNaN(Number(claimsBox.value))) and added the closing } for the function formValidation and it displays the please enter a number alert
  16. Discord

    Looping in javascript: form validation

    that shouldn't matter. how big is the generated HTML file? would you be able to post it here?
  17. Discord

    Looping in javascript: form validation

    do you have a link to the page i can see? i am very confused as to why what i wrote isn't working
  18. Discord

    Looping in javascript: form validation

    ok. try for (var boxCount = 1; j < 12; boxCount++) { eval('ClaimsBox = currentForm.txtNumClaims'+boxCount); if (isNaN(Number(ClaimsBox.value))) { alert(&quot;Please enter a number.); ClaimsBox.focus(); return false; } }
  19. Discord

    Looping in javascript: form validation

    either single or double quotes should work fine. what error are you getting? what is the isItNumber function expecting? the form element or the form element's value? the above code passes the form element.
  20. Discord

    Looping in javascript: form validation

    try for (var boxCount = 1; j < 12; boxCount++) { eval('ClaimsBox = currentForm.txtNumClaims'+boxCount); if (isItNumber(ClaimsBox) == false) { alert(&quot;Please enter a number.); ClaimsBox.focus(); return false; } }

Part and Inventory Search

Back
Top