Additional
AnyDAC
SimpleIAX
Forums
Welcome, Guest
Please Login or Register to post messages. Lost Password?
MYSQL - ReportBuilder - tadautoincfield problem
(1 viewing) 1 Guest
Go to bottom
TOPIC: MYSQL - ReportBuilder - tadautoincfield problem
#20463
TSupport
Moderator
Posts: 348
graphgraph
Karma: 10
User Offline Click here to see the profile of this user
Re:MYSQL - ReportBuilder - tadautoincfield problem 2012/03/25 23:21 (1 Year, 1 Month ago)
Lorenzo,

I added the code for 4) and 5) as I did find cases when RB tried to select the record set from the tables while it required just the field names.
Since it's hard to keep yours and mine version synchronized, I better send my latest version to your email address.
This way you can merge my changes with your unit version.
With best regards,
DA-SOFT Technologies Support Team
Logged Logged
The administrator has disabled public write access.
#20468
lorife
Platinum Boarder
Posts: 354
graphgraph
Karma: 1
User Offline Click here to see the profile of this user
Re:MYSQL - ReportBuilder - tadautoincfield problem 2012/03/26 01:43 (1 Year, 1 Month ago)
Hi,

thank you so much for your help, unfortunately I have to ask you something more:

I know you told me I cannot use your plugin...but I don't understand what's wrong with it, I compared it with mine and I can't seem to find any modification I shouldn't use.

What are the lines in your file I can't use?

thanks..
Logged Logged
The administrator has disabled public write access.
#20470
TSupport
Moderator
Posts: 348
graphgraph
Karma: 10
User Offline Click here to see the profile of this user
Re:MYSQL - ReportBuilder - tadautoincfield problem 2012/03/26 01:54 (1 Year, 1 Month ago)
Lorenzo,

In your version GetTableNames method of AnyDAC Session should differ with my version. If you will use my version with your trial sources, you won't be able to list Informix tables then.
Since we made several fixes in the sources, the plug-in had to be changed as well.
With best regards,
DA-SOFT Technologies Support Team
Logged Logged
The administrator has disabled public write access.
#20472
lorife
Platinum Boarder
Posts: 354
graphgraph
Karma: 1
User Offline Click here to see the profile of this user
Re:MYSQL - ReportBuilder - tadautoincfield problem 2012/03/26 02:05 (1 Year, 1 Month ago)
There has to be something more.

I'm getting another error:

AnyDAC - Phys - ODBC -355 Parameter tsnord datatype is unknown. Hint: Specify Tadparam.datatype or Assign TADParam value before prepare/execute call.

I tried with the original version supplied with the anydac version I have and i'm not getting that error so it has to be something in this version, but i can't find what's the problem.

Any idea?
Logged Logged
The administrator has disabled public write access.
#20473
TSupport
Moderator
Posts: 348
graphgraph
Karma: 10
User Offline Click here to see the profile of this user
Re:MYSQL - ReportBuilder - tadautoincfield problem 2012/03/26 02:19 (1 Year, 1 Month ago)
When exactly this error occurs? After you have linked the queries? If so, we'd need table definitions to reproduce this + some steps.
With best regards,
DA-SOFT Technologies Support Team
Logged Logged
The administrator has disabled public write access.
#20474
lorife
Platinum Boarder
Posts: 354
graphgraph
Karma: 1
User Offline Click here to see the profile of this user
Re:MYSQL - ReportBuilder - tadautoincfield problem 2012/03/26 02:36 (1 Year, 1 Month ago)
I'm not sure when, it happens (in my project i sent you) after I click print but it's on a more complex report on informix.

I'll see if I can send a new sample to you..
Logged Logged
The administrator has disabled public write access.
#20478
lorife
Platinum Boarder
Posts: 354
graphgraph
Karma: 1
User Offline Click here to see the profile of this user
Re:MYSQL - ReportBuilder - tadautoincfield problem 2012/03/26 05:00 (1 Year, 1 Month ago)
Hi,

