Hi To All.... This Is My First Try To Create A Program Which Compose A Server And 2 Client...i Use Access Database As My Back End And Vb6 As My Front End...
Problem
1. I Create A Code In Which A User Can Generate Autonumber
But The Problem Is If Two Clients Input Together It Would
Both Save The Data To The Server With A Duplicate And
Same Id Number...
This Is My Code Which I Generate Auto Number.....
Dim Rs As New Adodb.recordset
Set Rs=cn.execute(" select Max(fieldname) From Tblname)
If Isnull(rs(0))=t rue Then
Idnum=1
Else
Idnum=rs(0)+1
Endif
Please Help Me..... How Can I Validate Idnum Before It Save To Server?....
tnx...
Problem
1. I Create A Code In Which A User Can Generate Autonumber
But The Problem Is If Two Clients Input Together It Would
Both Save The Data To The Server With A Duplicate And
Same Id Number...
This Is My Code Which I Generate Auto Number.....
Dim Rs As New Adodb.recordset
Set Rs=cn.execute(" select Max(fieldname) From Tblname)
If Isnull(rs(0))=t rue Then
Idnum=1
Else
Idnum=rs(0)+1
Endif
Please Help Me..... How Can I Validate Idnum Before It Save To Server?....
tnx...
Comment