That's a very demanding task for VBScript.
Just what are you trying to achieve.
Might be easier to write the data access in a VB DLL and call it from VBScript.
Anyway, to access a MDB from a datagrid:
First, I would use either the reference or object tags so that VBScript would recognize the data grid and the ADO Recordset library.
Second, within the reference and object tags I would set the properties of the data grid including what database it is to be connected to.
Third, I'd write the SQL statements to access the database.
Thanks jerjim but can you be more broader with that ? Here a sample of my code as soon as i click the browse button an error occurs "Object Required : server"
<html>
<head>
<title>PC Inventory System</title>
<script language="VBScript" RUNAT="server">
<!--
sub cmdbrowse_onclick
msgbox "hello"
dim Conn, RS, strConn, sqlStatement
Set Conn = server.createobject("ADODB.Connection"
<html>
<head>
<title>
Connection Test
</title></head>
<body>
<%
dim myConn
set myConn = server.createobject("ADODB.Connection"
myConn.Open ODBCtest
If myConn.state = 1 then
response.write("Connection opened successfully<p>"
else
response.write("Error. Connection could not be opened.<P>"
end if
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.