All Forums >> [Scripting] >> ASP >> Database connection Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Posts: 19
Score: 0
Joined: 5/23/2001
From: USA
Status: offline
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.
Posts: 15
Score: 0
Joined: 5/23/2001
From: USA
Status: offline
Thanks 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")