Salve
Come faccio ad eliminare dalla query alcuni campi senza rimuoverli fisicamente dal database?
Ho visto degli esempi in giro ma nessuno sembra adattabile al mio codice che è il seguente:
<%
u_input = trim(request.form("u_input")) 'u_input is the varible for user input
u_input= replace(u_input, "'", "''")
' the trim function removes any blanks around the the use input
u_field=request.form("u_field") 'the dropdown varible for user inputted search field
if u_input <> "" then ' If the user entered a value query the db
accessdb="_ArchivioProgrammi.mdb" ' name of the access db
query_name="ArchivioQ" ' name of the table within the access db
cn="driver={microsoft access driver (*.mdb)};"
cn=cn & "dbq=" & server.mappath(accessdb)
set rs = server.createobject("ADODB.Recordset")
sql = "select * from "& query_name &" where " & u_field & " like '%%" & u_input & "%%' "
qualcuno sa aiutarmi, preciso che il SELECT viene fatto direttamente da query access e non da una tabella, ma forse non interessa ed è la stessa cosa.
grazie
ciao

Rispondi quotando