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!

Search results for query: *

  1. dmhirsch

    How do I pass local variables?

    Looks like you accidentally put a space in the querystring: Response.Redirect "nextpage.asp? variable=" & Request.Form("variable") should be Response.Redirect "nextpage.asp?variable=" & Request.Form("variable")
  2. dmhirsch

    Do FK Constraints do full table scan on delete?

    Actually, I don't use a lot of stored procedures, except for complicated updates. Instead, I create the "delete" functionality in the business logic tier, which sequences cascading deletes as necessary to avoid constraint errors. My goal is to have SQL Server generate no errors at all...
  3. dmhirsch

    How can I step through a table.one by one

    Hmmmm.... Try a FOR UPDATE after the ORDER BY
  4. dmhirsch

    Added New Column to Existing Table/Part of 1ary Key Now

    Watch out for tables that export that primary key as a foreign key; they need to change too.
  5. dmhirsch

    How can I step through a table.one by one

    An example from BOL: USE Northwind GO DECLARE abc CURSOR FOR SELECT CompanyName FROM Shippers OPEN abc GO FETCH NEXT FROM abc GO UPDATE Shippers SET CompanyName = N'Speedy Express, Inc.' WHERE CURRENT OF abc GO CLOSE abc DEALLOCATE abc GO
  6. dmhirsch

    If/then evaluating wrong

    Null can't be used in equality statements (remember that it means, "I don't know" - so how can you have two unknown values be equal?) Instead use Is Not Null and Is Null. For example: If myVariable Is Not Null Then 'do stuff End If BUT!!!! Request.Form("myField") will NEVER...
  7. dmhirsch

    How can I step through a table.one by one

    Sounds like you're used to using recordsets in VB. The equivalent in SQL is cursors. There's a lot of syntax, so start with books online. BUT, there's probably a better way (given what you've described) to write a single SQL update statement that would do the trick, and much faster than cursors.
  8. dmhirsch

    Do FK Constraints do full table scan on delete?

    A foreign key is in fact a particular type of index, so no table scan is necessary. They are very low overhead (per documentation) compared to triggers. But if it is your goal to prevent deletions on the front end, you will probably want to use your select in order to find out ahead of time...
  9. dmhirsch

    Excel Display Of A Long Number

    In the class definition for that cell, use, e.g.: .x124 {mso-style-parent:style0; mso-number-format:0;} Then in the cell, use: <td height=17 class=x124 align=right width=135 style='height:12.75pt; width:101pt' x:num=&quot;12345678901234&quot;>12345678901234</td> This was generated by 1)...
  10. dmhirsch

    I'd like to create a ranking system

    Do you want the ranking procedure to happen on the client, or server? For example, if you have few users making lots of ranking changes, probably client is best for display update speed issues. If, on the other hand, you have lots of users making updates, then you should use server-side, for...
  11. dmhirsch

    ASP and Component

    First, set a reference in the vb project to the ASP environment. Then, you can pass the request object right into ASP: Public Sub processHTML(myRequest as Request) Dim myVariable as String myVariable = myRequest.Form(&quot;myField&quot;) End Sub The syntax is probably bad, but you get the idea.
  12. dmhirsch

    datetime computation

    And for seconds, end_time = DATEADD(ss, duration, start_time)
  13. dmhirsch

    datetime computation

    First step is, look up DATEADD in Books Online, to get the whole syntax. But, basically DATEADD is what you need. If, for example, you wanted to add 2 hours to start_time, you would say: end_time = DATEADD(hh, 2, start_time)
  14. dmhirsch

    GETDATE()

    jhall - I just tested (getdate()) as a default in EM for a datetime field with no problems.
  15. dmhirsch

    float question

    onpnt, it sounds like it was just a formatting issue, not a data conversion/storage issue.
  16. dmhirsch

    float question

    Response.Write(FormatNumber(myNumber, 5)) would do the trick, leaving 5 places after the decimal.
  17. dmhirsch

    float question

    Actually, 1.0000000000E-02 and 0.0001 are not the same number. 1.0000000000E-04 and 0.0001 are the same number. I'm hoping that the latter is what's happening (you said &quot;something like&quot;)...
  18. dmhirsch

    float question

    1.0000000000E-02 and 0.0001 are the same value, formatted differently. VBScript's FormatNumber(Expression [,NumDigitsAfterDecimal [,IncludeLeadingDigit [,UseParensForNegativeNumbers [,GroupDigits]]]]) function will allow you to format it however you want for display.
  19. dmhirsch

    Question About Tables In SQL Server

    The equivalent in SQL Server for autonumber is IDENTITY. You can set that as an option in Enterprise Manager, in table design. Also in table design mode, you can set defaults. GETDATE() as a default will return today's date.
  20. dmhirsch

    variable help

    Try: document.myform.elements[&quot;list&quot; + i].checked = true;

Part and Inventory Search

Back
Top