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 OriginalGriff 381
1 Sergey Alexandrovich Kryukov 265
2 Praneet Nadkar 237
3 Marcin Kozub 225
4 /\jmot 189
0 OriginalGriff 8,284
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,614
3 Maciej Los 4,989
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.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