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
Why I can't open database again at Worksheet_Change event
Delete Enable Passwords
How to create an "edit Profile Setting" page by Dreamweaver
Getting SharePoint logon window when not in SharePoint
Is There Any Advantage to Having 2 Separate Windows-Based PCs "Connected" to Each Other?
Windows XP administrator remote acces - how to forbid?
how to scan for text in a row and then hide that column
Java File Browser Applet
Picture people vs Olan Mills
SELECT TOP n of each