Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP VBScript
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 12-Jan-12 16:41pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Similar to above READ operation concept, you can extend INSERT, DELETE and UPDATE operation. If you have any specific query, letz know.
  Permalink  
Comments
Masoud_21 at 14-Jan-12 16:22pm
   
can you write the full code for insert and search into database
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Sample code Read operation:
 
<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>
  Permalink  
Comments
Masoud_21 at 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)

  Print Answers RSS
0 Kornfeld Eliyahu Peter 169
1 Zoltán Zörgő 139
2 George Jonsson 135
3 PIEBALDconsult 130
4 OriginalGriff 120
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,107
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,342


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 12 Jan 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100