Board index » delphi » "Missing data provider or data packet"

"Missing data provider or data packet"

I'm trying out SOAP but can't get past a "Missing data provider or data
packet" error.  I've used Midas with TWebConnection componet for some months
now and have had no problems with that.

I'm developing on a single machine with SQL Server 2000, IIS and Delphi 6
installed. I've create a SOAP Server Application and added a SOAP
DataModule, with and ADOConnection, ADOQuery and DataSetProvider.  That
seems to all work and connects to the database fine.  I have copied the
resulting dll into a directory under IIS and then created a Client App with
a TSoapConnection, TClientDataSet, TDataSource and TDBGrid.  The
SoapConnection has the url http://mymachine/soaptest/testproject.dll/SOAP
and seems to connect ok and under the ClientDataSet the DataProvider
dropdown is filled in with the relevant provider.  But, as soon as I set the
ClientDataSet to active, it hangs for 15 seconds and then errors.

Any Ideas anyone?

Thanks.
Colin Charnley.

 

Re:"Missing data provider or data packet"


Colin

I had this problem as well.  In my case it was because MIDAS.DLL was not
installed on the server machine.

This is basically a "catch all" error.  If you look at the as_getrecords
method in the SoapDM.pas file (that ships with D6) you'll see that they've
wrapped the call to Providers.GetRecords in  try/finally block, which means
that any error in the GetRecords routine will be "eaten" by the try/finally
block.  This results in no data packets being returned to the client, which
is why the client reports the error.

Another possibility is that the Timeout property of your ADOConnection
and/or ADOQuery are set too low.  First check that MIDAS.DLL is installed,
then check the timeout settings.

HTH

Dave

Quote
"Colin Charnley" <co...@aurora-uk.com> wrote in message

news:3bb84dfb$1_2@dnews...
Quote
> I'm trying out SOAP but can't get past a "Missing data provider or data
> packet" error.  I've used Midas with TWebConnection componet for some
months
> now and have had no problems with that.

> I'm developing on a single machine with SQL Server 2000, IIS and Delphi 6
> installed. I've create a SOAP Server Application and added a SOAP
> DataModule, with and ADOConnection, ADOQuery and DataSetProvider.  That
> seems to all work and connects to the database fine.  I have copied the
> resulting dll into a directory under IIS and then created a Client App
with
> a TSoapConnection, TClientDataSet, TDataSource and TDBGrid.  The
> SoapConnection has the url http://mymachine/soaptest/testproject.dll/SOAP
> and seems to connect ok and under the ClientDataSet the DataProvider
> dropdown is filled in with the relevant provider.  But, as soon as I set
the
> ClientDataSet to active, it hangs for 15 seconds and then errors.

> Any Ideas anyone?

> Thanks.
> Colin Charnley.

Re:"Missing data provider or data packet"


Thanks David.  I saw you earlier postings and checked to see if I have the
midas.dll was in the \winnt\system32 directory and it is (as part of the
delphi installation I guess).  The database, iis and client are all on the
same machine, so all should have access to the midas.dll.  I've also set the
connection timeout on the ADOConennection to 5 minutes, with the same
result.

You stated "First check that MIDAS.DLL is installed".  Do I need to register
it or the Application Server somehow?

I'll keep trying

Quote
"David Morgereth" <dmorger...@costargroup.com> wrote in message

news:3bb862cc$1_1@dnews...
Quote
> Colin

> I had this problem as well.  In my case it was because MIDAS.DLL was not
> installed on the server machine.

> This is basically a "catch all" error.  If you look at the as_getrecords
> method in the SoapDM.pas file (that ships with D6) you'll see that they've
> wrapped the call to Providers.GetRecords in  try/finally block, which
means
> that any error in the GetRecords routine will be "eaten" by the
try/finally
> block.  This results in no data packets being returned to the client,
which
> is why the client reports the error.

> Another possibility is that the Timeout property of your ADOConnection
> and/or ADOQuery are set too low.  First check that MIDAS.DLL is installed,
> then check the timeout settings.

> HTH

> Dave

> "Colin Charnley" <co...@aurora-uk.com> wrote in message
> news:3bb84dfb$1_2@dnews...
> > I'm trying out SOAP but can't get past a "Missing data provider or data
> > packet" error.  I've used Midas with TWebConnection componet for some
> months
> > now and have had no problems with that.

