On a simple page in VB ASP.NET I get an error with the SQL connection:
The multi-step operation of OLE DB generated errors. Check the OLE DB status values if possible. No work was done.
I am new in the VB language, I leave a sample of my code
<%@ Page aspcompat=true Language="vb" AutoEventWireup="false" CodeBehind="buscar.aspx.vb" Inherits="buscador_yuyin.WebForm1" %>
Seeker
Results obtained with <% = Request ("Word")% >
<%
Dim Conexion, Tabla
Conexion = Server.CreateObject("adodb.connection")
Tabla = Server.CreateObject("adodb.recordset")
Conexion.ConnectionString = "PROVIDER=SQLOLEDB;Data Source=TEST-PC\VIRTUAL;DATABASE=prueba;Integrated Security=True"
Conexion.open()
Dim Temp
Temp = "Select * From busqueda('" & Request("palabra") & ")'"
Tabla.Open(Temp, Conexion)
If Tabla.BOF And Tabla.EOF Then
%>
<p><font face="Tahoma" size="2">No se ha encontrado nada con <strong><%=Request("palabra")%></strong> en la Base de Datos</font></p>
<%
Else
%>
<div align="center"><center>
<table border="1" cellpadding="0" cellspacing="0" width="100%" height="74" bordercolor="#C0C0C0">
<tr>
<td width="28%" height="19">
<p align="center"><strong><font face="Tahoma" size="2">Categoria</font></strong>
</td>
<td width="28%" height="19">
<p align="center"><strong><font face="Tahoma" size="2">Producto</font></strong></p>
</td>
<td width="52%" height="19">
<p align="center"><strong><font face="Tahoma" size="2">Descripcion</font></strong>
</td>
<td width="19%" height="19">
<p align="center"><strong><font face="Tahoma" size="2">Url</font></strong></p>
</td>
</tr>
<% While Not Tabla.EOF%>
<tr>
<td width="28%" bgcolor="#FFCC00" height="51">
<p align="center"><font face="Tahoma" size="2"><%=Tabla.Fields("Categoria")%></font></td>
<td width="28%" bgcolor="#FFCC00" height="51">
<p align="center"><font face="Tahoma" size="2"><%=Tabla.Fields("Nombre")%></font></td>
<td width="52%" bgcolor="#FFCC00" height="51">
<p align="center"><font face="Tahoma" size="2"><%=Tabla.Fields("Descripcion")%></font></td>
<td width="19%" bgcolor="#FFCC00" height="51">
<p align="center"><a href="<%=Tabla.Fields("url")%>"><font face="Tahoma" size="2">Img</font></a>
</tr>
<%
Tabla.MoveNext
End While
Tabla.Close
Conexion.Close
End If
%>
</table>
</center></div>
<p align="center"><font face="Tahoma" size="2">Busquedas</font></p>
<p align="center"><font face="Tahoma" size="2">2002</font></p>
<p align="center"> </p>
</body>