ASP   21

ADODB Connection

Guest on 10th June 2022 01:32:14 AM

  1. <%@language="JavaScript"%>
  2. <%
  3.   var Conn = XXXXXXXXXXXXXXXXXXX("ADODB.Connection");
  4.  
  5.   var cstr="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\tcsc318asp\\Database1.accdb;Persist Security Info=False;";
  6.  
  7.   Conn.Open(cstr);
  8.   var RS = XXXXXXXXXXXXXXXXXXX("ADODB.Recordset");
  9.  
  10.   var t1="delete from user_account where username='Dianna'";
  11.   RS.Open(t1,Conn);
  12.   var sqlstmt1 = "update user_account set user_password='555' where username='Fatiah'";
  13.   RS.Open( sqlstmt1, Conn);
  14.   var sqlstmt = "SELECT * FROM user_account";
  15.   RS.Open( sqlstmt, Conn);
  16.  
  17. %>
  18. <html> <body>
  19. <%
  20.   while ( ! RS.EOF ) {
  21.     a = RS.Fields.Item("username").value;
  22.     b = RS.Fields.Item("user_password").value;
  23.     c = RS.Fields.Item("user_group").value;
  24.     XXXXXXXXXXXXXX( a + " - " + b + " - " + c + "<br>");
  25.     RS.MoveNext();
  26.   }  %>
  27. <body> </html>
  28. <%
  29.   RS.Close()
  30.   Conn.Close()
  31. %>

Raw Paste


Login or Register to edit or fork this paste. It's free.