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 TouchToneTommy 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. jfriestman

    compile fails with ClassNotFoundException

    Never mind, I figured it out... had to wrap Class.forName in a try...catch block. That's all it took.
  2. jfriestman

    compile fails with ClassNotFoundException

    When I attempt to compile the class below, it returns this error: C:\...\classes\northwind>javac Employee.java Employee.java:11: unreported exception java.lang.ClassNotFoundException; must be caught or declared to be thrown Class.forName(DRIVER); ^ 1 error...
  3. jfriestman

    Placing certain records in a recordset first, then remaining records..

    use a union query to create the recordset select field1 from table1 where field2 like '%red%' union select field1 from table1 where field2 not like '%red%' get it? only catch - if you order the table you lose your ranking. there is a way around it but involves using sql to create temporary...
  4. jfriestman

    javascript functions

    You can do a replace but you gotta use a regular expression. You can see the syntax of the command at this website: http://209.55.107.62/javascript/string.htm#1194258 p.s. that is the Netscape Javascript 1.3 documentation hosted on my machine at home using my DSL connection so don't expect...
  5. jfriestman

    ScriptingContext Object??

    Be careful about writing HTML code from your dll. When your client decides he wants a red font, you don't want to have to recompile your dll. In general however, if you want to access the ASP built in objects you have four options: 1. Use ScriptingContext (bad) 2. Use ObjectContext (good) 3...
  6. jfriestman

    Displaying links of filenames from a database

    To create the link, use code like this: Do while NOT oRS3.EOF [tab]Response.Write &quot;<tr>&quot; [tab]Response.Write &quot;<td>&quot; & oRS3(&quot;Style&quot;) & &quot;</td>&quot; [tab]Response.Write &quot;<td>&quot; & oRS3(&quot;ArtistName&quot;) & &quot;</td>&quot; [tab]Response.Write...
  7. jfriestman

    Display message during page processing

    Heres an idea. I just threw this code together but heres the gist of it... 1. Display the wait message 2. Write the html of the table you are building to a file on disk 3. When the page is finished processing, redirect the user to the html page on disk. <%@ Language=VBScript %> <% Option...
  8. jfriestman

    Display message during page processing

    Hey Nick, Check out this article. I think it will help. http://www.asptoday.com/articles/20000317.htm
  9. jfriestman

    Only showing X records at a time

    Ooops, forgot to clean up after myself. At the bottom of the ShowPage routine, add the lines of code: Rs.Close Set Rs = Nothing I turned this into an FAQ, you can see the better code in the FAQ section.
  10. jfriestman

    How do I page through a Recordset?

    Wonder how to page through a large Recordset only showing X number of records at a time? So do a lot of folks, this question gets asked so many times here, I decided to put together a VBScript Class that will allow people to page a recordset. Here's the code and a page that will do it, just...
  11. jfriestman

    Only showing X records at a time

    This question gets asked so many times here, I decided to put together a VBScript Class that will allow people to page a recordset. Here's the code and a page that will do it, just copy paste it into your favorite editor and start experimenting. You can definitely make the table prettier and...
  12. jfriestman

    Malformed Syntax Errors

    Guestg is absolutely right.&nbsp;&nbsp;IE will try its best to URL Encode the URL for you.&nbsp;&nbsp;Netscape doesn't.&nbsp;&nbsp;If you have any spaces or special characters in your URL, Netscape chokes... and kicks that ugly error you describe.&nbsp;&nbsp;Use Server.URLEncode on any...
  13. jfriestman

    date format

    What type of Database are you using?&nbsp;&nbsp;If it is SQL Server, use the CONVERT function to convert the date into the format you want.<br><br>See Books Online for more info on CONVERT.<br><br>You will probably want to use the style 106 which will convert to &quot;dd mon yy&quot;<br><br>Most...
  14. jfriestman

    using a variable to indicate the stored procedure to execute

    Put a hidden form element in your form which indicates the name of the form and use Select...Case to determine which stored procedure to run based on that form element.<br><br>Dim Rs&nbsp;&nbsp;&nbsp;'recordset<br>Dim dsn&nbsp;&nbsp;'datasource<br>Dim sp&nbsp;&nbsp;&nbsp;'stored procedure<br>Dim...
  15. jfriestman

    debug ADO error

    Your connection string looks like a witches brew of parameters.<br><br>1. Where's your username and password in the connection string?<br><br>2. Why are you putting the driver and the DSN in the same connection string?&nbsp;&nbsp;If you've already set up DSN, you shouldn't need to also specify a...
  16. jfriestman

    Can you explain the different ways to connect to a database?

    A quick rundown of three ways to connect to a database 1. ODBC Manager Enter all configuration information through the ODBC manager and the ODBC driver. Connect to your database like this: "DSN=Northwind;" 2. DSN-less ODBC connection Script the same information, connect with the...
  17. jfriestman

    debug ADO error

    A quick rundown of three ways to connect to a database<br><br>1.&nbsp;&nbsp;ODBC Manager<br>Enter all configuration information through the ODBC manager and the ODBC driver.&nbsp;&nbsp;Connect to your database like this:<br><br><FONT FACE=monospace>&quot;DSN=Northwind;&quot;</font><br><br>2...
  18. jfriestman

    How can I convert the server date to the English format...

    I can think of three ways to do what you ask:<br><br>1. Format it with your SQL statement.<br>Not sure about the syntax for MS Access JET SQL (I use SQL Server).&nbsp;&nbsp;In SQL Server it's CONVERT (data_type[(length)], expression [, style]).&nbsp;&nbsp;To convert to US English, you would set...
  19. jfriestman

    SQL statement won't run in ASP! HELP!

    I don't think &quot;GO&quot; is a valid keyword when you are passing the statement thru ASP.&nbsp;&nbsp;In fact, I'm pretty sure of it.<br><br>If you want to use the &quot;GO&quot; keyword you have to make your SQL statement into a stored procedure and call the stored procedure.<br><br><br> <p>...
  20. jfriestman

    Help want to use a variable in a link.

    Write the link to the page with JavaScript...<br><br>&lt;Script type=&quot;text/javascript&quot;&gt;<br>document.write (&quot;&lt;A HREF='&quot; + zip + &quot;.htm'&gt;Link&lt;/A&gt;)<br>&lt;/Script&gt; <p> Jeff Friestman<br><a href=mailto: > </a><br><a href=...

Part and Inventory Search

Back
Top