Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2002
    Location
    Raleigh, NC, USA
    Posts
    19

    Unanswered: SQL CE 200 and TRUNCATE

    I have two tables in my SQL CE database. tblTempData and tblBatchData. When the user wants to move the data from 'temp' into 'batch' I would like to truncate the 'temp' table. When I do this I get the unable to parse query error.

    strSQL = "TRUNCATE TABLE tblTempData"
    goADOcn.Execute (strSQL)

    Is there something that I am doing wrong, or is TRUNCATE not supported in SQLCE 2000?

  2. #2
    Join Date
    Feb 2004
    Location
    San Antonio, TX
    Posts
    565
    what is the code that you are using to do this look like.
    truncate is a viable keyword in sql ce

  3. #3
    Join Date
    Dec 2002
    Location
    Raleigh, NC, USA
    Posts
    19

    SQL CE 2000 and TRUNCATE

    Here is the procedure called to truncate the table:

    Private Sub PurgeTempData()

    Dim strSQL as String

    strSQL = "TRUNCATE TABLE tblTempData"
    goADOcn.Execute (strSQL)

    If Err.Number <> 0 Then
    HideWaitCursor
    Call ADOErrRoutine
    CloseConnect
    Exit Sub
    End If

    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •