Custom dynamic SQl statement

From: duxbuz (duxbuz_at_Xntlworld.com)
Date: 10/01/04

  • Next message: IchBin: "Re: Custom dynamic SQl statement"
    Date: Fri, 01 Oct 2004 21:52:13 GMT
    
    

    Hello,

    I am still having no luck with the creation of a custom sql statement.

    I am trying to write something like so:

    "SELECT " + Variable1 + "," + Variable2 + " FROM " + Variable3);

    I have been looking at preparedstatements, but not sure if that is a
    solution, surely someone has had this problem in past, if so please help
    am pulling hair out here.

    I get an error: Unable to load database driver
    Details: java.lang.ArrayIndexoutOfBoundsException: 1

    This same code works if I add the Columns and the Table name manually,
    in the SQL statement, but I want to be able to do it dynamically.

    Thanks if anyone can help.


  • Next message: IchBin: "Re: Custom dynamic SQl statement"

    Relevant Pages

    • Re: Custom dynamic SQl statement
      ... > I am still having no luck with the creation of a custom sql statement. ...
      (comp.lang.java.databases)
    • Re: Custom dynamic SQl statement
      ... >> I am still having no luck with the creation of a custom sql statement. ...
      (comp.lang.java.databases)
    • Re: Automating a query
      ... good luck, ... I guess I did not have the right code in for the SQL statement? ... then set index of the fieldin "test" ... "No Duplicates" ...
      (microsoft.public.access.queries)
    • Re: How to reset or clear a date field
      ... (declared at the time of creation as type: dbDate). ... Or vbNull? ... Your example seems to be an SQL statement. ...
      (microsoft.public.vb.general.discussion)
    • Re: How to retrieve the IDENTITY value after insert into Pointbase database
      ... > The interface I'm writing to expects me to return a SQL statement that will ... > object (or event the Connection object for that matter). ... Alas, until I saw your original post, I'd never heard of PointBase, so I ... Maybe you'd have better luck if you enquired in a PointBase-specific ...
      (comp.lang.java.databases)