create Table Test (Field1 int, Field2 varchar(100)) -- Field1 is PK, but has no identity (1,1)!
i want to insert Data from TD Application, the mission is to receive the value for Field1
TSQL: runs ok
insert into Test (Field1) Output Inserted.Field1 select max(Field1)+1 from Test
TD: How can i get the value for Field1
insert into Test (Field1) Output Inserted.Field1 select max(Field1)+1 into :m from Test
sqlprepareandexecute -> returns syntax error in sql
in .NET Code and TSQL it works fine, but i think there is no way in TD...
Use a stored procedure. Some DB folks say to always use stored procedures to handle inserts, edits and deletions. A stored procedure can return any infomation you want.
Who is online
Users browsing this forum: [Ccbot] and 0 guests