G
Guest
Hello
I am tying to create an insert stored procedure in my access project (MSDE)
I am trying to retrieve the autonumber primary key value that is generated by the insert after this. This is my code..
INSERT INTO dbo.Ren
(Lname, Fname, RentAddress, RentPostcode, PhoneNo
VALUES (@Lname, @Fname, @Address, @Postcode, @PhoneNo
SELECT RentI
FROM dbo.Ren
WHERE (RentID = SCOPE_IDENTITY()
When i click the verify sql i get a message stating that the syntax is ok and that it has been verifed against the datasource
However when i try to save the query i get a message stating:
ADO error:Must declare the variable '@Surname
what must i do to correct this
I am tying to create an insert stored procedure in my access project (MSDE)
I am trying to retrieve the autonumber primary key value that is generated by the insert after this. This is my code..
INSERT INTO dbo.Ren
(Lname, Fname, RentAddress, RentPostcode, PhoneNo
VALUES (@Lname, @Fname, @Address, @Postcode, @PhoneNo
SELECT RentI
FROM dbo.Ren
WHERE (RentID = SCOPE_IDENTITY()
When i click the verify sql i get a message stating that the syntax is ok and that it has been verifed against the datasource
However when i try to save the query i get a message stating:
ADO error:Must declare the variable '@Surname
what must i do to correct this