BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Desperately needing help. PLEASE!

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier)
View previous topic :: View next topic  
Author Message
Barry Clark
Guest





PostPosted: Tue May 09, 2006 6:14 pm    Post subject: Desperately needing help. PLEASE! Reply with quote



Using Delphi 6 SP2
Trying to build 3-tier system.
If I create an SQL query on the remote server with more than 1 parameter,
when I try to use "FetchParams" Delphi just crashes on me and closes.
this happends if you do it manually by right-clicking on the
TClientDataSetCompent: at run time it just generates an exception.
I've installed the server locally and on 2 remote servers, and the same
things happens.
I've tried Sockets and TWEbConnection. Exactly the same happens.
I have to meet a non-commercial (ie academic) project deadline, and I'm
really panicking.
If someone could advise I'd be REALLY grateful - I've lost 3 days now.. (I
need to use ports 80 or 8080 to avoid customer installation hassles).

TIA

Barry


--
Dr Barry Clark
Director of VALE and Senior Lecturer in Medical Education
(Virtual Administration and Learning Environment)
Wolfson Medical School Building
University of Glasgow
Glasgow G12 8QQ

Phone: 0141-330-4248 (international +44-141-330-4248)
Email: b.clark (AT) clinmed (DOT) gla.ac.uk
Back to top
Barry Clark
Guest





PostPosted: Tue May 09, 2006 7:14 pm    Post subject: Re: Desperately needing help. PLEASE! Reply with quote



THanks Johannes.

I've tried everything I could think of - I used a long time ago in in D5 too
and it all seemed OK then. Haven't had to use for about 4 years, but now
need it. I'll try loading the latest MIDAS.DLL as you suggest. I'm currently
imaging my PC with a view to installing D7 tomorrow. Can D6 and D7
co-exist?

THe project is as clean as could be, the server has a remotedatamodule, one
ADO connection, 1 ADOQuery with a two parameter sql (select * from LAs where
LA = :la and Code = :cod), and a DataProvider. All ADO components can be
made active - so no problems there. Build server, copy to WEB server,
register it as server.exe /regserver. Check dcomcnfg. Server visible there
and in registry. Give it's folder IUSR_xxxx rights. MIDAS.dll registered
and placed in WEB folder with httpsrvt.dll. Thatf older also given IUSR_xx
and "execute scripts and executables" rights. (I also tried giving the
server parameters default values so there would be no problems opening the
connection that made no difference either.)

Create a client - new application, add datamodule, TWebConnection. Set the
URL to point to httpsrvr.dll. Click on "Servername" and the dropdown shows
the remote server. However, when I select it, it doesn't then show the
GUID, which worries me. Then add clientdataset, select remoteserver, and
get the providername. All works so far. Clientdataset is set
"active=false". Rightclick on the ClientDataSet and choose "Fetchparams".
Instantly Delphi closes - no error messages, nothing. Tried it with SckSrvr
on port 8080 (registered and configured on server) and a socket component on
the client. Exactly the same happens when you try to "fetchparams".

Tried installing server locally and two other servers - one 2003, one 2000.
Same problem.... Only difference is locally the GUID is returned when
selecting the servername, but "fetchparams" still crashes.

I don't know what else to try. The error is reported on the WEB for D6 but
no solutions. If it is working in D7 then maybe D7 is the way to do. I
have a copy and I think most of my 3rd party components will also install in
D7.

Many thanks for your helpful suggestion.

Barry

"Johannes Bjerregaard" <jozzb@hotmail> wrote in message
news:4460dab8$1 (AT) newsgroups (DOT) borland.com...
Quote:
Barry Clark wrote:

Using Delphi 6 SP2
Trying to build 3-tier system.
If I create an SQL query on the remote server with more than 1
parameter, when I try to use "FetchParams" Delphi just crashes on me

I use MIDAS with sockets every day, and it works great. I have not used
it with Delphi 6, but Delphi 5 and 7 both.

First of all, make sure you are using the latest version of MIDAS.DLL -
http://www.distribucon.com/midas.html

If you're using a socket connection, make sure scktsrvr.exe is running
on the server computer. I'd advise to test locally first, with both
processes running on the same computer.

I know there used to be problems with SupportCallbacks on the
connection component. Try setting it to False and see if that helps.

Please provide more information on the exception (the type and the
message) that happens at runtime. This is likely the same exception
that causes the IDE to crash.

Compile with debug DCUs (Project->Options->Compiler) to research
exactly where in the VCL the error happens.

Also try debugging the server application, and run the client from
Explorer (or from a different instance of Delphi if you wish) and see
if you learn anything useful from that.

You don't provide much information about where the error happens - in
the client or in the server app? When connecting to the server, or when
fetching parameters (the client connects behind the scenes when you
fetch parameters)? Try to reduce the problem to the smallest possible
test case. Can you create a brand new client and server application and
still reproduce? If not, backup your project and start removing stuff
until you've found the problem.

--
Back to top
Johannes Bjerregaard
Guest





PostPosted: Tue May 09, 2006 7:14 pm    Post subject: Re: Desperately needing help. PLEASE! Reply with quote



Barry Clark wrote:

