Jump to content
Fórum Script Brasil
  • 0

conexao dbf via asp


Francisco Soares

Question

Pessoal,

Não estou conseguindo fazer uma conexao via asp. Vocês podem me ajudar?

Segue o desfecho:

Tenho uma tabela dbf, chamada ce5.dbf, que fica na pasta dados. Estou utilizando um script para buscar a informação como consulta.

<%

Busca = Ucase (Request.form("buscando"))

%>

<html>

<head>

<title>Buscando</title>

</head>

<body>

<p>Digite o nome do produto ou marca.</p>

<form action="buscando.asp" method=post>

<input type = text name="buscando" size=20>

<input type = submit value = "Pesquisa">

</form>

<p>

<%

Set banco=server.CreateObject("ADODB.Connection")

banco.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=e:\asp2\estoque\AllBusca.mdb"

Set tb=server.CreateObject ("ADODB.RecordSet")

sql = "SELECT * FROM ce5 WHERE nome LIKE '%"&busca&"%'"

tb.open sql, banco,3,3

if tb.recordcount > 0 then

tb.movefirst

Response.write "<Table cellpading = 0 cellspacing = 0>"

while not tb.EOF

%>

<table width="831" border="1">

<tr>

<td width="56"><strong><%=tb("codigo")%></strong></td>

<td width="556"><%

pc = Replace (tb.fields("nome"),chr(50),"<BR>")

pc = Replace (tb.fields("nome"),busca,"<B>" & Busca & "</b>")

Response.write pc

%></td>

<td width="54"><%=tb("unidade")%></td>

<td width="58"><%=tb("saldo")%></td>

<td width="73">R$ <%=tb("valorv")%></td>

</tr>

</table>

<%

tb.movenext

wend

Response.write "</table>"

Else

Response.write busca

End if

%>

</body>

como faço para mudar essa conexao para dbf sem que prejudique a consulta realzada.

Aguardo repostas

Atenciosamente

Francisco.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...