Jump to content
Fórum Script Brasil
  • 0

Conexão Ao Banco De Dados


Guest Marcel

Question

3 answers to this question

Recommended Posts

  • 0
Guest -Spawn_/V\_-

Qual BD?

O q você já tem?

Está com erro?

Ajude-nos a ajudá-lo.

Poste o seu cód com erro, o erro que está dando e poderemos ver se fazemos algo para ti.

Link to comment
Share on other sites

  • 0

se você quer colocar os dados de um formuladrio no banco de dados é so faze o seguinte:

form.asp

<form name="form1" method="post" action="valida.asp">
<input type="text" name="texto">
<input type="submit" name="Submit" value="Submit">
</form>
valida.asp
<%
texto = request.form("texto")

Set db = Server.CreateObject("ADODB.Connection")
conexao = "DBQ=" & Server.MapPath("db.mdb")
DB.Open "DRIVER={Microsoft Access Driver (*.mdb)};" & conexao

sql="insert into <tabela> (<campo>) VALUES ('"&texto&"')
db.execute(sql)

respose.write ('dados gravados')
%>

:D

Link to comment
Share on other sites

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.1k
    • Total Posts
      651.8k
×
×
  • Create New...