> > I'm developing on a single machine with SQL Server 2000, IIS and Delphi
6
> > installed. I've create a SOAP Server Application and added a SOAP
> > DataModule, with and ADOConnection, ADOQuery and DataSetProvider.  That
> > seems to all work and connects to the database fine.  I have copied the
> > resulting dll into a directory under IIS and then created a Client App
> with
> > a TSoapConnection, TClientDataSet, TDataSource and TDBGrid.  The
> > SoapConnection has the url

http://mymachine/soaptest/testproject.dll/SOAP

- Show quoted text -

Quote
> > and seems to connect ok and under the ClientDataSet the DataProvider
> > dropdown is filled in with the relevant provider.  But, as soon as I set
> the
> > ClientDataSet to active, it hangs for 15 seconds and then errors.

> > Any Ideas anyone?

> > Thanks.
> > Colin Charnley.

Re:"Missing data provider or data packet"


No, you don't have to register MIDAS.DLL.

When you set the AdoConnection.Timeout to 5 minutes, does the error still
occur after only 15 seconds?  If so, you should try setting the
AdoQuery.Timeout to a higher value.

If nothing else works, here is a sure-fire way to find the source of the
problem:

- Copy SoapDM.pas from the \delphi6\source\soap to your application's
directory.
- Add this copy of SoapDM.pas to your project
- Modify the AS_GetRecordsRoutine so that it logs the "real" exception to a
text file (see below)
- rebuild and re-run your application

function  TSoapDataModule.AS_GetRecords(const ProviderName: WideString;
Count: Integer; out RecsOut: Integer;
                            Options: Integer; const CommandText: WideString;
                            var Params: OleVariant; var OwnerData:
OleVariant): OleVariant; safecall;
begin
  Lock;
  try
    try
//Dave - add "inner" try/exception block
      Result := Providers[ProviderName].GetRecords(Count, RecsOut, Options,
CommandText, Params, OwnerData);

    except on e : exception do
//Dave - catch the exception and log it
      writeLog ('TSoapDataModule.AS_GetRecords - ' + e.Message);  //Dave
    end;
  finally
   UnLock;
 end;
end;

The "writeLog" method is my own routine that writes the message associated
with the exception into a text file.   So far, I haven't been able to figure
out a way of returning the "real" exception to the client.

Quote
"Colin Charnley" <co...@aurora-uk.com> wrote in message

news:3bb86917$1_1@dnews...
Quote
> Thanks David.  I saw you earlier postings and checked to see if I have the
> midas.dll was in the \winnt\system32 directory and it is (as part of the
> delphi installation I guess).  The database, iis and client are all on the
> same machine, so all should have access to the midas.dll.  I've also set
the
> connection timeout on the ADOConennection to 5 minutes, with the same
> result.

> You stated "First check that MIDAS.DLL is installed".  Do I need to
register
> it or the Application Server somehow?

> I'll keep trying

> "David Morgereth" <dmorger...@costargroup.com> wrote in message
> news:3bb862cc$1_1@dnews...
> > Colin

> > I had this problem as well.  In my case it was because MIDAS.DLL was not
> > installed on the server machine.

> > This is basically a "catch all" error.  If you look at the as_getrecords
> > method in the SoapDM.pas file (that ships with D6) you'll see that
they've
> > wrapped the call to Providers.GetRecords in  try/finally block, which
> means
> > that any error in the GetRecords routine will be "eaten" by the
> try/finally
> > block.  This results in no data packets being returned to the client,
> which
> > is why the client reports the error.

> > Another possibility is that the Timeout property of your ADOConnection
> > and/or ADOQuery are set too low.  First check that MIDAS.DLL is
installed,
> > then check the timeout settings.

> > HTH

> > Dave

> > "Colin Charnley" <co...@aurora-uk.com> wrote in message
> > news:3bb84dfb$1_2@dnews...
> > > I'm trying out SOAP but can't get past a "Missing data provider or
data
> > > packet" error.  I've used Midas with TWebConnection componet for some
> > months
> > > now and have had no problems with that.

> > > I'm developing on a single machine with SQL Server 2000, IIS and
Delphi
> 6
> > > installed. I've create a SOAP Server Application and added a SOAP
> > > DataModule, with and ADOConnection, ADOQuery and DataSetProvider.
That
> > > seems to all work and connects to the database fine.  I have copied
the
> > > resulting dll into a directory under IIS and then created a Client App
> > with
> > > a TSoapConnection, TClientDataSet, TDataSource and TDBGrid.  The
> > > SoapConnection has the url
> http://mymachine/soaptest/testproject.dll/SOAP
> > > and seems to connect ok and under the ClientDataSet the DataProvider
> > > dropdown is filled in with the relevant provider.  But, as soon as I
set
> > the
> > > ClientDataSet to active, it hangs for 15 seconds and then errors.