Quote:
Using Delphi 6 SP2
Trying to build 3-tier system.
If I create an SQL query on the remote server with more than 1
parameter, when I try to use "FetchParams" Delphi just crashes on me

I use MIDAS with sockets every day, and it works great. I have not used
it with Delphi 6, but Delphi 5 and 7 both.

First of all, make sure you are using the latest version of MIDAS.DLL -
http://www.distribucon.com/midas.html

If you're using a socket connection, make sure scktsrvr.exe is running
on the server computer. I'd advise to test locally first, with both
processes running on the same computer.

I know there used to be problems with SupportCallbacks on the
connection component. Try setting it to False and see if that helps.

Please provide more information on the exception (the type and the
message) that happens at runtime. This is likely the same exception
that causes the IDE to crash.

Compile with debug DCUs (Project->Options->Compiler) to research
exactly where in the VCL the error happens.

Also try debugging the server application, and run the client from
Explorer (or from a different instance of Delphi if you wish) and see
if you learn anything useful from that.

You don't provide much information about where the error happens - in
the client or in the server app? When connecting to the server, or when
fetching parameters (the client connects behind the scenes when you
fetch parameters)? Try to reduce the problem to the smallest possible
test case. Can you create a brand new client and server application and
still reproduce? If not, backup your project and start removing stuff
until you've found the problem.

--
Back to top
Johannes Bjerregaard
Guest





PostPosted: Tue May 09, 2006 7:14 pm    Post subject: Re: Desperately needing help. PLEASE! Reply with quote

Barry Clark wrote:

Quote:
THanks Johannes.

I've tried everything I could think of - I used a long time ago in in
D5 too and it all seemed OK then. Haven't had to use for about 4
years, but now need it. I'll try loading the latest MIDAS.DLL as you
suggest. I'm currently imaging my PC with a view to installing D7
tomorrow. Can D6 and D7 co-exist?

Yes. Someone else may know of caveats, but I've never had problems
installing a new version of Delphi while still using the old one.

Quote:
client. Exactly the same happens when you try to "fetchparams".

What is the exception type and message when you call FetchParams in
code, rather than in the IDE?

I assume you tried the SupportCallbacks suggestion?

You could also try running your code that calls FetchParams on a
different computer - maybe there is a problem with the network
configuration on the client computer.

I only use sockets for transport, so I can't advise anything related to
web connections. I also use TADOQuery on the server, by the way.

--
Back to top
Barry Clark
Guest





PostPosted: Tue May 09, 2006 11:22 pm    Post subject: Re: Desperately needing help. PLEASE! Reply with quote

Hi

I tried all your suggestions on our development server (latest Midas,
callbacks = false) It crashed with IPSockets too.

So set up a *clean* Windows 2000 server. Installed latest midas and
scktsrv.exe and started it as a service.
For some weird reason the scktsrv was runing, but the icon did not show up
in the taskbar - have you met this problem?
Anyway, registered "my" software server - OK
Created a new client using IPSocket on port 211.
This time all worked perfectly - got the "fetchparams" to work with the 2
parameter query.
Program ran and displayed the correct date.
Re-tried TWebconnection. Crashed as before...

The same IPSockets server/client worked perfectly on my local PC, scktsrv
icon visible etc. etc.
Twebconnection crashes as usual.

i'm tempted to set up a basic PC and just use if as the "MIDAS" server. What
do you think?

Any ideas why the scktsrv icon won't show up.

Perhaps upgrading to D7 is the only answer - if it works for you, it should
work for me? It all seems pretty flaky (BTW I've been using Delphi since D2,
won a awards for applications, developed commercial ASP sites handling
10,000s of transactions, and just got a substantial research grant - so
it's not like I don't usually know what I'm doing - this is a new one on me
Smile) Its kind of embarassing when this happens!

Kind regards

Barry

Also, it all worked
"Johannes Bjerregaard" <jozzb@hotmail> wrote in message
news:4460e5eb$1 (AT) newsgroups (DOT) borland.com...
Quote:
Barry Clark wrote:

THanks Johannes.

I've tried everything I could think of - I used a long time ago in in
D5 too and it all seemed OK then. Haven't had to use for about 4
years, but now need it. I'll try loading the latest MIDAS.DLL as you
suggest. I'm currently imaging my PC with a view to installing D7
tomorrow. Can D6 and D7 co-exist?

Yes. Someone else may know of caveats, but I've never had problems
installing a new version of Delphi while still using the old one.

client. Exactly the same happens when you try to "fetchparams".

What is the exception type and message when you call FetchParams in
code, rather than in the IDE?

I assume you tried the SupportCallbacks suggestion?

You could also try running your code that calls FetchParams on a
different computer - maybe there is a problem with the network
configuration on the client computer.

I only use sockets for transport, so I can't advise anything related to
web connections. I also use TADOQuery on the server, by the way.

--
Back to top
Johannes Bjerregaard
Guest





PostPosted: Wed May 10, 2006 1:14 am    Post subject: Re: Desperately needing help. PLEASE! Reply with quote

Barry Clark wrote:

Quote:
Hi

