i hv a vb6 form connected to the ms acess... it has multiple tabs so if a user wants to make any one of the two then a unique key should be followed... preferably the key should be followed by the system year as this could be used for many years... but this key should be incremented only when one tab with this id is submitted... the tabs should not repeat the request id...and the details of the two tabs are stored in different database so we cant acess from one tab...
im totally confused... please help...
smile4evr
0
Junior Poster in Training
Recommended Answers
Jump to PostI'm also confused with your explanation... can you please rephrase you explanation... sorry!
Jump to PostNot sure if this is even close with what you want:
…Dim strSQL As String Dim oConn As ADODB.Connection Dim Rs As RecordSet oConn = CreateObject("ADODB.Connection") oConn.Open("<conn string>") strSQL = "INSERT INTO <Table Name> (<fields>) VALUES (<field values); SELECT @@IDENTITY AS 'Identity' " Rs = oConn.Execute(strSQL) Print(Rs(0))
All 7 Replies
jireh
3
Posting Whiz
smile4evr
0
Junior Poster in Training
Teme64
215
Veteran Poster
smile4evr
0
Junior Poster in Training
Teme64
215
Veteran Poster
smile4evr
0
Junior Poster in Training
Teme64
215
Veteran Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.