> > > Any Ideas anyone?

> > > Thanks.
> > > Colin Charnley.

Re:"Missing data provider or data packet"


Argh!!!  Is there any possibility that this is SQL 2000 related?   I've
(successfully) done the exact same thing you're trying, except that I'm
using SQL 7.  I'm not that familiar with Delphi yet but I seem to remember
that there were some issues with SQL 2000 support (I could be confused about
this though).

Quote
"Colin Charnley" <co...@aurora-uk.com> wrote in message

news:3bb87d08_2@dnews...
Quote
> I seem to get the error almost straight away now, with a 5 minute timeout.

> I've tried the code you posted, for writing the actual error message to a
> file.  Unfortunately, the error message is "Unspecified Error".  Don't you
> just love it!!!

> I'll probably try rebuilding my machine, to make sure its not something
more
> serious, as I'm out of options now.

Re:"Missing data provider or data packet"


I seem to get the error almost straight away now, with a 5 minute timeout.

I've tried the code you posted, for writing the actual error message to a
file.  Unfortunately, the error message is "Unspecified Error".  Don't you
just love it!!!

I'll probably try rebuilding my machine, to make sure its not something more
serious, as I'm out of options now.

Re:"Missing data provider or data packet"


Tried a few more things now...

Firstly, I've gone to a different machine, with the same setup as my
development PC (Windows 2000, Delphi6, IIS, SQL Server 2000).  This gives me
the same "Unspecified Error".  So that hopefully rules out a problem with my
PC.

Secondly, I've create a small MIDAS AppServer and Client using the same ADO
components, with a TWebConnection and it all works properly on both
machines.

Finally, I've gone to another machine (Windows 2000, IIS, SQL Server 7).
Using your code again, I now get the error "[DBNMPNTW]ConnectionOpen
(CreateFile())" after a five minute timeout that is set on the
TADOConnection.  The machine and the anonymous User for that IIS directory
should be able to access the db with no problems.  The ADOConnection
connection string seems ok.  Not sure what the "Connection Open" bit means -
the Application Server's ADOConnection and TADOQuery both have active set to
False when I build the dll.  They should become active when the client app's
TClientDataset is activated!?

...so I'm a bit confused ...

Quote
"David Morgereth" <dmorger...@costargroup.com> wrote in message

news:3bb8a9f3_1@dnews...
Quote
> Argh!!!  Is there any possibility that this is SQL 2000 related?   I've
> (successfully) done the exact same thing you're trying, except that I'm
> using SQL 7.  I'm not that familiar with Delphi yet but I seem to remember
> that there were some issues with SQL 2000 support (I could be confused
about
> this though).

> "Colin Charnley" <co...@aurora-uk.com> wrote in message
> news:3bb87d08_2@dnews...
> > I seem to get the error almost straight away now, with a 5 minute
timeout.

> > I've tried the code you posted, for writing the actual error message to
a
> > file.  Unfortunately, the error message is "Unspecified Error".  Don't
you
> > just love it!!!

> > I'll probably try rebuilding my machine, to make sure its not something
> more
> > serious, as I'm out of options now.

Re:"Missing data provider or data packet"


Quote
> ...so I'm a bit confused ...

Me too.  The fact that it works as with a TWebConnection and fails with a
TSoapConnection pretty much rules out a SQL 2000 problem.

