-
Hi all,
I have a table with 7 fields, 2 of which contain $ values. I want to delete all records, where both fields containing dollar values = $0.00. I am using ADO in VB6. Can anyone help me or supply me with some sample code that will do this?
I thought it might invlove a query...
Delete * from ... Where .... And .... =$0.00
but am unsure how to do this.
Cheers
-
hi, use such sql statement:
delete from TableName where 1stFieldName = 0 and 2ndFieldName=0
Best wishes,
Syl
-
I am trying to use the following code to delete records from a table using ADO.
With DataEnvironment1
Delete From .rscmdTemp WHERE .rscmdTemp!Sell = "0" AND .rscmdTemp!Breakeven = "0"
End With
I'm getting the error message, "Compile Error: Expected End of Statment"
Can any body help?
-
perhaps that can help, but it's necessary to have active connection set:
Code:
sub DeleteRecords
dim rst as new adodb.recordset
dim sSQL as string
sSQL = "Delete From .rscmdTemp WHERE .rscmdTemp!Sell = 0 AND .rscmdTemp!Breakeven = 0"
rst.Open sSQL, , , , adCmdText
end sub