Page 1 of 1
Migrating from win200 to win2003 problem
Posted: Mon 25 Apr 2005 13:11
by TheLion
HI
Using Delphi5 Enterprise, MyDac 3.50.0.19, MySQL 4.0.24-classic-nt-log.
My programs works under win2000, but when I move them to win2003 ome of my select statements fails, but gives me no errormessages.
I have my old designed programmes and my new designed once. The New design works, the old once doesn't.
All the programs are recompiled with the latest MyDac version.
In my new design I have all MyDac code in one base object. For every MySQL table I have, I made an object with my MyDac base object as parent. This works out fine on both win2000 and win2003.
In my old design I just made MySQL statements where I needed them. I have MyConnection1, MyQuery1 and MyQuery2 Components on my WebModule1 page. But for some odd reason, that doesn't work under win2003. But the same compiled version of the program works fine under win2000.
Any ideas as how to trace or even cure the problem?
Posted: Mon 25 Apr 2005 15:29
by Ikar
Try to cut an example of non-working program to two-three components.
Posted: Tue 26 Apr 2005 12:16
by TheLion
If I remove all the MyDac components and create them as runtime objects instead. The program works!!! Is this a fault or a feature?
Posted: Wed 27 Apr 2005 09:37
by Guest
It is an error but without a sample we couldn't reproduce and fix it.
Posted: Wed 27 Apr 2005 10:28
by TheLion
Hi
I'll se If can put together a simple sample to reproduce the problem

I am behind schudule, and pressed for time to migrate. I still have about 20 web programs and 3 NT services to "convert"
In one of my NT services, where I use 1 TMyConnection and 4 TMyQuery. I just removed the TMyConnection (MyConnection1) component and now create it run-time in the main thread instead. Now the NT service works on Win2003!!!
Posted: Mon 16 May 2005 11:04
by TheLion
Hi again
Still using Delphi5 Enterprise, upgraded to MyDac 3.50.0.20, MySQL 4.0.24-classic-nt-log
I found one of my small web programs that works on Windows 2000, but not 2003.
Code: Select all
//
// Used instead of onsubmit Javacode in Reportprograms.
// This program takes the submittet reportname and convert it to
// CGI program Name and posts the other submittet variabels to
// that program.
//
unit main;
interface
uses
Windows, Messages, SysUtils, Classes, HTTPApp, Db, MemDS, DBAccess,
MyAccess;
type
TWebModule1 = class(TWebModule)
MyConnection1: TMyConnection;
MyQuery1: TMyQuery;
procedure WebModule1WebActionItem1Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;
var
WebModule1: TWebModule1;
implementation
{$R *.DFM}
procedure TWebModule1.WebModule1WebActionItem1Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var
Query: TStrings;
Report, CGI, Vars: string;
QueryNo: byte;
begin
try
Query := TStringList.Create;
Query.AddStrings(Request.ContentFields); // POST variables
Query.AddStrings(Request.QueryFields); // GET variables
Report := Trim(Query.Values['Report']);
CGI := 'Reports.exe';
if Report '' then
begin
// Query is written in the MyQuery1.SQL parameter under the object inspector:
// SELECT cgi FROM webpages WHERE menuid="Reports1" AND displayname=&Report LIMIT 2
// LIMIT 2 returns MyQuery1.RecordCount = 2 if more than one CGI exsist. Should be only one.
MyQuery1.MacroByName('Report').Value := '"' + Report + '"';
MyQuery1.Execute;
MyQuery1.First;
if MyQuery1.RecordCount = 1 then
CGI := MyQuery1['cgi'];
if not FileExists(CGI) then
CGI := '../deniedinfo.htm';
end;
Vars := '';
QueryNo := 0;
while QueryNo '' then
Vars[1] := '?'; // Makes the first char "?"
finally
FreeAndNil(Query);
Response.SendRedirect(CGI+Vars);
end;
end;
end.
Posted: Mon 16 May 2005 15:01
by Ikar
Please add to this file rest of all needed files (dfm, dpr, etc) and send to mydac*crlab*com email.
Beside that delete unnecessary operations in the body of your example and add an order of actions to reproduce the problem.