Jmsilva Posted August 4, 2019 Report Share Posted August 4, 2019 Gostaria de conectar no banco MariaDB via ODBC, via Todbc (Odbc Fivewin) ou via SQLRDD (CONNECT_ODBC) e não estou conseguindo. A conexão com MariaDB tem que ser via ODBC, de outras formas consigo fazer normalmente. Já instalei e desinstalei varias vezes a fonte odbc, //Via ODBC da Fivewin - Server 2008 R2 - Funciona cDsn := "driver=SQL Server;server=OROI3\SQLEXPRESS; Database=dbsace;" oOdbc := TOdbc():New(cDsn,'sa','') //Via ODBC da Fivewin - MariaDB 10.3.16 - Não funciona cDsn := "DRIVER={MariaDB ODBC 3.1 Driver}; Server=127.0.0.1; Port=3306; Database=DBSACE" oOdbc := TOdbc():New(cDsn,'root','') Via SQLRDD - SERVER 2008 R2 - ODBC - Funciona cDsn := "driver=SQL Server;server=OROI3\SQLEXPRESS; Database=dbsace; Uid=sa; Pwd=;" nCnn := SR_AddConnection(CONNECT_ODBC,cDSN ) Via SQLRDD - MariaDB - ODBC - Não Funciona cDsn:= "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=dbsace; Uid=root; Pwd=" nCnn := SR_AddConnection(CONNECT_ODBC,cDSN ) Via SQLRDD - MariaDB - Nativo - Funciona cDsn:= "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=dbsace; Uid=root; Pwd=" nCnn := SR_AddConnection(CONNECT_MYSQL,cDSN ) Quote Link to comment Share on other sites More sharing options...
Jmsilva Posted August 4, 2019 Author Report Share Posted August 4, 2019 Gostaria de conectar no banco MariaDB via ODBC, via Todbc (Odbc Fivewin) ou via SQLRDD (CONNECT_ODBC) e não estou conseguindo. A conexão com MariaDB tem que ser via ODBC, de outras formas consigo fazer normalmente. Já instalei e desinstalei varias vezes a fonte odbc, //Via ODBC da Fivewin - Server 2008 R2 - Funciona cDsn := "driver=SQL Server;server=OROI3\SQLEXPRESS; Database=dbsace;" oOdbc := TOdbc():New(cDsn,'sa','') //Via ODBC da Fivewin - MariaDB 10.3.16 - Não funciona cDsn := "DRIVER={MariaDB ODBC 3.1 Driver}; Server=127.0.0.1; Port=3306; Database=DBSACE" oOdbc := TOdbc():New(cDsn,'root','') Via SQLRDD - SERVER 2008 R2 - ODBC - Funciona cDsn := "driver=SQL Server;server=OROI3\SQLEXPRESS; Database=dbsace; Uid=sa; Pwd=;" nCnn := SR_AddConnection(CONNECT_ODBC,cDSN ) Via SQLRDD - MariaDB - ODBC - Não Funciona cDsn:= "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=dbsace; Uid=root; Pwd=" nCnn := SR_AddConnection(CONNECT_ODBC,cDSN ) Via SQLRDD - MariaDB - Nativo - Funciona cDsn:= "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=dbsace; Uid=root; Pwd=" nCnn := SR_AddConnection(CONNECT_MYSQL,cDSN ) // Via SQLRDD - MariaDB - ODBC - Não Funciona cDsn:= "DRIVER={MariaDB ODBC 3.1 Driver}; SERVER=localhost; DATABASE=dbsace; Uid=root; Pwd=" nCnn := SR_AddConnection(CONNECT_ODBC,cDSN ) Via SQLRDD - MariaDB - Nativo - Funciona cDsn:= "DRIVER={MariaDB ODBC 3.1 Driver}; SERVER=localhost; DATABASE=dbsace; Uid=root; Pwd=" nCnn := SR_AddConnection(CONNECT_MYSQL,cDSN ) Quote Link to comment Share on other sites More sharing options...
evandro Posted August 5, 2019 Report Share Posted August 5, 2019 Olá, Conecte via FW. Tem exemplos na respectiva pasta. Quote Link to comment Share on other sites More sharing options...
Jmsilva Posted August 5, 2019 Author Report Share Posted August 5, 2019 Olá, Conecte via FW. Tem exemplos na respectiva pasta. Evandro, Obrigado! Pela Fivewin com função Maria_Connect() consigo conectar sem problemas! Para o teste que estou fazendo precisava conectar com SQLDriverConnect() (odbc fivewin) ! No Server 2008 R2 conecta sem problemas, só não estou conseguindo conectar desta mesma forma no MariaDB. Acredito que o problema está no fonte ODBC, mas não consegui identificar! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.