Results 1 to 2 of 2

Thread: Insert Record

  1. #1
    JsShivalik is offline Member
    Join Date
    Nov 2015
    Posts
    5
    Rep Power
    0

    Default Insert Record

    Hi

    I am getting error on the below code

    Error - com.microsoft.sqlserver.jdbc.SQLServerException: Cannot find either column "txtid" or the user-defined function or aggregate "txtid.gettext", or the name is ambiguous.

    try {
    Class.forName("com.microsoft.sqlserver.jdbc.SQLSer verDriver");
    String connectionUrl = "jdbc:sqlserver://localhost:1433;" +
    "databaseName=Test;user=sa;password=test;";
    Connection con = DriverManager.getConnection(connectionUrl);
    Statement stmt = con.createStatement();
    stmt.execute("INSERT INTO customer (custid,custname,custaddress,custcity,custstate,ac tive) "
    + "VALUES (txtid.gettext() ,txtname.gettext(),txtaddress.gettext(),txtcity.ge ttext(),txtstate.gettext(),txtaddress.gettext())") ;


    }
    catch (SQLException e) {
    System.out.println("SQL Exception: "+ e.toString());
    }

    Secondly i want to know when i press . properties box should not appear automatically for e.g when i write txtname.

    Thanks

  2. #2
    JsShivalik is offline Member
    Join Date
    Nov 2015
    Posts
    5
    Rep Power
    0

Similar Threads

  1. Record Editor 0.95
    By java software in forum Java Software
    Replies: 0
    Last Post: 08-07-2013, 06:23 AM
  2. Adding A New Record ID (Help)
    By jaylimix in forum Java Servlet
    Replies: 2
    Last Post: 12-15-2011, 11:19 PM
  3. Replies: 9
    Last Post: 07-09-2011, 07:15 PM
  4. Replies: 3
    Last Post: 02-28-2009, 09:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •