Link to home
Start Free TrialLog in
Avatar of fird
fird

asked on

Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E21) ODBC driver does not support the requested properties.

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
ODBC driver does not support the requested properties.
/vms/editing_vendor.asp, line 133

got this error when i run the system. the code are as follows:
---------------------------

<%
company_id=request.QueryString("company_id")
choice=request.QueryString("choice")

DSN="Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("db/db1.mdb")
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open DSN
Set rs1=Server.CreateObject("ADODB.Recordset")
rs1.Open "SELECT * FROM vendor WHERE company_id='" & company_id &"'", conn, 1 <-- line 133
%>      
<%
if choice=1 then
%>
      <tr>
      <td width="26%" align="left">&nbsp;</td>
      <td width="178%" align="center">&nbsp;</td>
      </tr>
      <tr>
      <td width="26%" align="left">
      <p align="left"><font face="Verdana" size="2">Company name </font>
      </td>
      <td width="178%" align="center">
      <p align="left"><font face="Verdana" size="3">
            <input name="companyname_text" value="<%=rs1("company_name")%>" id="companyname_text" size="50"></font><font face="Verdana" size="2" color="#FF6600">*</font></td>
      </tr>
      <tr>
      <td width="26%" align="left">&nbsp;</td>
      <td width="178%" align="center">&nbsp;</td>
      </tr>
      <tr>
      <td width="26%" align="left">
      <p align="left"><font face="Verdana" size="2">Address </font></td>
      <td width="178%" align="center">
      <p align="left"><font face="Verdana" size="3">
            <input name="address_text" id="address_text" size="50"></font><font face="Verdana" size="2" color="#FF6600">*</font></td>
      </tr>
      <tr>
      <td width="26%" align="left">&nbsp;</td>
      <td width="178%" align="center">&nbsp;</td>
      </tr>
      <tr>
      <td width="26%" align="left">
      <p align="left"><font face="Verdana" size="2">Postcode</font></td>
      <td width="178%" align="center">
      <p align="left"><font face="Verdana" size="3">
            <input name="postcode_text" id="postcode_text" size="27"></font><font face="Verdana" size="2" color="#FF6600">*</font></td>
      </tr>
      <tr>
      <td width="26%" align="left">&nbsp;</td>
      <td width="178%" align="center">&nbsp;</td>
      </tr>
      <tr>
      <td width="26%" align="left">
      <p align="left"><font size="2" face="Verdana">City</font></td>
      <td width="178%" align="center">
      <p align="left"><font face="Verdana" size="3">
            <input name="city_text" id="city_text" size="47"></font><font face="Verdana" size="2" color="#FF6600">*</font></td>
      </tr>
      <tr>
      <td width="26%" align="left">&nbsp;</td>
      <td width="178%" align="center">&nbsp;</td>
      </tr>
      <tr>
      <td width="26%" align="left">
      <p align="left"><font face="Verdana" size="2">State</font></td>
      <td width="178%" align="center">
      <p align="left"><font face="Verdana" size="3"><select name="state_list" size="1" id="state_list">
                <option value="NA">-Select State-</option>
                <option>Johor</option>
                <option>Kedah</option>
                <option>Kelantan</option>
                <option>Melaka</option>
                <option>Negeri Sembilan</option>
                <option>Pahang</option>
                <option>Perak</option>
                <option>Perlis</option>
                <option>Pulau Pinang</option>
                <option>Sabah</option>
                <option>Selangor</option>
                <option>Terengganu</option>
                <option>Labuan</option>
                <option>Kuala Lumpur</option>
                <option>Putrajaya </option>
              </select></font><font face="Verdana" size="2" color="#FF6600">*</font></td>
      </tr>
      <tr>
      <td width="26%" align="left">&nbsp;</td>
      <td width="178%" align="center">&nbsp;</td>
      </tr>
      <tr>
      <td width="26%" align="left">
      <p align="left"><font size="2" face="Verdana">Phone Num.</font></td>
      <td width="178%" align="center">
      <p align="left">
            <font face="Verdana" size="3">
            <input name="phone_text" id="phone_text" size="27"></font><font face="Verdana" size="2" color="#FF6600">*</font></td>
      </tr>
      <tr>
      <td width="26%" align="left">&nbsp;</td>
      <td width="178%" align="center">&nbsp;</td>
      </tr>
      <tr>
      <td width="26%" align="left"><font face="Verdana" size="2">Fax Num.</font></td>
      <td width="178%" align="center">
      <p align="left">
            <font face="Verdana" size="3">
            <input name="fax_text" id="fax_text" size="27"></font></td>
      </tr>
      <tr>
      <td width="26%" align="left">&nbsp;</td>
      <td width="178%" align="center">&nbsp;</td>
      </tr>
      <tr>
      <td width="26%" align="left"><font face="Verdana" size="2">Email</font></td>
      <td width="178%" align="left"><font face="Verdana" size="3">
            <input name="email_text" id="email_text" size="47"></font></td>
      </tr>
      <tr>
      <td width="26%" align="left">&nbsp;</td>
      <td width="178%" align="left">&nbsp;</td>
      </tr>
      <tr>
      <td width="26%" align="left"><font face="Verdana" size="2">Website</font></td>
      <td width="178%" align="left"><font face="Verdana" size="3">
            <input name="website_text" value="http://" id="website_text" size="47"></font></td>
      </tr>
      <tr>
      <td width="26%" align="left">&nbsp;</td>
      <td width="178%" align="left">&nbsp;</td>
      </tr>
      <tr>
      <td width="26%" align="left">&nbsp;</td>
      <td width="178%" align="left">&nbsp;</td>
      </tr>
      <tr>
      <td width="204%" align="left" colspan="2">
      <p align="center"><font face="Arial"><input type="submit" value="Submit" name="Submit"> <INPUT type=reset value=Reset name=Reset></font></td>
      </tr>
      <tr>
      <td width="204%" align="left" colspan="2">
      &nbsp;</td>
      </tr>
      <tr>
        <td width="100%">
        <p align="center">&nbsp;</td>
      </tr>
<%
end if
rs1.close
Conn.close
%>
-------------------------------------

Thanks & Regards
Avatar of hongjun
hongjun
Flag of Singapore image

Make sure company_id has value.
Do a response.write on the variable to confirm.

hongjun
ASKER CERTIFIED SOLUTION
Avatar of hongjun
hongjun
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial