Microsoft
Software
Hardware
Network
Question : db.Execute result
I'm using the following to insert a record in a table:
1: 2: 3:
sql="INSERT INTO table (Order,Quantity) VALUES ('test',10) db.execute (sql)
How can I find out the db.execute actually added a new record or not.
If the
order
field's
Index
is set to
Yes(No Duplicate)
it will fail to insert a new record if
Order
is duplicated
thanks for any kind of help
Answer : db.Execute result
Dim lRecs As Long
sql="INSERT INTO table (Order,Quantity) VALUES ('test',10)
With CurrentDb
.execute (sql)
lRecs = .RecordsAffected
End With
If lRecs>0 then ' it happened
mx
Random Solutions
Problem with the choice command under ms-dos 8.0
Access .NET Library from Excel VBA
Cannot connet to internet via wireless but can connect via hardwire
DB owner
Parsing an XML string in PHP
delete file permission denied using vb6
Strip Filename from a websit url
Jquery: Change banner when hover over text and icon
How do I execute a Windows Batch File from SQL?
Excel 2010 - Workbook_Close()