One more thing to try (and I'm really grasping at straws here).  For the
Soap application:
- From IIS, right-click on the virtual directory, select Properties and set
the Application Protected to High Isolation
- Click Directory Security, click the edit button.   When the security
dialog appears,  uncheck Anonymous, uncheck Basic and check Integrated
Windows Authentication
- Now go to Component Services, locate the COM+ package that corresponds to
your IIS directory (it will be named IIS-{default Web Site/root/<your
directory>} ).  Right click, select properties, click the Identity tab and
click the "This user" radio button.  Set the account to a domain account
that has SQL server access.

The above scenario assumes that you're encountering some sort of
security/access rights issue when you attempt to connect to SQL server.
Frankly, I doubt that's the issue since the TWebConnection version works,
but its something to try if you can't think of anything else...

Re:"Missing data provider or data packet"


Colin,

Do you have any code you could post that reproduces the bug? I could try
here and see if I can figure it out too...if you don't mind.

--
Deepak Shenoy
Agni Software
http://www.agnisoft.com

Re:"Missing data provider or data packet"


Thanks for the help David. Its appretiated.

Unfortunetly, I've now tried your security tips but still get this
"Unspecified Error".

Think I must be missing something obvious, if no one else has posted this
problem.

Quote
"David Morgereth" <dmorger...@costargroup.com> wrote in message

news:3bb9c195$1_1@dnews...
Quote
> > ...so I'm a bit confused ...

> Me too.  The fact that it works as with a TWebConnection and fails with a
> TSoapConnection pretty much rules out a SQL 2000 problem.

> One more thing to try (and I'm really grasping at straws here).  For the
> Soap application:
> - From IIS, right-click on the virtual directory, select Properties and
set
> the Application Protected to High Isolation
> - Click Directory Security, click the edit button.   When the security
> dialog appears,  uncheck Anonymous, uncheck Basic and check Integrated
> Windows Authentication
> - Now go to Component Services, locate the COM+ package that corresponds
to
> your IIS directory (it will be named IIS-{default Web Site/root/<your
> directory>} ).  Right click, select properties, click the Identity tab and
> click the "This user" radio button.  Set the account to a domain account
> that has SQL server access.

> The above scenario assumes that you're encountering some sort of
> security/access rights issue when you attempt to connect to SQL server.
> Frankly, I doubt that's the issue since the TWebConnection version works,
> but its something to try if you can't think of anything else...

Re:"Missing data provider or data packet"


Thankyou for this kind offer Deepak.  I have sent the Application Server and
Client to the borland.public.attachments newsgroup for you to pickup.

Quote
"Deepak Shenoy" <she...@agnisoft.com> wrote in message

news:3bb9c203_2@dnews...
Quote
> Colin,

> Do you have any code you could post that reproduces the bug? I could try
> here and see if I can figure it out too...if you don't mind.

> --
> Deepak Shenoy
> Agni Software
> http://www.agnisoft.com

Re:"Missing data provider or data packet"


Quote
> Thankyou for this kind offer Deepak.  I have sent the Application Server
and
> Client to the borland.public.attachments newsgroup for you to pickup.

I checked it out, and I managed to make it work using Omni and the Web App
De{*word*81}. (check out .attachments for the source) I can't run it on IIS
though, i can't figure out why. I applied a fix for the Nimda virus lately,
so that might have ruined the show for ISAPI, but I'm not sure. (Anyone have
any ideas?) I haven't yet applied SP2 on windows though.

On IIS, I get a "stack overflow" when I open the dataset.

Note: I've changed the database to point to the Northwind database and
changed teh query appropriately, because I didn't have your database. I have
also done some changes to the soap connection (the URL was wrong) on the
client side.

There is now a third project which is a Web App De{*word*81} project, which I
needed in order to debug some of the stuff happening. If you want to use it,
you'll have to run it once, and then change the client code to point to
http://localhost/soaptest/colinproject.dll/soap/IClassyClass instead of the
current URL.

(It works in WAD too)

--
Deepak Shenoy
Agni Software
http://www.agnisoft.com

Re:"Missing data provider or data packet"


Quote
"Deepak Shenoy" <she...@agnisoft.com> wrote in message

news:3bbad880_1@dnews...

Quote

> On IIS, I get a "stack overflow" when I open the dataset.

Do not tell this to the "virus" writters. <g>

Rosimildo.

Re:"Missing data provider or data packet"


Quote
> "Deepak Shenoy" <she...@agnisoft.com> wrote in message
> news:3bbad880_1@dnews...

> > On IIS, I get a "stack overflow" when I open the dataset.

> Do not tell this to the "virus" writters. <g>

I wish I'd discovered a bug in IIS <G>

But the stack overflow is inside my ISAPI dll, and it's returned as XML
(<faultstring> thingy) but I can't debug it coz it doesn't happen in Omni or
WAD...

--
Deepak Shenoy
Agni Software
http://www.agnisoft.com

Re:"Missing data provider or data packet"


Quote
> On IIS, I get a "stack overflow" when I open the dataset.

Applied Update Pack 1 and it's all fixed. It works now, check it out (new
files are in .attachments)

The error was largely an SQL server authentication error as it turns out.
I've changed it so you might be able to use it easily.

--
Deepak Shenoy
Agni Software
http://www.agnisoft.com

Go to page: [1] [2]

Other Threads