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
How to get the YEAR portion from a DATETIME variable?
Error: 1067, Process teriminated while starting sQL service
Showing the performance of VB.NET within Visual Studio 2010
sandboxie - get rid of bad data in sandbox
Out of Office Exchange 2007 - Server Not Available
How can I determine if my Vista OS is 32-bit or 64-bit if the computer won't boot?
Web-based content filtering
My changes in on the notes local calendar is not replicating with the server
Find tags in OneNote not finding all tags
Are there any problems changing an office network from T-1 broadband to 12.2 Mb Comcast Business?