ok this is my situation:

1) seems like my problem with parameters was related to one single existing report. Still don't know why but all the others work so I guess I'll manage that.

2) Using OLD daAnyDAC (the one I had) without using modifications 4-5:

Using threads it works great but I have to:

- Create all DBs runtime myself
- here i still have error 4 and 5 (i'll try adding that myself to see what happens)

3) Using NEW daAnyDAC provided and let daAnyDAC create connections:

Using threads it does not work. I keep on getting weird errors like access violations and "list index out of bound"

Is it possible that new daAnyDAC is not thread safe?


I can assure you that modifications 4 and 5 I had were thread safe because use those everyday to print thousands of pages. So I guess those errors are related to something else.

Does this help you somehow?
Logged Logged
The administrator has disabled public write access.
#20482
TSupport
Moderator
Posts: 348
graphgraph
Karma: 10
User Offline Click here to see the profile of this user
Re:MYSQL - ReportBuilder - tadautoincfield problem 2012/03/26 05:12 (1 Year, 1 Month ago)
Let's isolate that.
3) Using NEW daAnyDAC provided and let daAnyDAC create connections
If you are using mods 4 and 5 and create connections manually: does it lead to the problems you described? Actually the last mods don't relate to multi-threading anyhow.
Probably ability to create the connection by the plugin conflicts with some RB functionality.
Once isolated (e.g. if you confirm that when you create connections manually all works well) we might just disable creating of connections by the plug-in if the thread is not main one.
With best regards,
DA-SOFT Technologies Support Team
Logged Logged
The administrator has disabled public write access.
#20485
lorife
Platinum Boarder
Posts: 354
graphgraph
Karma: 1
User Offline Click here to see the profile of this user
Re:MYSQL - ReportBuilder - tadautoincfield problem 2012/03/26 05:21 (1 Year, 1 Month ago)
Yes I have the error also if I create manually the connections.

Meanwhile I noticed that:

- in ValidateSQL you check c <> c but in "SetDataName" you changed c<>c in 1<>1.
is it correct? Or Validatesql should have 1 <> 1 too?

- i noticed you are not checking for "informix" anymore, like in "GetTableNames" and "GetDatabaseType". Is it correct?

I'll try removing something from daanydac (like 4 and 5) and also bring "gettablenames" as old version and I'll see what happens
Logged Logged
The administrator has disabled public write access.
#20486
TSupport
Moderator
Posts: 348
graphgraph
Karma: 10
User Offline Click here to see the profile of this user
Re:MYSQL - ReportBuilder - tadautoincfield problem 2012/03/26 05:34 (1 Year, 1 Month ago)
- in ValidateSQL you check c <> c but in "SetDataName" you changed c<>c in 1<>1.
is it correct? Or Validatesql should have 1 <> 1 too?

This was done to distinguish what RB adds internally from what the plug-in adds to the code.
"c <> c" here is added somewhere inside RB itself. This doesn't relate to SetDataName.
- i noticed you are not checking for "informix" anymore, like in "GetTableNames" and "GetDatabaseType". Is it correct?
Yes, this is what I referred in some previous posts when said that the current AnyDAC sources have fixes around that, so AnyDAC plug-in doesn't need to check for "informix" anymore.
I'll try removing something from daanydac (like 4 and 5) and also bring "gettablenames" as old version and I'll see what happens
Yes, you need to use the old version of GetTableNames.
Yes I have the error also if I create manually the connections.
To exclude any chance that connections are created inside the plug-in not in the main thread please modify the code of this method as:
Code:

function TdaAnyDACSession.GetDatabaseForName(const aName: String): TComponent;
begin
  Result := nil;
  if ppInMainThread then
    Result := GetDefaultDatabase(aName);
  if Result = nil then
    Result := inherited GetDatabaseForName(aName);
end;

With best regards,
DA-SOFT Technologies Support Team
Logged Logged
Last Edit: 2012/03/26 05:34 By TSupport.
The administrator has disabled public write access.
Go to top