0 Replies Latest reply on Oct 15, 2014 1:04 PM by halen99

    How to reference string in sql statement

    halen99

      Here's what I'm trying to do

       

      <cfscript>

      j=createobject("java", "java.net.InetAddress");

      m=createobject("java", "java.net.NetworkInterface");

      a=j.getLocalHost();

      mac=m.getByInetAddress(a).getHardwareAddress();

      </cfscript>

       

      <!--- Get all records from the database that match this users credentials --->

      <cfquery name="qVerify" datasource="ABCD">

      SELECT *

      FROM MobileUsers

      WHERE Mac = '#mac#'

      </cfquery>

       

      -- and I get: 

      ByteArray objects cannot be converted to strings

       

      I've tried to convert mac to a string and it does without error but them my mac var turns into what looks like binary data.  There has to be a more simple way that works

       

      Eddie