473,785 Members | 2,349 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SqlDataSource UpdateParameter s

Can someone offer some insight of why parameters outside of those contained
in a SqlDataSource <UpdateParamete rs> section would show up in a profiler
trace?

I'm using:
<UpdateParamete rs>
<asp:Paramete r Name="MerchID" Type="Int32" />
<asp:Paramete r Name="Merchant" Type="String" />
<asp:Paramete r Name="ModifiedB y" Type="String" />
</UpdateParameter s>

In the SQL Server Profiler I see:

exec spu_merch
@Merchant=N'tes t',@ModifiedBy= N'jkayne',@Merc hID=1,@Modified Date=''2006-02-28
12:35:46:917'', @EnteredDate='' 2003-10-22 10:29:36:280''

I can't seem to figure out where ModifiedDate and EnteredDate are coming from.
These are optional in my stored procedure and I'd expect to see the folowing
in my profiler trace:

exec spu_merch @Merchant=N'tes t',@ModifiedBy= N'jkayne',@Merc hID=1

Any insight would be extremely appreciated!
Feb 28 '06 #1
3 8967
Do the two date fields have a default value assigned in the table or a
trigger using GETDATE()?
"jkayne" <jk****@discuss ions.microsoft. com> wrote in message
news:6C******** *************** ***********@mic rosoft.com...
Can someone offer some insight of why parameters outside of those
contained
in a SqlDataSource <UpdateParamete rs> section would show up in a profiler
trace?

I'm using:
<UpdateParamete rs>
<asp:Paramete r Name="MerchID" Type="Int32" />
<asp:Paramete r Name="Merchant" Type="String" />
<asp:Paramete r Name="ModifiedB y" Type="String" />
</UpdateParameter s>

In the SQL Server Profiler I see:

exec spu_merch
@Merchant=N'tes t',@ModifiedBy= N'jkayne',@Merc hID=1,@Modified Date=''2006-02-28
12:35:46:917'', @EnteredDate='' 2003-10-22 10:29:36:280''

I can't seem to figure out where ModifiedDate and EnteredDate are coming
from.
These are optional in my stored procedure and I'd expect to see the
folowing
in my profiler trace:

exec spu_merch @Merchant=N'tes t',@ModifiedBy= N'jkayne',@Merc hID=1

Any insight would be extremely appreciated!

Feb 28 '06 #2
Brooke,

The two date fields do not have a default value.

The table does have a trigger that updates these two columns, but I still
wouldn't expect to see the values passed to the stored procedure from the
SqlDataSource would I?

The stored procedure accepts the following parameters allowing the dates to
be optional:

@MerchID int
, @Merchant varchar (64)
, @ModifiedBy nvarchar (256)
, @ModifiedDate datetime = null
, @EnteredDate datetime = null
, @RowCount int = 0 output

"Brooke" wrote:
Do the two date fields have a default value assigned in the table or a
trigger using GETDATE()?
"jkayne" <jk****@discuss ions.microsoft. com> wrote in message
news:6C******** *************** ***********@mic rosoft.com...
Can someone offer some insight of why parameters outside of those
contained
in a SqlDataSource <UpdateParamete rs> section would show up in a profiler
trace?

I'm using:
<UpdateParamete rs>
<asp:Paramete r Name="MerchID" Type="Int32" />
<asp:Paramete r Name="Merchant" Type="String" />
<asp:Paramete r Name="ModifiedB y" Type="String" />
</UpdateParameter s>

In the SQL Server Profiler I see:

exec spu_merch
@Merchant=N'tes t',@ModifiedBy= N'jkayne',@Merc hID=1,@Modified Date=''2006-02-28
12:35:46:917'', @EnteredDate='' 2003-10-22 10:29:36:280''

I can't seem to figure out where ModifiedDate and EnteredDate are coming
from.
These are optional in my stored procedure and I'd expect to see the
folowing
in my profiler trace:

exec spu_merch @Merchant=N'tes t',@ModifiedBy= N'jkayne',@Merc hID=1

Any insight would be extremely appreciated!


Feb 28 '06 #3
The UpdateParameter s do not exclude any of the 2-way databound fields that
match the parameters in your stored proc. If you remove all of the
UpdateParameter s your GridView will still work. The values that you are
getting into ModifiedDate and EneterdDate are from the Bind expressions in
your GridView. If you replace Bind with Eval for those 2 columns in the
GridView you will get null passed to the stored proc for those 2 parameters.
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"jkayne" wrote:
Can someone offer some insight of why parameters outside of those contained
in a SqlDataSource <UpdateParamete rs> section would show up in a profiler
trace?

