Hi to all, I restarted using Juce since a long time.
My target is to connect to SQL Server through ADO.NET commands, but I’m struggling with these compiler output:
..\..\Source\BatchReportContent.cpp(67): error C2512: 'MSSQLProvider' : no appropriate default constructor available
..\..\Source\BatchReportContent.cpp(69): error C2027: use of undefined type 'MSSQLProvider'
..\..\Source\BatchReportContent.cpp(23) : see declaration of 'MSSQLProvider'
..\..\Source\BatchReportContent.cpp(69): error C2227: left of '->Connect' must point to class/struct/union/generic type
..\..\Source\BatchReportContent.cpp(71): error C2027: use of undefined type 'MSSQLProvider'
..\..\Source\BatchReportContent.cpp(23) : see declaration of 'MSSQLProvider'
..\..\Source\BatchReportContent.cpp(71): error C2227: left of '->FillDataSet' must point to class/struct/union/generic type
DASSqlProvider.cpp
..\..\Source\DASSqlProvider.cpp(75): warning C4564: method 'SetNewRecord' of class 'System::Data::DataTable' defines unsupported default parameter 'action'
Specify value '2' explicitly when calling the method
This diagnostic occurred while importing type 'System::Data::DataTable ' from assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
..\..\Source\DASSqlProvider.cpp(75): warning C4564: method 'SetNewRecord' of class 'System::Data::DataTable' defines unsupported default parameter 'isInMerge'
Specify value '0' explicitly when calling the method
This diagnostic occurred while importing type 'System::Data::DataTable ' from assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
..\..\Source\DASSqlProvider.cpp(75): warning C4564: method 'SetNewRecord' of class 'System::Data::DataTable' defines unsupported default parameter 'fireEvent'
Specify value '1' explicitly when calling the method
This diagnostic occurred while importing type 'System::Data::DataTable ' from assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
..\..\Source\DASSqlProvider.cpp(75): warning C4564: method 'SetNewRecord' of class 'System::Data::DataTable' defines unsupported default parameter 'suppressEnsurePropertyChanged'
Specify value '0' explicitly when calling the method
This diagnostic occurred while importing type 'System::Data::DataTable ' from assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Generating Code...
MSSQLProvider class is written inside a managed cpp code, compiling fine.
Inside a juce component constructor I wrote:
//...
class MSSQLProvider;
//...
//[Constructor] You can add your own custom stuff here..
MSSQLProvider* msql = new MSSQLProvider();
msql->Connect("Server=MYPC;Database=MYDB;Trusted_Connection=True;");
msql->FillDataSet("SELECT * FROM MYTABLE WHERE Start <> null AND Stop <> null");
//[/Constructor]
I think it is a big work mixing .NET with Juce, isn’t it?