Re: Form Bound to SQL Indexed View
- From: "AG" <NOSPAMagiamb@xxxxxxxxxxxxxxxx>
- Date: Wed, 2 Jul 2008 08:36:40 -0400
Thanks Charles.
In my case I don't get 'SELECT @@IDENTITY'
I looked at your example again and it is similar to mine, but I am not clear
on how you are adding the new record.
Where are you executing the statement INSERT INTO v_A1A2A3
VALUES(2,'H2',getdate(),2,20,1,'A3.1')?
My situation is a bound Access data*** view form.
--
AG
Email: discussATadhdataDOTcom
""Charles Wang [MSFT]"" <changliw@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:Aj%23JX%2322IHA.1620@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi AG,
What I saw from SQL Profiler was as following:
====================================
[RPC:Completed] exec sp_executesql N'INSERT INTO "dbo"."T2" ("NAME")
VALUES (@P1)',N'@P1 varchar(20)','asdfasdf'
[SQL:BatchStarting] SELECT @@IDENTITY
[SQL:BatchCompleted] SELECT @@IDENTITY
[RPC:Completed] declare @p1 int
set @p1=1
exec sp_prepexec @p1 output,N'@P1 int',N'SELECT "ID","NAME" FROM
"dbo"."T2" WHERE "ID" = @P1',6
select @p1
[RPC:Completed] exec sp_execute 1,6
[RPC:Completed] declare @p1 int
set @p1=2
exec sp_prepexec @p1 output,N'@P1 int,@P2 int,@P3 int,@P4 int,@P5 int,@P6
int,@P7 int,@P8 int,@P9 int,@P10 int',N'SELECT "ID","NAME" FROM
"dbo"."T2"
WHERE "ID" = @P1 OR "ID" = @P2 OR "ID" = @P3 OR "ID" = @P4 OR "ID" = @P5
OR "ID" = @P6 OR "ID" = @P7 OR "ID" = @P8 OR "ID" = @P9 OR "ID" =
@P10',1,2,3,4,5,6,6,6,6,6
select @p1
======================================
That looks fine to me. Could you please let me know what you saw and what
your expected result were from SQL Profiler?
Best regards,
Charles Wang
Microsoft Online Community Support
=========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg@xxxxxxxxxxxxxx
=========================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
=========================================================
.
- Follow-Ups:
- Re: Form Bound to SQL Indexed View
- From: "Charles Wang [MSFT]"
- Re: Form Bound to SQL Indexed View
- References:
- Re: Form Bound to SQL Indexed View
- From: AG
- Re: Form Bound to SQL Indexed View
- From: "Charles Wang [MSFT]"
- Re: Form Bound to SQL Indexed View
- Prev by Date: Re: Windows XP Professional and Office 2007
- Next by Date: Re: Windows XP Professional and Office 2007
- Previous by thread: Re: Form Bound to SQL Indexed View
- Next by thread: Re: Form Bound to SQL Indexed View
- Index(es):