I tried all your suggestions on our development server (latest Midas,
callbacks = false) It crashed with IPSockets too.

So set up a clean Windows 2000 server. Installed latest midas and
scktsrv.exe and started it as a service. For some weird reason the
scktsrv was runing, but the icon did not show up in the taskbar -
have you met this problem? Anyway, registered "my" software server
- OK Created a new client using IPSocket on port 211. This time all
worked perfectly - got the "fetchparams" to work with the 2 parameter
query. Program ran and displayed the correct date. Re-tried
TWebconnection. Crashed as before...

I have seen services before that would did not show tray icons on
Windows Server (2000 or maybe 2003). Not with socket server in
particular.

The missing icon did not appear to affect performance, other than the
fact I couldn't get to the user interface of the service Smile This
behavior may be by design on Windwos Server, I frankly don't remember.

We run socket server in a logged in user session on the server, not as
a service. We just put it in the Startup folder and login every time we
reboot. Not very convenient. I forgot why we do this, but I'm sure
there was a reason.

I'm not full of good ideas at this time, unfortunately. What's strange
is you're saying it works (on some computers) with the socket transport
but not the web transport (or was it DCOM?)

I still don't know what the exception type and message are that you get
when calling FetchParams at run-time. That might be good to know.

Quote:
i'm tempted to set up a basic PC and just use if as the "MIDAS"
server. What do you think?

Perhaps upgrading to D7 is the only answer - if it works for you, it
should work for me? It all seems pretty flaky (BTW I've been using

Upgrading to D7 shouldn't be a big deal, provided you have all 3rd
party components in D7 versions. Depending on how little risk you're
willing to take at this time, maybe install it on a separate computer.

You could start by installing D7 and re-creating your test project and
see if it works any better there.

Also if you haven't already, check this fixed version of socket server
out. The one that ships with D5/D7 has a problem with multiprocessor
servers (probably dual core too.) It caused our system to crash under
stress - since we installed this fixed version, we've had no problems:

http://codecentral.borland.com/Item.aspx?id=18265

--
Back to top
Barry Clark
Guest





PostPosted: Wed May 10, 2006 10:14 am    Post subject: Think it's fixed... Reply with quote

Hi

I know this sounds stupid, but in addition to updating the midas.dll, I
simply installed the httpsrvr.dll from the D7 CD.

All is working perfectly in D6 now AND with TwebConnection, which is exactly
what I wanted. It is working with stored procedures and normal queries too.
Just have to keep remembering to set the ADO cursor to clServer...!

Really, many thanks for your input - very much appreciated. Kept me going
through the early hours of this morning. Smile)

Very kind regards

Barry

"Johannes Bjerregaard" <jozzb@hotmail> wrote in message
news:44613178$1 (AT) newsgroups (DOT) borland.com...
Quote:
Barry Clark wrote:

Hi

I tried all your suggestions on our development server (latest Midas,
callbacks = false) It crashed with IPSockets too.

So set up a clean Windows 2000 server. Installed latest midas and
scktsrv.exe and started it as a service. For some weird reason the
scktsrv was runing, but the icon did not show up in the taskbar -
have you met this problem? Anyway, registered "my" software server
- OK Created a new client using IPSocket on port 211. This time all
worked perfectly - got the "fetchparams" to work with the 2 parameter
query. Program ran and displayed the correct date. Re-tried
TWebconnection. Crashed as before...

I have seen services before that would did not show tray icons on
Windows Server (2000 or maybe 2003). Not with socket server in
particular.

The missing icon did not appear to affect performance, other than the
fact I couldn't get to the user interface of the service Smile This
behavior may be by design on Windwos Server, I frankly don't remember.

We run socket server in a logged in user session on the server, not as
a service. We just put it in the Startup folder and login every time we
reboot. Not very convenient. I forgot why we do this, but I'm sure
there was a reason.

I'm not full of good ideas at this time, unfortunately. What's strange
is you're saying it works (on some computers) with the socket transport
but not the web transport (or was it DCOM?)

I still don't know what the exception type and message are that you get
when calling FetchParams at run-time. That might be good to know.

i'm tempted to set up a basic PC and just use if as the "MIDAS"
server. What do you think?

Perhaps upgrading to D7 is the only answer - if it works for you, it
should work for me? It all seems pretty flaky (BTW I've been using

Upgrading to D7 shouldn't be a big deal, provided you have all 3rd
party components in D7 versions. Depending on how little risk you're
willing to take at this time, maybe install it on a separate computer.

You could start by installing D7 and re-creating your test project and
see if it works any better there.

Also if you haven't already, check this fixed version of socket server
out. The one that ships with D5/D7 has a problem with multiprocessor
servers (probably dual core too.) It caused our system to crash under
stress - since we installed this fixed version, we've had no problems:

http://codecentral.borland.com/Item.aspx?id=18265

--
Back to top
Johannes Bjerregaard
Guest





PostPosted: Wed May 10, 2006 1:14 pm    Post subject: Re: Think it's fixed... Reply with quote

Barry Clark wrote:

Quote:
Really, many thanks for your input - very much appreciated. Kept me
going through the early hours of this morning. Smile)

I'm glad it works for you now.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.