object required 'Server' error
I am getting an error n the Server.CreateObject line in the below sub. I use this same way to connect to dbases throughout the rest of the code. Any ideas why it isnt working here?
<script language=vbscript>
sub getzip(txtzip)
dim cn,rs
Set cn = Server.CreateObject("ADODB.Connection")
cn.Open Application("OpenStr")
set rs = Server.CreateObject("ADODB.Recordset")
sqlstr = "SELECT county from zipcounty where zip = "+CSTR(RTRIM(LTRIM(txtzip)))
set rs = cn.Execute(sqlstr)
if not rs.eof then
MyForm.tcounty.value = rs("county")
end if
rs.close
set rs = nothing
cn.close
set cn = nothing
end sub
</script>
http://linc.homeunix.org:8080/fc
http://kenbrownvfp.tripod.com/
Bookmarks