Integration Your Way - (800) 235-7250
RSSBus JDBC Driver for MSCRM
Questions / Feedback? INSERT Statements

INSERT Statements

To insert into a table, use the standard INSERT SQL syntax.

  INSERT INTO Lead (FullName) VALUES ('John Smith')

  String cmd = "INSERT INTO Lead (FullName) VALUES (?)";
  PreparedStatement pstmt = conn.prepareStatement(cmd);
  pstmt.setString(1, "John Smith");
  int count=pstmt.getUpdateCount();
  pstmt.execute();
  if (count!=-1)
  {
    System.out.println(count+" rows are affected");
  }

To insert into a table, use the standard INSERT SQL syntax.

  INSERT INTO Lead (FullName) VALUES ('John Smith')

  String cmd = "INSERT INTO Lead (FullName) VALUES (?)";
  PreparedStatement pstmt = conn.prepareStatement(cmd);
  pstmt.setString(1, "John Smith");
  int count=pstmt.getUpdateCount();
  pstmt.execute();
  if (count!=-1)
  {
    System.out.println(count+" rows are affected");
  }


 
Copyright © 2013 RSSBus Inc.
[x] close

Questions / Feedback?


Name:
Email:
Feedback:
Send Feedback