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 Wanet Telecoms Ltd 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

    ...qualify the class with java.lang.Class.forName(...) it still chokes. ------------- SOURCE CODE ------------ package northwind; import java.lang.*; import java.sql.*; public class Employee { private String _empId = null; public Employee(String empId) { this._empId = empId...
  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

    ...a table Sub BuildTable (sFilePath) [tab]Dim Rs, sql, dsn [tab]Set Rs = Server.CreateObject (&quot;ADODB.Recordset&quot;) [tab]sql = &quot;SELECT * FROM Orders ORDER BY OrderId&quot; [tab]dsn = &quot;Provider=SQLOLEDB; Data_Source=(local); Initial Catalog=Northwind; User Id=sa...
  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?

    ...= "Provider=SQLOLEDB; Data_Source=(local); Initial Catalog=Northwind; User Id=sa; Password=;" .RecsPerPage = 10 .SQL = "SELECT * FROM Customers ORDER BY CompanyName" .ShowPageNumbers = True .ShowPage (iCurrentPage) End With %> <% Class DbPager...
  11. jfriestman

    Only showing X records at a time

    ...Data_Source=(local); Initial Catalog=Northwind; User Id=sa; Password=;&quot; [tab][tab].RecsPerPage = 10 [tab][tab].SQL = &quot;SELECT * FROM Customers ORDER BY CompanyName&quot; [tab][tab].ShowPageNumbers = True [tab][tab].ShowPage (iCurrentPage) End With %> <% Class DbPager...
  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?

    ...Server}; Server=(local); Database=Northwind; UID=sa; PWD=;" Access connection string looks like this: "Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:\Temp\Northwind.mdb" Oracle: DRIVER={Microsoft ODBC for Oracle};SERVER=path to server; (same as SQL Server) Microsoft Excel...
  17. jfriestman

    debug ADO error

    ...UID=sa; PWD=;&quot;</font><br><br>Access connection string looks like this:<br><FONT FACE=monospace>&quot;Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:\Temp\Northwind.mdb&quot;</font><br><br>3. DSN-less OLEDB connection<br>Script similar information but use the OLEDB native...
  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