SQL Data Adapter Fill method hangs when called in web service

M

moondaddy

I have some data access code that runs fine when called from a vb.net 1.1
winform. But when the exact same code is called from a web service it times
out. All code is running on my development machine and the data access code
is talking to sql server also on my dev. machine. The only thing that
changes is that the data access code is executed by a web service instead of
code running in the winform app. I even replaced my data access code with
the DAAB SqlHelper.FillDataset method and it times out just the same.

To make things even more interesting, the code always executes fine for the
first 2 calls, and always on the 3rd call it times out. I'll post the
function that fills the dataset below. The line that times out is the 3rd
SqlHelper.FillDataset call. Note. this code ALWAYS runs perfect when not in
a web service.

Any good ideas on how I can trouble shoot this?

Public Function Get_TechList_And_Attributes_Function(ByVal VP_ID As Int32,
ByVal Fc_ID As Int32) As dsTech
Try
Dim ds As New dsTech
SqlHelper.FillDataset(GetDBConnectionString,
CommandType.StoredProcedure, _
"spTech_lstByFunc", ds, New String() {"tbTech"}, New
SqlParameter("@ID", Fc_ID))

SqlHelper.FillDataset(GetDBConnectionString,
CommandType.StoredProcedure, _
"spTechAtt_lstByVIP", ds, New String() {"tbAttList"}, _
New SqlParameter("@Vp_ID", VP_ID))

'TIMES OUT ON THIS NEXT LINE AFTER THIS WEB SERVICE HAS BEEN CALLED MORE
THAN 2 TIMES
SqlHelper.FillDataset(GetDBConnectionString,
CommandType.StoredProcedure, _
"spTechVA_MM_lstByFunc", ds, New String() {"tbAttMM"}, New
SqlParameter("@Fc_ID", Fc_ID))

SqlHelper.FillDataset(GetDBConnectionString,
CommandType.StoredProcedure, _
"spTechTmp_lstGridDefaultView_ByFunc", ds, New String()
{"tbTechTmp"}, _
New SqlParameter("@ID", Fc_ID), New SqlParameter("@ParentType", _
myTypes.Gen.ParentType.Func))

Return ds
Catch ex As Exception
ErrLog(ex)
End Try
End Function

Thanks!
 
C

Cor Ligthert

Moondaddy,

Why not try this same code as hard coded: not using your sqlhelper, not
using your stored procedures, not using parameters.

Than it should be easy to find where is the error and even showable as
problem (when you not find it) in a newsgroup.

Now you assume that we know how a lot of things behind the scene looks like.

That is almost not helpable in a newsgroup in my idea.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top