I'm using:
<UpdateParamete rs>
<asp:Paramete r Name="MerchID" Type="Int32" />
<asp:Paramete r Name="Merchant" Type="String" />
<asp:Paramete r Name="ModifiedB y" Type="String" />
</UpdateParameter s>

In the SQL Server Profiler I see:

exec spu_merch
@Merchant=N'tes t',@ModifiedBy= N'jkayne',@Merc hID=1,@Modified Date=''2006-02-28
12:35:46:917'', @EnteredDate='' 2003-10-22 10:29:36:280''

I can't seem to figure out where ModifiedDate and EnteredDate are coming from.
These are optional in my stored procedure and I'd expect to see the folowing
in my profiler trace:

exec spu_merch @Merchant=N'tes t',@ModifiedBy= N'jkayne',@Merc hID=1

Any insight would be extremely appreciated!

Mar 1 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3400
by: realgeek | last post by:
I have the following code: SqlDataSource ds = new SqlDataSource(); ds.ConnectionString = WebConfigurationManager.ConnectionStrings.ToString(); ds.UpdateCommand = "ad_SetAnswer"; ds.UpdateCommandType = SqlDataSourceCommandType.StoredProcedure; ds.UpdateParameters.Add(new Parameter("@QuestionID")); ds.UpdateParameters.Add(new Parameter("@Answer")); foreach (RepeaterItem li in Repeater1.Items)
1
18891
by: fuchs.markus | last post by:
Hello, on my page, I have a DetailsViewControl connected to a SqlDataSource. Now when I dynamically set the FilterExpression and FilterParameters - for example in a OnClick-EventHandler of a button - the DetailsView shows the filtered Data, but Deleting and Updating doesn't work anymore. The DetailsView changes to EditMode, but after clicking on the UpdateButton it shows the old data. Am I missing something or is it just not possible or...
8
5042
by: Mike Kelly | last post by:
I've chosen to implement the "optimistic concurrency" model in my application. To assist in that, I've added a ROWVERSION (TIMESTAMP) column to my main tables. I read the value of the column in my select, remember it, and then use it in the update. It works just fine when I have full control of the whole process. I want to do the same for my GridView/SqlDataSource combinations. I typically select from a view and update the corresponding...
1
1300
by: Cognizance | last post by:
Hey gang, I'm in the process of fixing an application a former programmer slap together. We found the database design went against company standards, so our DBA went through to fix her up. Now I'm working on the task of fixing the UI code to interact properly with the new changes. However, I've ran in to a strange behavior with UpdateParameters within my SqlDataSource.
2
1589
by: stuart.d.jones | last post by:
Hi, I'm using a detailsview control with an SqlDataSource control. My Update query isn't working, and I've narrowed it down to the optimistic concurrency parameters - i.e. when I comment them out of the query, it works. What seems to be happening is that if a field is NULL when it is read in through the select statement, it's causing the update statment not to find a match. I've got ConvertEmptyStringToNull not set (so it should...
0
3336
by: Ed | last post by:
All of a sudden my previously working code started throwing this error. from the SqlDatasource. I am using C# and Asp.net 2.0. Getting the following error: You have specified that your delete command compares all values on SqlDataSource 'sdsAddEdit', but the dictionary passed in for values is empty. Pass in a valid dictionary for delete or change your mode to OverwriteChanges.
0
1170
by: danielhamd | last post by:
I am converting a website that uses an Access Database to SQL Server. On one particular SqlDataSource I am having a lot of trouble. Here is the original: <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnectionString%>" ProviderName="<%$ ConnectionStrings:MyConnectionString.ProviderName %>" SelectCommand="SELECT , FROM " DeleteCommand="DELETE FROM ContactInfo WHERE DocUNID
1
7089
by: David C | last post by:
I have aspx web page with a GridView that displays data from a SqlDataSource view that combines 2 tables to show information. It has an Edit feature and the SqlDataSource has an UpdateCommand text to run a stored proc that has 2 UPDATE statements (1 for each table) as shown below. When I click the Update link button in Edit mode, the 2nd table changes but not the 1st table. I have tested the stored proc manually and both tables update...
4
9790
by: mohaaron | last post by:
This seems like it should be simple to do but for some reason I have been unable to make it work. I would like to databind a SqlDataSource to a GridView during the click event of a button. This sounds easy but the next requirement is that the GridView is editable. So I have included the SelectCommand and the UpdateCommand on the SqlDataSource to allow the GridView to be editable. I have now been able to get the GridView to display data...
0
9483
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10157
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9956
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8982
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7504
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6742
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5386
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4055
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2887
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.