Jump to content
Fórum Script Brasil
  • 0

Outro Erro


bolomaster

Question

Tipo de erro:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)

[Microsoft][Driver ODBC para Microsoft Access] Erro de sintaxe (operador faltando) na expressão de consulta 'nome = ANDRÉ LUIZ LOPES DE ALMEIDA'.

/atenas/faculdade/db/adm.asp, line 8

Bem pessoal o outro erro.. que esta dando é esse...

ta ai o arquivo

<% 
dim db, rs

set db = Server.CreateObject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.recordset")
db.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & server.mappath("net.mdb")
tblrs = "Select * From alunoss where nome = " & Session("nome")
rs.open tblrs, db
Response.Write "Nome: " & rs.fields("Nome") & "<br>" & "<hr>" & "Matricula: " & rs.fields("Matricula") & "<br>" & "<hr>" & "Data de Nascimento: " & rs.fields("Data_Nascimento") & "<br>" & "<hr>"
rs.close
db.close
%>

se Puderem ajudar agradeço muito

abraços

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
Guest Aprendiz

tipo, troca o comando SQL de:

tblrs = "Select * From alunoss where nome = " & Session("nome")

por

tblrs = "Select * From alunoss where nome = '" & Session("nome") &"'"

espero ter ajudado... valeu!

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
      652k
×
×
  • Create New...