Forum Discussion

David91's avatar
David91
Frequent Contributor
8 years ago

CreateADOQuery LOG result

Hi,

 

I need from DB using Qry get value from tree column in the table. But only one value (VAL1) is displayed in the log (image in Attachment). But there are all three in db... :( What is the problem?? Thx

    var Qry;
  // Create a query
  Qry = ADO.CreateADOQuery();

 

 Qry.ConnectionString = "Provider=sqloledb;Data Source=SQL\\SQLserver;Initial Catalog=Database;persist security info=True;Integrated Security=SSPI";


  // Specify the SQL expression
  Qry.SQL = "select * from TABLE";

 Qry.Open();
  // Process results and insert data into the test log
  Qry.First();
  while (! Qry.EOF)
  {

    Log.Message(Qry.FieldByName("VAL1").Value);
    Log.Message(Qry.FieldByName("VAL2").Value);
    Log.Message(Qry.FieldByName("VAL3").Value);

    Qry.Next();
  }
  // Closes the query
  Qry.Close();

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    What type of data is on those two missing fields?  Log.Message will log strings/text only so if they are images, blobs, etc., they may not log correctly.