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 wOOdy-Soft 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 petrusp

  1. petrusp

    RegExp question

    Syntax: Replace(expression, find, replacewith[, start[, count[, compare]]]) If you found the match, just set the start parameter equal to the index of the previous match + 1.
  2. petrusp

    RegExp question

    Take a look at: http://www.Regular-Expressions.info/tutorial.html
  3. petrusp

    Textbox and Hyperlink

    Redirect the user to the page in your TextBox Click event procedure.
  4. petrusp

    How to drop a primary key?

    I'd suggest posting this in a SQL forum.
  5. petrusp

    How to drop a primary key?

    You want to drop the constraint, not the field. The constraint has a unique name, different from the field name (Something like 'pk_id'). So you will have to know the constraint name first. "ALTER TABLE Table DROP CONSTRIANT pk_id
  6. petrusp

    Datagrid hardcode

    If you don't want to connect to a database, why not use a MSFlexGrid. It is easier to use than a DataGrid. You can use the .TextMatrix(row, col) method of the FlexGrid to add a value to a cel.
  7. petrusp

    XML DOM - How do i check if tag exists?

    You could also use 'On Error GoTo ...' to catch the exception and do some clean-up if the node does not exist.
  8. petrusp

    XML DOM - How do i check if tag exists?

    Why not step through the nodes in the file, comparing each one to check if it is the node you want. And if it is not found, inform the user after the loop finished by using a flag.
  9. petrusp

    Newline Characters

    There is also a newLine() method you can use which is platform independant. The '\n' literal usually only works for Windows platforms.
  10. petrusp

    Have no Jbuilder - where do I specify JNDI names ..etc

    You can also use the deploytool. At the command prompt, just type 'deploytool'. If your path is not set up correctly, you can find it in the directory where J2EE is installed.
  11. petrusp

    can you redirect System.err to a file?

    Yes. All you have to do is set a string object equal to System.err.toString(), get a byte[] of the string and write it to a file. FileOutputStream file = new FileOutputStream("log.txt"); for (int i = 0; i < bytes.length; i++) file.write(bytes[i]); file.close();
  12. petrusp

    Does return value of main function need to be an integer

    The main function for java: public static void main(String[] args){} As you can see, the return type is void, thus no value is returned. If you give it a return type other than void, you will get an exception stating that the main function does not exist. Also if working with constructors, the...
  13. petrusp

    Abstract classes

    Could someone please help me clarify the following matter? An abstract class is a class which has to be inherited. An instance of an abstract class can never be created, but references of abstract classes can be declared. Considering this, can an abstract class contain a constructor and can...
  14. petrusp

    Licences?

    Can anyone tell me if i need a licence to write comercial programs in VB.Net. I am using a open source IDE (#Develop).

Part and Inventory Search

Back
Top