Click here to Skip to main content
15,889,883 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I want know how do I connecting to Ms-access database and insert,delete,search into it with VBScript.

****please describe with an example****

Please help me
Posted

Similar to above READ operation concept, you can extend INSERT, DELETE and UPDATE operation. If you have any specific query, letz know.
 
Share this answer
 
Comments
Masoud_21 14-Jan-12 16:22pm    
can you write the full code for insert and search into database
Sample code Read operation:

XML
<html>
<Title> Read MS Access using VBScript </Title>
<body>

<h2>Employee List, sorted by Employee ID.</h2><br>

<TABLE border="1">
   <TR>
      <TD><B>ID</a></B></TD>
      <TD><B>Name</a></B></TD>
   </TR>

<%
Set MyConn = Server.CreateObject("ADODB.Connection")
MdbFilePath = Server.MapPath("Employee.mdb")
MyConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & MdbFilePath & ";"
SQL_query = "SELECT EmpID, EmpName "&_
               "FROM EmployeeTable "&_
               "ORDER BY ID;"
Set RS = MyConn.Execute(SQL_query)
WHILE NOT RS.EOF
%>

<TR>
   <TD><%=RS("EmpID")%></TD>
   <TD><%=RS("EmpName")%></TD>
</TR>

<%
RS.MoveNext
WEND
RS.Close
set RS = nothing
MyConn.close
set MyConn = nothing
%>

</TABLE>
</body>
</html>
 
Share this answer
 
Comments
Masoud_21 14-Jan-12 11:06am    
thank u GanesanSenthilvel ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900