SHARE
TWEET

Untitled

a guest Dec 13th, 2016 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function DBWrite(){
  2. var address ='202.47.118.131:3306';
  3. var user = "root";
  4. var pwd="";
  5. var db= "smsbrn";
  6. var cform=FormApp.getActiveForm();
  7. var formId=cform.getId();  
  8. var dbUrl='jdbc:mysql://' + address + '/' + db;
  9.  
  10. **var conn=Jdbc.getConnection(dbUrl, user, pwd);** //connection fails here.
  11. var stmt=conn.prepareStatement('INSERT INTO smsbrndata(formID,username,pwd,sid,mobile)values(?, ?, ?, ?, ?)');  
  12.   stmt.setString(1,formId);
  13.   stmt.setString(2,form.uname);
  14.   stmt.setString(3,form.password);
  15.   stmt.setString(4,form.sid);
  16.   stmt.setString(5,form.mobile);
  17.   stmt.execute();
  18.  }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top