Sorry I'm new in this,
Add a record using T-SQL and Connection.Exec ute
How can i insert the identity in a VB-variable
Dim objConn As ADODB.Connectio n
Set objConn = New ADODB.Connectio n
objConn = CurrentProject. Connection
objConn.Open
objConn.Execute "INSERT INTO CONTACT (CNT_PHONE) VALUES ('012345678')
SELECT @@IDENTITY as 'NewID'"
Msgbox NewID triggers an error !
Filip
Add a record using T-SQL and Connection.Exec ute
How can i insert the identity in a VB-variable
Dim objConn As ADODB.Connectio n
Set objConn = New ADODB.Connectio n
objConn = CurrentProject. Connection
objConn.Open
objConn.Execute "INSERT INTO CONTACT (CNT_PHONE) VALUES ('012345678')
SELECT @@IDENTITY as 'NewID'"
Msgbox NewID triggers an error !
Filip
Comment