Uploaded image for project: 'MariaDB Connector/ODBC'
  1. MariaDB Connector/ODBC
  2. ODBC-396

Classic asp recordcount not working

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 3.1.18, 3.1.19
    • N/A
    • General
    • None
    • windows 10, IIS 10, mariadb 10.11.2

    Description

      Retrieve recordcount property from an ADO recorset give everytime -1, i tried all combination of cursortype and locktype, nothing changed. Tried also use movelast and movefirst as suggested on forums in the web but the problem persists.
      Run this code to reproduce the issue
      <%
      Set Conn = Server.CreateObject("ADODB.Connection")
      Conn.Open("DRIVER=

      {MariaDB ODBC 3.1 Driver}

      ;port=3306;SERVER=127.0.0.1;UID=XXX;PWD=XXX;database=test;charset=UTF8;")
      SQL = "SELECT codArch FROM archivi;"

      set RS = Server.CreateObject("ADODB.RecordSet")
      RS.open SQL,conn, 1, 3
      'RS.movelast
      'RS.movefirst
      response.Write "record: "& RS.recordCount

      RS.close
      set RS = Nothing
      Conn.close
      set Conn = Nothing
      %>

      the table structure is
      CREATE TABLE IF NOT EXISTS `archivi` (
      `codarch` int(11) NOT NULL DEFAULT 0,
      `codcli` int(11) DEFAULT NULL,
      `descrizione` char(50) DEFAULT NULL,
      `perc` char(255) DEFAULT NULL,
      `mariadb` char(50) DEFAULT NULL,
      `codtipoarch` int(11) DEFAULT NULL,
      `Bloccato` int(11) DEFAULT NULL,
      `controlloRichieste` int(11) DEFAULT NULL,
      `dataCaricamentoDoc` char(50) DEFAULT NULL,
      `ordine` int(11) DEFAULT NULL,
      `visibile` int(11) DEFAULT NULL,
      `codStatoArch` int(11) DEFAULT NULL,
      `dataRitiro` datetime DEFAULT NULL,
      `dataMacero` datetime DEFAULT NULL,
      PRIMARY KEY (`codarch`),
      KEY `codarch` (`codarch`),
      KEY `codtipoarch` (`codtipoarch`)
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

      Attachments

        Issue Links

          Activity

            People

              Lawrin Lawrin Novitsky
              abellos Simone Abello
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.