Forum Discussion

jasmeenkaur27's avatar
jasmeenkaur27
Contributor
8 years ago

Unable to connect to oracle db

I am getting unspecified error on line Qry1.Open()   Below is the snippet of the code:-     function pdfname() { var Qry1; // Create a query Qry1 = ADO.CreateADOQuery(); // Specify the conne...
  • tristaanogre's avatar
    8 years ago

    I suspect, but am not certain, it's in your query expression.  Change it to the following to ensure that the single quote character actually translates properly.

     

    Qry1.SQL = "Select * FROM table1 WHERE comm_code = \'COT\'";