I hope someone can assist me with this. I have not been using the UniDac controls for a long time due to the Bad handshake error that I experience a long time ago. I have updated to the current version I am permitted to under my login which is version 140 in the hope that these controls would now work. Well it seems that I still have some problems.
1- The first problem I am having is that if I try and use an ODBC connection with the following :
HdbcDB = new TUniConnection(NULL) ;
HdbcDB->LoginPrompt = false ;
HdbcDB->ProviderName = "ODBC" ;
HdbcDB->Server = "TestDB2" ; //"Show35128" ;
HdbcDB->Username = "root" ;
HdbcDB->Password = "password" ;
The Server value above never gets set, it remains as null. The DSN is defined in the ODBC DSN settings of windows. I don't understand why this would be as the other valuse such as Providername, Username,Password all get set properly. If I set the settings at design time then the values are all set and the connection does open the database.
2- The next problem is that I am getting an exception when I call the an execute on the database like the following :
So what happens is I open the database, set the connection to the HstmtDatabase from design time connection ( because I cannot do it via code as per the first problem), set the sql statement in the HstmtDatabase->SQL as shown and then execute the statement on the database. As soon as the execute statement is issued I get the following exception from the try catch of the devart control.
Exception - Execute For Data : Access violation at address 0045830E in module 'DevartTest.exe'. Write of address 0057A2B8
I do not have any other problems with any other controls other then these unidac controls.
The code is as follows.
Code: Select all
HstmtDatabase>SQL>Clear() ;
HstmtDatabase->SQL->Add(SQLCommand ) ;
try{
HstmtDatabase->Execute() ;
DisplayText = "Successful Data Aquisition" ;
}
catch( Exception &E )
{
DisplayText = "Exception - Execute For Data : " ;
DisplayText += E.Message ;
ShowTraceInfo(DisplayText) ;
}
I am using Builder 2010 and have installed it a number of time with the UniDac controls and still cannot get rid of the problem. Now I know 2010 is a bit old now, but these controls should still work with this version as I have downloaded the 2010 version of them again. I have tried the trial version of the latest version and still have the same problem.
Again, I have tried to make these controls work over and over again, by installing on a fresh machine and I still have the same problem.
I am a bit frustrated as I have never gotten these controls to work and I do not really want to invest in any more money on controls that just won't work.
So does anyone have any assistance they coyld provide me with to help me in this problem. I am also willing to allow support to come into my machine and assist me, but they have never taken me up on thos offer.
Please someone assist me.
Thanks
Mike