StrataFrame Forum

Set Deleted Off

http://forum.strataframe.net/Topic21887.aspx

By Paul Chase - 2/9/2009

This should be easy but today has been one of those day's.

I have some Foxpro Business objects and need to set deleted off. I thought I did this before but cant find it. I am trying code like below but it doesn't appear to return deleted records.

'Turn Off Deleted

Me.ExecuteNonQuery("SET DELETED OFF")

Me.FillDataTable("SELECT * FROM somewhere")

 

By Paul Chase - 2/9/2009

Note sure if this is the best way but it works and im in a hurryBigGrin

'-- Added to get deleted jobsites

Dim LoConn As New OleDb.OleDbConnection

Dim loDataAdapter As New OleDb.OleDbDataAdapter

Dim LoDataTable As New Data.DataTable

LoConn.ConnectionString = MicroFour.StrataFrame.Data.DataLayer.DataSources("Fox").ConnectionString

LoConn.Open()

Dim loCommand As New OleDb.OleDbCommand("SET DELETED OFF", LoConn)

loCommand.ExecuteNonQuery()

loDataAdapter = New OleDb.OleDbDataAdapter("SELECT jobsites.* FROM customer INNER JOIN jobsites ON customer.cu_id = jobsites.cu_id " & _

"WHERE LEN(ALLTRIM(jobsites.cu_id)) > 0", LoConn)

loDataAdapter.Fill(LoDataTable)

Me.CopyDataFrom(LoDataTable, MicroFour.StrataFrame.Business.BusinessCloneDataType.ClearAndFillFromCompleteTable)