Jump to content
Fivewin Brasil

Conexão com MariaDB via ODBC


Jmsilva

Recommended Posts

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 )

 

 

Link to comment
Share on other sites

 

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 )

Link to comment
Share on other sites

 

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!

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...