Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression., SQL state 22005 in SQLExecDirect in C:\HTTPD\HTDOCS\hr\add_result.php on line 49

can u tell me what's wrong with this? and how do i solve the problem? hee.. thanx in advance! ^ ^

    typically it means you're trying to do something like add a VARCHAR & an INT. make sure the type of data you're working with matches up with the columns in the DB.

      hello Brandon Schnell,

      how to convert from varchar to int??
      which command should i use??
      in my DB, the field(loc_id) is in auto-number...

      thank you again and again~~

        what is the sql command its failing on and what does your db table look like?

          else if($location_name=="")
          {

          		 $result3=odbc_exec($con, "select location from location, data where loc_id='$location_id'");
          
          
          				echo" Location: ".odbc_result($result3, "location")."<br>";

          the above code is what i wrote, and i wanna display the location from the pull menu.

            i solved the problem...
            thanx alot too

              Write a Reply...