<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Reading text fields from a database in IVF in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-text-fields-from-a-database-in-IVF/m-p/840032#M58001</link>
    <description>Greetings,&lt;BR /&gt;I am just guessing as I haven't seen your database, but the "TEXT" fields are probably stored as variable length character attributes(tuples). As I do not use ADO calls, I cannot give you the correct codes, but believe that there is one for what is known as a Varchar or Nchar.</description>
    <pubDate>Tue, 13 Sep 2005 01:30:16 GMT</pubDate>
    <dc:creator>ronald_g_guenther</dc:creator>
    <dc:date>2005-09-13T01:30:16Z</dc:date>
    <item>
      <title>Reading text fields from a database in IVF</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-text-fields-from-a-database-in-IVF/m-p/840031#M58000</link>
      <description>Hi -&lt;BR /&gt;&lt;BR /&gt;I can read integer data from a database. For example to read a 16-bit integer, I can use the following snippet&lt;BR /&gt;&lt;BR /&gt;integer(2) :: dataField1&lt;BR /&gt;type(variant) :: vBstr1, vTName&lt;BR /&gt;integer(4) ADOField, ADORecSet&lt;BR /&gt;&lt;BR /&gt;call $Recordset_Movenext(ADORecSet, status)&lt;BR /&gt;ADOField = Fields_GetItem(ADORecSet, vBSTR1, status)&lt;BR /&gt;vTName = Field_GetValue(ADOField, status)&lt;BR /&gt;dataField1 = vtName%vu%short_val&lt;BR /&gt;print *,"Field 1 ",dataField1&lt;BR /&gt;&lt;BR /&gt;and everything works fine. But I can't figure out the "magic combination" to read text data. I can obtain the contents of the field with&lt;BR /&gt;&lt;BR /&gt;ADOField2 = Fields_GetItem(ADORecSet,vBSTR2,status)&lt;BR /&gt;vTName = Field_GetValue(ADOField,status)&lt;BR /&gt;&lt;BR /&gt;but can't figure out how to get from there to a string. I tried, for example,&lt;BR /&gt;&lt;BR /&gt;character(50) :: dataField2&lt;BR /&gt;&lt;BR /&gt;dataField2 = vTName%vu%char_val&lt;BR /&gt;print *,"Field 2 ",dataField2&lt;BR /&gt;&lt;BR /&gt;but that just returns a single wide character. I looked for a string_val on vTName in the debugger but didn't find one. I suspect that I want to use the ptr_val of VTName and then ConvertBSTRToString, but so far I can't get the details correct.&lt;BR /&gt;&lt;BR /&gt;Any help/references would be appreciated.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;BR /&gt;&lt;BR /&gt;david</description>
      <pubDate>Tue, 16 Aug 2005 02:59:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-text-fields-from-a-database-in-IVF/m-p/840031#M58000</guid>
      <dc:creator>monarchi</dc:creator>
      <dc:date>2005-08-16T02:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: Reading text fields from a database in IVF</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-text-fields-from-a-database-in-IVF/m-p/840032#M58001</link>
      <description>Greetings,&lt;BR /&gt;I am just guessing as I haven't seen your database, but the "TEXT" fields are probably stored as variable length character attributes(tuples). As I do not use ADO calls, I cannot give you the correct codes, but believe that there is one for what is known as a Varchar or Nchar.</description>
      <pubDate>Tue, 13 Sep 2005 01:30:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Reading-text-fields-from-a-database-in-IVF/m-p/840032#M58001</guid>
      <dc:creator>ronald_g_guenther</dc:creator>
      <dc:date>2005-09-13T01:30:16Z</dc:date>
    </item>
  </channel>
</rss>

