Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connection String

Status
Not open for further replies.

78aqm

Programmer
Apr 27, 2002
2
MX
Hello, I am learning how to make a connection between ASP and an Access data base.

I’ve read in a book that a code like this should work:
Code:
<%
Dim objConn
set objConn = Server.CreateObject (&quot;ADODB.Connection&quot;)
objConn.ConnectionString=&quot;DRIVER={Microsoft Access Driver(*.mdb)};&quot; & &quot;DBQ=D:\Documents and Settings\Administrador\Escritorio\MundodeProductos.mdb&quot;
objConn.Open
objConn.Close
set objConn = Nothing
%>

but I get this error:
HTTP 500.100.Error interno del servidor: error de ASP Servicios de internet information server.
Microsoft OLE DB Provider for ODBC Drivers(0x80004005)
[Microsoft] [Administrador de controladores ODBC] No se encuentra el nombre del origen de datos y no se especifico ningun controlador predeterminado

TRANSLATION(something like this):
“The name for the data source is not found, and a driver hasn’t been set”
**********************************
If I change the Connection String to:
Code:
objConn.ConnectionString= &quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Documents and Settings\Administrador\Escritorio\MundodeProductos.mdb&quot;

OR

Code:
objConn.ConnectionString = &quot;DSN=Acuilo.dsn&quot;
(I’ve made an Acuilo.dsn)

then the connection works fine, so my question is:
why the ConnectionString: &quot;DRIVER={Microsoft Access Driver(*.mdb)};&quot; & &quot;DBQ=D:\Documents and Settings\Administrador\Escritorio\MundodeProductos.mdb&quot;
dosen’t work, and what do I have to do to make it work.

If the book saids that it works, why do I get an error

Thanks for your time
78aqm
 
[tt]Que clase the software usas para crear la coneccion?[tt]

[flowerface]
 

remove the { and } around the driver clause. codestorm
Fire bad. Tree pretty. - Buffy
Hey, I'm operating on a limited mental budget here.
<insert witticism here>
 
CDN Gracias por leer mi pregunta. Uso Win 2000 Server y escribo el codigo en Microsoft Visual InterDev.
Saludos 78aqm.
georgeous thanks for the URL.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top