Logo Search packages:      
Sourcecode: freetds version File versions

void tds_config_verstr ( const char *  tdsver,
TDSCONNECTINFO *  connect_info 
)

Set TDS version from given string

Parameters:
tdsver tds string version
connect_info where to store information

Definition at line 618 of file config.c.

References tds_config_verstr().

Referenced by tds_config_verstr().

{
      if (!strcmp(tdsver, "42") || !strcmp(tdsver, "4.2")) {
            connect_info->major_version = 4;
            connect_info->minor_version = 2;
            return;
      } else if (!strcmp(tdsver, "46") || !strcmp(tdsver, "4.6")) {
            connect_info->major_version = 4;
            connect_info->minor_version = 6;
            return;
      } else if (!strcmp(tdsver, "50") || !strcmp(tdsver, "5.0")) {
            connect_info->major_version = 5;
            connect_info->minor_version = 0;
            return;
      } else if (!strcmp(tdsver, "70") || !strcmp(tdsver, "7.0")) {
            connect_info->major_version = 7;
            connect_info->minor_version = 0;
            return;
      } else if (!strcmp(tdsver, "80") || !strcmp(tdsver, "8.0")) {
            connect_info->major_version = 8;
            connect_info->minor_version = 0;
            return;
      }
}


Generated by  Doxygen 1.6.0   Back to index