Hi everybody!!
It seems that i'm not the only one with this problem and searching troughout the posts i coludn't find a valid solution, so please anybody help me.
I'm working with an ADP(MS Access Project) connected to an SQLServer DB.When trying to insert a new record in a table, i get the write conflict error, saying that another user has made changes to the record and ansking me to save my changes to the clipboard. I'm the only one tha's using the DB, and i'm a bit confuse about this error.I'm using a form to insert the data and i placed the following code in the before insert envent:
Private Sub Form_BeforeInsert(Cancel As Integer)
Const id As String = "Market"
Dim idrst As ADODB.Recordset
Dim value As Integer
value = Ap236Util.getIdMaxValue(id, idrst)
idrst.Close
Set idrst = Nothing
Me!ID_Market = value + 1
End Sub
The form is based on a query with multiple tables so the UniqueTable propertie is set, so i can insert in only one of them(Market).In the code i'm setting the value of the ID_Market witch is the primary key of the table.The other fiels are filled in the form.
If someone know the way around this problem,please help me because i'm stuck with a very important project and i'm running out of time!
tanks in advance
It seems that i'm not the only one with this problem and searching troughout the posts i coludn't find a valid solution, so please anybody help me.
I'm working with an ADP(MS Access Project) connected to an SQLServer DB.When trying to insert a new record in a table, i get the write conflict error, saying that another user has made changes to the record and ansking me to save my changes to the clipboard. I'm the only one tha's using the DB, and i'm a bit confuse about this error.I'm using a form to insert the data and i placed the following code in the before insert envent:
Private Sub Form_BeforeInsert(Cancel As Integer)
Const id As String = "Market"
Dim idrst As ADODB.Recordset
Dim value As Integer
value = Ap236Util.getIdMaxValue(id, idrst)
idrst.Close
Set idrst = Nothing
Me!ID_Market = value + 1
End Sub
The form is based on a query with multiple tables so the UniqueTable propertie is set, so i can insert in only one of them(Market).In the code i'm setting the value of the ID_Market witch is the primary key of the table.The other fiels are filled in the form.
If someone know the way around this problem,please help me because i'm stuck with a very important project and i'm running out of time!
tanks in advance