MSDE got stuck in WebService

Discussion in 'ASP .Net Web Services' started by dord, Apr 30, 2005.

  1. dord

    dord Guest

    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
     
    dord, Apr 30, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sonali
    Replies:
    2
    Views:
    4,907
    Ryan Stewart
    Mar 3, 2004
  2. PROBLEM FACER

    GOT STUCK IN JAVA

    PROBLEM FACER, Feb 13, 2006, in forum: Java
    Replies:
    10
    Views:
    615
    steve
    Feb 13, 2006
  3. Sumpfman

    Got stuck with wchar_t *argv[]

    Sumpfman, Nov 18, 2004, in forum: C Programming
    Replies:
    6
    Views:
    1,966
    Michael Mair
    Nov 18, 2004
  4. streamkid

    got stuck with cstdio

    streamkid, Mar 15, 2007, in forum: C++
    Replies:
    3
    Views:
    396
    David Harmon
    Mar 15, 2007
  5. Replies:
    18
    Views:
    781
    Phred Phungus
    Mar 17, 2010
Loading...

Share This Page