Hello,
I'm trying to connect to one MS SQL Server, for that I'm using the following library: https://github.com/mustafakemalgilor/arduino-mssql
I'm using the sample code just to test me connections the sample code is the following:
#include <Ethernet.h>
#include "sqlard.h"
uint8_t Ethernet_MacAddr[6] = { 0x74,0x69,0x69,0x2D,0x30,0x31 }; /* MAC ADRESİ */
static byte Static_IPAddr[] = { 172,16,1,2 };
static byte Gateway_IPAddr[] = { 172,16,1,1 };
static byte Subnet_Mask[] = { 255,255,0,0 };
EthernetClient client;
SQLard MSSQL(Gateway_IPAddr, 1433, &client);
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
while (!Serial);
Ethernet.begin(Ethernet_MacAddr, Static_IPAddr, Gateway_IPAddr, Gateway_IPAddr, Subnet_Mask);
if(MSSQL.connect())
{
MSSQL.setCredentials(L"arduino", L"ard_login",L"ard_password",L"hostx");
MSSQL.login();
}
}
void loop() {
// put your main code here, to run repeatedly:
int loop_count = 0;
delay(5000);
long affected_rows = MSSQL.executeNonQuery(L"INSERT INTO [dbo].[test]([data]) VALUES('deger1234') ");
long yeni = MSSQL.executeNonQuery(L"DROP TABLE [dbo].[test23]");
Serial.print(affected_rows);
Serial.println(" row(s) affected.");
if (!client) {
Serial.println("disconnecting.");
client.stop();
}
if(++loop_count == 10)
{
MSSQL.executeNonQuery(L"DELETE FROM [dbo].[test]");
loop_count = 0;
}
}
I'm getting this error: arduino-mssql-master/sqlard.h:13:12: fatal error: UIPEthernet.h: No such file or directory Utilizado: C:\Arduino\libraries\Ethernet
After installing UIPEthernet library I get the following errors when compiling:
In file included from C:\Documents\Arduino\libraries\UIPEthernet/utility/mempool_conf.h:5:0,
from C:\Documents\Arduino\libraries\UIPEthernet/utility/mempool.h:28,
from C:\Documents\Arduino\libraries\UIPEthernet/utility/Enc28J60Network.h:28,
from C:\Documents\Arduino\libraries\UIPEthernet/UIPEthernet.h:35,
from C:\Documents\Arduino\libraries\arduino-mssql-master/sqlard.h:13,
from C:\sqlard_test\sqlard_test.ino:2:
C:\Documents\Arduino\libraries\UIPEthernet/utility/uipopt.h:97:4: warning: #warning "Endianness configured automaticaly." [-Wcpp]
#warning "Endianness configured automaticaly."
^~~~~~~
In file included from C:\Documents\Arduino\libraries\UIPEthernet/UIPClient.h:37:0,
from C:\Documents\Arduino\libraries\UIPEthernet/UIPEthernet.h:41,
from C:\Documents\Arduino\libraries\arduino-mssql-master/sqlard.h:13,
from C:\sqlard_test\sqlard_test.ino:2:
C:\Documents\Arduino\libraries\UIPEthernet/utility/logging.h:24:2: warning: #warning "You can configure LogObject and ACTLOGLEVEL in 'utility/logging.h'. More verbosity more memory usage." [-Wcpp]
#warning "You can configure LogObject and ACTLOGLEVEL in 'utility/logging.h'. More verbosity more memory usage."
^~~~~~~
In file included from C:\Documents\Arduino\libraries\UIPEthernet/UIPEthernet.h:37:0,
from C:\Documents\Arduino\libraries\arduino-mssql-master/sqlard.h:13,
from C:\sqlard_test\sqlard_test.ino:2:
C:\Documents\Arduino\libraries\UIPEthernet/Dhcp.h:153:7: error: redefinition of 'class DhcpClass'
class DhcpClass {
^~~~~~~~~
In file included from C:\sqlard_test\sqlard_test.ino:1:0:
C:\Documents\Arduino\libraries\Ethernet\src/Ethernet.h:273:7: note: previous definition of 'class DhcpClass'
class DhcpClass {
^~~~~~~~~
In file included from C:\Documents\Arduino\libraries\arduino-mssql-master/sqlard.h:13:0,
from C:\sqlard_test\sqlard_test.ino:2:
C:\Documents\Arduino\libraries\UIPEthernet/UIPEthernet.h:69:6: error: multiple definition of 'enum EthernetLinkStatus'
enum EthernetLinkStatus {
^~~~~~~~~~~~~~~~~~
In file included from C:\sqlard_test\sqlard_test.ino:1:0:
C:\Documents\Arduino\libraries\Ethernet\src/Ethernet.h:56:6: note: previous definition here
enum EthernetLinkStatus {
^~~~~~~~~~~~~~~~~~
In file included from C:\Documents\Arduino\libraries\arduino-mssql-master/sqlard.h:13:0,
from C:\sqlard_test\sqlard_test.ino:2:
C:\Documents\Arduino\libraries\UIPEthernet/UIPEthernet.h:75:6: error: multiple definition of 'enum EthernetHardwareStatus'
enum EthernetHardwareStatus {
^~~~~~~~~~~~~~~~~~~~~~
In file included from C:\sqlard_test\sqlard_test.ino:1:0:
C:\Documents\Arduino\libraries\Ethernet\src/Ethernet.h:62:6: note: previous definition here
enum EthernetHardwareStatus {
^~~~~~~~~~~~~~~~~~~~~~
Foram encontradas múltiplas bibliotecas para «Ethernet.h»
Utilizado: C:\Documents\Arduino\libraries\Ethernet
Não utilizado: C:\Documents\Arduino\libraries\UIPEthernet
exit status 1
Error compiling to Arduino Uno.
Can someone help me figure out why I'm getting all these errors now?
Thanks