[AccessD] ADO Connection from FORM

MastercafeCTV mastercafe at ctv.es
Sat Nov 8 15:51:26 CST 2003


We are trying to connect from a FORM to and external MYDATA.MDB on a server.

We are sure that ADODB could be use but we only use ASP forms to make this
and put over the server.
On the ASP page is very simple to connect :
<CODE>
Set Ob_Conn=Server.CreateObject("adodb.connection") 
Set Ob_RS=Server.CreateObject("adodb.recordset") 
Ob_Conn.Open "Driver={Microsoft Access Driver (*.mdb)}; " & "Dbq=" &
Server.MapPath("datos.mdb")
Sql= "SELECT *  FROM productos where familiaid='"&cadena&"'  order by
codigo"
Ob_RS.open  Sql,Ob_Conn,adOpenStatic, adCmdTable
Ob_RS.PageSize = 6
Ob_RS.AbsolutePage=Session("pagina") 
</CODE>

But to make the same on a simple FORM like a RecordSource?? Or in VB into de
form to collect some data to visualize ??

Thanks

Juan Menéndez

===========================================
MASTERCAFE SL - NIF B-82.617.614
www.mastercafe.com
Deleg. Asturias 
Tel 985.88.49.44 / 627.531.764
Fax 627.500.205
info at mastercafe.com
juan at mastercafe.com
Deleg. Madrid
Tel 627.474.285
cecilia at mastercafe.com
===========================================



More information about the AccessD mailing list