questa la funzione
codice:
'---Funzione Crea ListBox
function Crea_Listbox(Campo_Valore, Campo_Nome, Tabella, Nome_listbox)
Temp="<select name='"&Nome_listbox&"' class='caselladitesto'>" & chr(10)
Temp=Temp & "<option value=''></option>" & chr(10)
sql="select "&Campo_Valore&", "&Campo_Nome&" from "&Tabella&" "
Set rs = Cnn.Execute(sql)
do while not rs.eof
Temp=Temp & "<option value='" & RS(Campo_Valore) & "'>" & left(lcase(RS(Campo_Nome)),17) & "</option>" & chr(10)
rs.movenext
loop
rs.close
set rs=nothing
Temp=Temp & "</select>"
Crea_Listbox=Temp
end function
questo l'errore che ricevo
passando come campo_valore tariffa
campo_nome NStato
tabella Nazioni
nome_listbox Stati
codice:
Microsoft JET Database Engine error '80040e14'
The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.
/ecomm/include/inc_function.asp, line 139
questa la linea 139
sql="select "&Campo_Valore&", "&Campo_Nome&" from "&Tabella&" "
Set rs = Cnn.Execute(sql) <------