MSDE got stuck in WebService

D

dord

I have a WebService which simply obtain data remotely from a PocketPC PDA
and store it in the database. The following codes are one of the functions
in my "service1.asmx". Each time I call it either from a PDA or ASPX page,
it can successfully do exactly what I want it to be. However, I just found
that each time I call it, the MSDE (i.e. the database engine) will become
stuck, the database can neither be restarted nor removed, and I used to
modify the database engine by a SQL script file, which will initially delete
the whole database. Besides this, everything is fine and the engine works
properly. And what I currently did for script modification is to restart the
computer.

Does anyone have similar experience and know the solution? Please help.
Thanks.

<WebMethod()> _
Public Function UploadScanRecord(ByVal sdata As SerialScanData) As
String
Dim SqlConnection1 As SqlConnection
Dim SqlCommand1 As New SqlCommand

Try
SqlConnection1 = New SqlConnection(DBString)

SqlCommand1.CommandText = "INSERT INTO [dbo].[InDetail]
(ItemNum, UBD, LotNum, TagID, ScanTime, RemoteDateCreate, Loc, Operator)
VALUES ('" & sdata.ItemNum & "','" & sdata.UBD & "','" & sdata.LotNum &
"','" & sdata.TagID & "','" & sdata.ScanTime & "','" & sdata.DateCreat &
"','" & sdata.Loc & "','" & sdata.Operator & "')"
SqlCommand1.Connection = sqlConnection1

SqlConnection1.Open()
SqlCommand1.ExecuteNonQuery()
SqlConnection1.Close()
Return "OK"

Catch ex As Exception
''ReportException(ex, sdata)
Return "ERROR " & ex.ToString
Finally
SqlCommand1.Dispose()
SqlConnection1.Dispose()
End Try
End Function
 

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

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top