Showing posts with label updating. Show all posts
Showing posts with label updating. Show all posts

Thursday, March 29, 2012

Error when updating database

Hi all,
I'm getting an error when updating my database. The connection is fine and the dropdown menu is good also so i think it's the way i've formed my sql string. Here's the line i think i'm having probs with:

SQLString = "UPDATE project_descriptions SET " & _
"lecturer_name = '" & Replace(LecturerName.Text,"'","''") & "'," & _
"project_title = '" & Replace(ProjectTitle.Text,"'","''") & "', " & _
"Project_description = '" & Replace(ProjectDescription.Text,"'","''") & "'," & _
" WHERE project_code = '" & ProjectCode.SelectedItem.Value & "'"

Can anyone rearrange it so i stop getting an error?

Here's my code. if it helps.

<%@. Import Namespace="System.Data.OleDb" %
<SCRIPT language="VB" runat="server"
Dim DBConnection As OleDbConnection
Dim DBCommand As OleDbCommand
Dim DBReader As OleDbDataReader
Dim SQLString As String

Sub Page_Load

If Not Page.IsPostBack Then

'-- Load drop-down list with item numbers
DBConnection = New OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;Data Source=C:\finalyearproject2\projectallocation.mdb")
DBConnection.Open()
SQLString = "SELECT project_code FROM project_descriptions ORDER BY project_code"
DBCommand = New OleDbCommand(SQLString, DBConnection)
DBReader = DBCommand.ExecuteReader()
ProjectCode.DataSource = DBReader
ProjectCode.DataTextField = "project_code"
ProjectCode.DataValueField = "project_code"
ProjectCode.DataBind()
DBReader.Close()
DBConnection.Close()

End If

End Sub

Sub SelectRecord (Src As Object, Args As EventArgs)

DBConnection = New OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;Data Source=C:\finalyearproject2\projectallocation.mdb")
DBConnection.Open()
SQLString = "SELECT * FROM project_descriptions WHERE " & _
"project_code = '" & ProjectCode.SelectedItem.Value & "'"
DBCommand = New OleDbCommand(SQLString, DBConnection)
DBReader = DBCommand.ExecuteReader()
DBReader.Read()
LecturerName.Text = DBReader("lecturer_name")
ProjectTitle.Text = DBReader("project_title")
ProjectDescription.Text = DBReader("project_description")
DBReader.Close()
DBConnection.Close()
UpdateButton.Visible = True

End Sub

Sub UpdateRecord (Src As Object, Args As EventArgs)

'-- CHECK FOR VALID RECORD --
Dim ValidRecord As Boolean = True

'-- Check for missing Project Title
If ProjectTitle.Text = "" Then
ProjectTitleMessage.Text = "Missing Project Title"
ValidRecord = False
End If

'-- Check for missing Lecturer Name
If LecturerName.Text = "" Then
LecturerNameMessage.Text = "Missing Lecturer Name"
ValidRecord = False
End If

'-- Check for missing Project Description
If ProjectDescription.Text = "" Then
ProjectDescriptionMessage.Text = "Missing Project Description"
ValidRecord = False
End If

If ValidRecord = True Then

'-- UPDATE A RECORD --
Try
DBConnection = New OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;Data Source=C:\finalyearproject2\projectallocation.mdb")
DBConnection.Open()

SQLString = "UPDATE project_descriptions SET " "lecturer_name = '" & Replace(LecturerName.Text,"'","''") & "'," "project_title = '" & Replace(ProjectTitle.Text,"'","''") & "', " "Project_description = '" & Replace(ProjectDescription.Text,"'","''") & "'," " WHERE project_code = '" & ProjectCode.SelectedItem.Value & "'"
DBCommand = New OleDbCommand(SQLString, DBConnection)
DBCommand.ExecuteNonQuery
DBConnection.Close()
UpdateMessage.Text = "Record updated"
Catch
UpdateMessage.Text = "Update problem. Record not changed. " & SQLString
End Try

End If

End Sub

</SCRIPT
<html>
<head
<style>
.head {font-family:arial; font-size:12pt; font-weight:bold; width:560px;
border:outset 1 #F0F0F0; padding:2pt; background-color:#990000;
color:#FFFFFF; text-align:center}
.box {font-family:arial; font-size:8pt; line-height:9pt; width:200px;
height:20px; overflow:auto}
.right {text-align:right}
.center {text-align:center}
table {font-family:arial; font-size:8pt; line-height:9pt; width:560px;
background-color:#F9F9F9; border-collapse:collapse}
th {font-family:arial; font-size:8pt; line-height:14pt;
font-weight:bold; text-align:center; vertical-align:bottom;
background-color:#990000; color:#FFFFFF}
td {font-family:arial; font-size:8pt; line-height:9pt;
vertical-align:top}
</style>
</head
<body>
<form runat="server"
<div class="head">Project Update</div
<table id="UpdateTable" border="1" rules="rows">
<tr>
<th> Project Code: </th>
<td><asp:DropDownList id="ProjectCode" runat="server"/>
<asp:Button Text="Select" OnClick="SelectRecord" runat="server"/>
</td>
<td></td>
</tr>
<tr>
<th> Lecturer Name: </th>
<td><asp:TextBox id="LecturerName" runat="server"
Columns="40"
MaxLength="50"/></td>
<td><asp:Label id="LecturerNameMessage" runat="server"
ForeColor="#FF0000"
EnableViewState="False"/></td>
</tr
<tr>
<th> Project Title: </th>
<td><asp:TextBox id="ProjectTitle" runat="server"
Columns="40"
MaxLength="50"/></td>
<td><asp:Label id="ProjectTitleMessage" runat="server"
ForeColor="#FF0000"
EnableViewState="False"/></td>
</tr
<tr>
<th> Project Description: </th>
<td><asp:TextBox id="ProjectDescription" runat="server"
TextMode="MultiLine"
Columns="45"
rows="3"/></td>
<td><asp:Label id="ProjectDescriptionMessage" runat="server"
ForeColor="#FF0000"
EnableViewState="False"/></td>
</tr
</asp:Panel
</table>
<br>
<asp:Button id="UpdateButton" runat="server"
Text="Update Record"
Visible="False"
OnClick="UpdateRecord"/>
<asp:Label id="UpdateMessage" runat="server"
ForeColor="#FF0000"
EnableViewState="False"/>
</form>
</body>
</html>Please, please use parameterized SQL statements, not SQL statements concatenated together with user-supplied data!! What you have now is exposing your application/server/network to SQL injection attacks.

See theServer Side Data Access QuickStart Tutorial, in particularInserting Data in a SQL Database. The techniques used here should be directly applicable to your situation.

Terri|||Thanks for the reply Terri, but in this case I have to do it this way (long story). Any ideas?|||You should post exact error messages -- these go a long way to solving the problem. I am reasonably sure the problem is that you have a comma before your WHERE.

It would be interesting to know why you have to do it this way. It is an ill-advised practice and I have to strongly urge you to use parameters instead.

Terri|||Got it workin, thanks a lot!!! This method is for an assignment. We have to do it both ways. Thanks againsql

Error when updating bigint columns using ADO

I am attempting to write a conversion of our product for Compact Edition; we already provide it based on SQL Server. The database interface uses ADO through a Python-win32com adaptor, and has worked fine so far. (Note: *not* ADO.net, just plain old COM)

Now, a curious thing happens. When inserting new data through a Recordset, everything works fine - except for columns defined as bigint. There are no exceptions thrown, but when you read the columns back they contain nothing but zeroes. Do the same to any other column type - I've tried integer, numeric, float, nvarchar and ntext so far, and they all seem to work just fine. It does not seem to be conversion-related either, since I've tested the exact same data to various column types. And using bigint on regular SQL Server works just fine.

The code involved is quite unspectacular, and simply switching the column types to integer would solve the immediate problem, but causes potential future issues since we normally store internal IDs in bigint columns, and the values may grow quite large.
This may indicate a problem with compatibility betweeen the 3rd party python ADO adaptor and the SQL CE OLEDB provider.

Error when updating

I get the following error when I execute the statement below. 'Invalid
length parameter passed to the substring function'
Update Tbl_Txn_UT
Set Fxd_Units =
CASE
WHEN TxnUnitsBase is Null and (TxnUnits like '%,%' or TxnUnits like
'%M%' and TxnUnitsDur like '%M%')
THEN Cast(left(TxnUnitsDur,len(TxnUnitsDur)-1)as Float)/15
WHEN TxnUnitsDur is Null and (TxnUnits like '%,%' or TxnUnits like
'%M%')
THEN TxnUnitsBase
WHEN (TxnUnits like '%,%' or TxnUnits like '%M%')
THEN Cast(left(TxnUnitsDur,len(TxnUnitsDur)-1)as Float)/15 +
TxnUnitsBase
Else TxnUnits
END
Where TxnUnits is not Null
It took a while to get this code correct with help and now evidently one of
the answers from the math causes an error. Any help is appreciated.Hi
Posting DDL an example data would help to see what you are trying to achive
and help re-create the problem. The statement is assuming that TxnUnitsDur i
s
at least one character which could is probably causing the problem.
John
"Job" wrote:

> I get the following error when I execute the statement below. 'Invalid
> length parameter passed to the substring function'
> Update Tbl_Txn_UT
> Set Fxd_Units =
> CASE
> WHEN TxnUnitsBase is Null and (TxnUnits like '%,%' or TxnUnits like
> '%M%' and TxnUnitsDur like '%M%')
> THEN Cast(left(TxnUnitsDur,len(TxnUnitsDur)-1)as Float)/15
> WHEN TxnUnitsDur is Null and (TxnUnits like '%,%' or TxnUnits like
> '%M%')
> THEN TxnUnitsBase
> WHEN (TxnUnits like '%,%' or TxnUnits like '%M%')
> THEN Cast(left(TxnUnitsDur,len(TxnUnitsDur)-1)as Float)/15 +
> TxnUnitsBase
> Else TxnUnits
> END
> Where TxnUnits is not Null
>
> It took a while to get this code correct with help and now evidently one o
f
> the answers from the math causes an error. Any help is appreciated.
>
>|||"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:B6369D9E-3B4A-4F9B-A443-13463C76635C@.microsoft.com...
> Hi
> Posting DDL an example data would help to see what you are trying to
> achive
> and help re-create the problem. The statement is assuming that TxnUnitsDur
> is
> at least one character which could is probably causing the problem.
> John
> "Job" wrote:
>|||Ju
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:B6369D9E-3B4A-4F9B-A443-13463C76635C@.microsoft.com...
> Hi
> Posting DDL an example data would help to see what you are trying to
> achive
> and help re-create the problem. The statement is assuming that TxnUnitsDur
> is
> at least one character which could is probably causing the problem.
> John
> "Job" wrote:
>|||Hi
You seem to have some problem posting?
John
"Job" <Job@.nomail.com> wrote in message
news:uUH$jpCoFHA.708@.TK2MSFTNGP09.phx.gbl...
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:B6369D9E-3B4A-4F9B-A443-13463C76635C@.microsoft.com...
>|||John, your correct. I included the case statement if len(TxnUnitsDur )
= 0 then TxnUnitsBase and it worked perfectly.
Cheers!
Job wrote:
> Ju
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:B6369D9E-3B4A-4F9B-A443-13463C76635C@.microsoft.com...
>
>
>

Monday, March 26, 2012

Error when perform an update on Immediate Updating Subscriber

I have transaction replication setup between two servers running SQL Server
2000 (standard edition). The subscriber is an immediate updating subscriber.
I am having an issue when I try to update two tables from the subscriber.
When I attempt to perform an update on either table, I receive an error like
the following:
Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near ')'.
Server: Msg 137, Level 15, State 1, Line 5
Must declare the variable '@.c120o'.
I looked at the syntax of the trg_MSsync_upd_<tablename> trigger and cannot
see any problem with the trigger's syntax.
Any help anyone can provide would be greatly appreciated.
Michael Conway
Calltower, Inc.
Database Administrator
Can you post the name and schema of your problem article?
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"mconway" <mconway@.calltower.com.(donotspam)> wrote in message
news:33FA51A4-1FE7-494F-B992-20C644B3F0E2@.microsoft.com...
>I have transaction replication setup between two servers running SQL Server
> 2000 (standard edition). The subscriber is an immediate updating
> subscriber.
>
> I am having an issue when I try to update two tables from the subscriber.
> When I attempt to perform an update on either table, I receive an error
> like
> the following:
> Server: Msg 170, Level 15, State 1, Line 2
> Line 2: Incorrect syntax near ')'.
> Server: Msg 137, Level 15, State 1, Line 5
> Must declare the variable '@.c120o'.
> I looked at the syntax of the trg_MSsync_upd_<tablename> trigger and
> cannot
> see any problem with the trigger's syntax.
> Any help anyone can provide would be greatly appreciated.
>
> --
> Michael Conway
> Calltower, Inc.
> Database Administrator
|||I am having the issue with two articles so I am going to post the schema for
both tables. I am posting the schema as it is in production. There are
spaces in some of the column names, and at first I thought that this was the
cause of the problem, however I removed the spaces in the column names and
still received the same error.
CREATE TABLE [dbo].[Accounts] (
[ID] [int] IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL ,
[FName] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[LName] [nvarchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[SSN] [nvarchar] (9) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Phone] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Phone2] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Phone3] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Street] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[City] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[State] [nvarchar] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Zip] [nvarchar] (5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Email] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Status] [nvarchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Grid] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Install Start Time] [int] NULL ,
[Install Duration] [int] NULL ,
[Sale Date] [smalldatetime] NULL ,
[Install Date] [smalldatetime] NULL ,
[Charge Back] [smalldatetime] NULL ,
[Who Entered] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[timeentered] [smalldatetime] NULL ,
[Lead Name] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Rep Name] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Tech Name] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Lead ID] [int] NULL ,
[Rep ID] [int] NULL ,
[Technician ID] [int] NULL ,
[Leadpaid] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Reppaid] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Techpaid] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Lead pay] [float] NULL ,
[Lead holdback] [float] NULL ,
[Lead bonus] [float] NULL ,
[Rep pay] [float] NULL ,
[Rep holdback] [float] NULL ,
[Rep bonus] [float] NULL ,
[Tech pay] [float] NULL ,
[Tech holdback] [float] NULL ,
[Tech bonus] [float] NULL ,
[AreaID] [int] NULL ,
[CC Number] [nvarchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Promotion] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Promotion ID] [int] NULL ,
[Kit ID] [int] NULL ,
[Shipping Vendor] [nvarchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Tracking Number] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Certificate Number] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS
NULL ,
[Virtual Certificate] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS
NULL ,
[Wiring] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Channels] [nvarchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Structure] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Story] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Roof] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Cable] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Home Type] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Ala Carte] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[General] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Local] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Payment Type] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Receivers] [tinyint] NULL ,
[Payment] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Account Number] [nvarchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[R001] [nvarchar] (9) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[R002] [nvarchar] (9) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[R003] [nvarchar] (9) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[R004] [nvarchar] (9) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Claim ID] [nvarchar] (11) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Owe] [float] NULL ,
[Tax] [float] NULL ,
[Collected] [float] NULL ,
[Autodebit] [tinyint] NULL ,
[Processed] [tinyint] NULL ,
[Submitted] [tinyint] NULL ,
[Paid] [tinyint] NULL ,
[Follow Up] [tinyint] NULL ,
[Processed Date] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Submitted Date] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Paid Date] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[collections] [tinyint] NULL ,
[campaignid] [int] NULL ,
[satelliteprovider] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS
NULL ,
[basepackageid] [int] NULL ,
[programmingquote] [float] NULL ,
[dishlocals] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[directlocals] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[numbertvs] [int] NULL ,
[subscriberid] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[contactdate] [datetime] NULL ,
[progreceivers] [int] NULL ,
[progprovider] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[progpackage] [int] NULL ,
[progpromotionid] [int] NULL ,
[confirminstallation] [tinyint] NULL ,
[arrival] [datetime] NULL ,
[departure] [datetime] NULL ,
[arrivalcode] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[departurecode] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[R005] [varchar] (9) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[R006] [varchar] (9) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Promo Code] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[confirminstalldate] [datetime] NULL ,
[received] [tinyint] NULL ,
[receiveddate] [datetime] NULL ,
[cancelled] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Fullfillment] [tinyint] NULL ,
[UpgradeID] [int] NULL ,
[leadreceivers] [float] NULL ,
[repreceivers] [float] NULL ,
[techreceivers] [float] NULL ,
[techmaterials] [float] NULL ,
[leadequipment] [float] NULL ,
[repequipment] [float] NULL ,
[techequipment] [float] NULL ,
[chargebackpaid] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[claimupdated] [float] NULL ,
[claimupdateddate] [datetime] NULL ,
[ScheduleSlotID] [bigint] NULL ,
[Warranty] [tinyint] NULL ,
[PreviousProvider] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Gender] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Employer] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[DOB] [datetime] NULL ,
[ReferralID] [bigint] NULL ,
[ReferralName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Installed] [tinyint] NULL ,
[OldKitID] [bigint] NULL ,
[OldPromotionID] [bigint] NULL ,
[ClaimID2] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[OldUpgradeID] [bigint] NULL ,
[BoundType] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[street2] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[UpgradeOptions] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[DriversLicense] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[DLState] [varchar] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[ChargebackReason] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[ConvertDate] [datetime] NULL ,
[ConverTempID] [bigint] NULL ,
[LastUpdate] [datetime] NULL ,
[LastUpdateEmpID] [bigint] NULL ,
[msrepl_tran_version] [uniqueidentifier] NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[Employee] (
[ID] [int] IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL ,
[FName] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[LName] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Phone] [nvarchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Phone2] [nvarchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Phone3] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Inactive] [smallint] NULL ,
[Lead Plan] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Rep Plan] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Tech Plan] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[user] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[password] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[expiration date] [smalldatetime] NULL ,
[street] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[city] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[zip] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[state] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[ssn] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[email] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Type] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Lead Rep] [tinyint] NULL ,
[Rep] [tinyint] NULL ,
[Tech] [tinyint] NULL ,
[links] [tinyint] NULL ,
[add] [tinyint] NULL ,
[update] [tinyint] NULL ,
[delete] [tinyint] NULL ,
[lookup] [tinyint] NULL ,
[scheduler] [tinyint] NULL ,
[accounts] [tinyint] NULL ,
[openticket] [tinyint] NULL ,
[openbilling] [tinyint] NULL ,
[leadcenter] [tinyint] NULL ,
[creditcard] [tinyint] NULL ,
[employee] [tinyint] NULL ,
[areas] [tinyint] NULL ,
[promotions] [tinyint] NULL ,
[promocodes] [tinyint] NULL ,
[makekits] [tinyint] NULL ,
[equipment] [tinyint] NULL ,
[payplans] [tinyint] NULL ,
[preferences] [tinyint] NULL ,
[commissions] [tinyint] NULL ,
[admin] [tinyint] NULL ,
[reports] [tinyint] NULL ,
[receivers] [tinyint] NULL ,
[export] [tinyint] NULL ,
[payments] [tinyint] NULL ,
[production] [tinyint] NULL ,
[route] [tinyint] NULL ,
[statistics] [tinyint] NULL ,
[status] [tinyint] NULL ,
[leadaccounts] [tinyint] NULL ,
[leadpayroll] [tinyint] NULL ,
[repaccounts] [tinyint] NULL ,
[reppayroll] [tinyint] NULL ,
[techpayroll] [tinyint] NULL ,
[techaccounts] [tinyint] NULL ,
[top] [tinyint] NULL ,
[installed] [tinyint] NULL ,
[pending] [tinyint] NULL ,
[cancelled] [tinyint] NULL ,
[chargeback] [tinyint] NULL ,
[reconciliation] [tinyint] NULL ,
[accounting] [tinyint] NULL ,
[receiveables] [tinyint] NULL ,
[reserviced] [tinyint] NULL ,
[rescheduled] [tinyint] NULL ,
[notscheduled] [tinyint] NULL ,
[channels] [tinyint] NULL ,
[churn] [tinyint] NULL ,
[r00] [tinyint] NULL ,
[missing payments] [tinyint] NULL ,
[deactivations] [tinyint] NULL ,
[disconnects] [tinyint] NULL ,
[salestax] [tinyint] NULL ,
[residuals] [tinyint] NULL ,
[exceptions] [tinyint] NULL ,
[servicecalls] [tinyint] NULL ,
[ra] [tinyint] NULL ,
[individualstatistics] [tinyint] NULL ,
[allstatus] [tinyint] NULL ,
[process] [tinyint] NULL ,
[campaigns] [tinyint] NULL ,
[adcampaignreport] [tinyint] NULL ,
[equipmentsalesreport] [tinyint] NULL ,
[missingcertsreport] [tinyint] NULL ,
[undepositedfunds] [tinyint] NULL ,
[Inventory] [tinyint] NULL ,
[TechArriveDepart] [tinyint] NULL ,
[TechInventoryReport] [tinyint] NULL ,
[btnR00] [tinyint] NULL ,
[btnNotes] [tinyint] NULL ,
[btnInvoices] [tinyint] NULL ,
[btnProgramming] [tinyint] NULL ,
[btnReceivables] [tinyint] NULL ,
[btnCreditCard] [tinyint] NULL ,
[btnBankInfo] [tinyint] NULL ,
[btnBilling] [tinyint] NULL ,
[btnContract] [tinyint] NULL ,
[btnService] [tinyint] NULL ,
[btnQuote] [tinyint] NULL ,
[quickbooks] [tinyint] NULL ,
[dataexport] [tinyint] NULL ,
[dataimport] [tinyint] NULL ,
[fake1] [tinyint] NULL ,
[fake2] [tinyint] NULL ,
[fake3] [tinyint] NULL ,
[fake4] [tinyint] NULL ,
[hours] [tinyint] NULL ,
[payrolladministrator] [tinyint] NULL ,
[servicepay] [float] NULL ,
[timeoff] [tinyint] NULL ,
[installation] [tinyint] NULL ,
[negativecommissions] [tinyint] NULL ,
[collections] [tinyint] NULL ,
[WarrantySalesReport] [tinyint] NULL ,
[EmployeeSalesReport] [tinyint] NULL ,
[CommissionsReport] [tinyint] NULL ,
[UserType] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[TextMessage] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[btnCreditCardView] [tinyint] NULL ,
[btnMoveToLead] [tinyint] NULL ,
[btnManualSchedule] [tinyint] NULL ,
[CancelledReasonReport] [tinyint] NULL ,
[ReferralsReport] [tinyint] NULL ,
[callbacknotes] [tinyint] NULL ,
[toptechs] [tinyint] NULL ,
[LeadLedger] [tinyint] NULL ,
[RepLedger] [tinyint] NULL ,
[TechLedger] [tinyint] NULL ,
[Forecasting] [tinyint] NULL ,
[UserLogin] [tinyint] NULL ,
[POs] [tinyint] NULL ,
[AddEquipment] [tinyint] NULL ,
[EquipmentInventory] [tinyint] NULL ,
[AdjustInventory] [tinyint] NULL ,
[EquipmentLookup] [tinyint] NULL ,
[Aging] [tinyint] NULL ,
[DishCode] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[DirectCode] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[SalesByVendor] [tinyint] NULL ,
[InstalledReceivers] [tinyint] NULL ,
[TopOffice] [tinyint] NULL ,
[RepInvoices] [tinyint] NULL ,
[msrepl_tran_version] [uniqueidentifier] NOT NULL
) ON [PRIMARY]
"Hilary Cotter" wrote:

> Can you post the name and schema of your problem article?
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> "mconway" <mconway@.calltower.com.(donotspam)> wrote in message
> news:33FA51A4-1FE7-494F-B992-20C644B3F0E2@.microsoft.com...
>
>
|||I tried unsubscribing to the publication. Then I removed any spaces in the
column names and changed any column names that were using reserved words.
Then I recreated the subscription and subscriber database. However, I still
received the same errors when I tried to update the two tables.
"Hilary Cotter" wrote:

> Can you post the name and schema of your problem article?
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> "mconway" <mconway@.calltower.com.(donotspam)> wrote in message
> news:33FA51A4-1FE7-494F-B992-20C644B3F0E2@.microsoft.com...
>
>

Sunday, February 26, 2012

Error Updating Installed Files

Well I need to know HOW TO REMOVE MANUALLY every pieace of the Database Services for my SQL Server Express CTP previous installation because the final release won't let me update this Database Services, any suggestion besides removing manually the services? thank you all

You should be able to remove the CTP from the Add/Remove Programs window, have you tried that? Add/Remove is the only way to uninstall SQL Server.

Regards,

Mike Wachal

|||

yes I removed it first that way but the same problem, I googled a bit and I found that removing the whole directory I could solve this and I did it also deleted some registry keys that I dont remember which one ups anyway I guess the problem was the SQL Server directory thanks

|||

Good to hear you've gotten it figured out, thanks for posting back to the forum.

- Mike

|||

Hi

When I tried to install the SQL Server 2005 version I got the following error

The setup has encountered an unexpected error while Updating Installed Files. The error is: Fatal error during installation.

Can you please let me know how did you resolved this error.

Funny thing is I have nothing installed on the box except IIS(Internet Information Services) still getting this error. When I google it looks like all the people who face this error because they have beta installations on their boxes.

Thanks in Advance. Your reply may helps me a lot.

Kiran

Error Updating Installed Files

Well I need to know HOW TO REMOVE MANUALLY every pieace of the Database Services for my SQL Server Express CTP previous installation because the final release won't let me update this Database Services, any suggestion besides removing manually the services? thank you all

You should be able to remove the CTP from the Add/Remove Programs window, have you tried that? Add/Remove is the only way to uninstall SQL Server.

Regards,

Mike Wachal

|||

yes I removed it first that way but the same problem, I googled a bit and I found that removing the whole directory I could solve this and I did it also deleted some registry keys that I dont remember which one ups anyway I guess the problem was the SQL Server directory thanks

|||

Good to hear you've gotten it figured out, thanks for posting back to the forum.

- Mike

|||

Hi

When I tried to install the SQL Server 2005 version I got the following error

The setup has encountered an unexpected error while Updating Installed Files. The error is: Fatal error during installation.

Can you please let me know how did you resolved this error.

Funny thing is I have nothing installed on the box except IIS(Internet Information Services) still getting this error. When I google it looks like all the people who face this error because they have beta installations on their boxes.

Thanks in Advance. Your reply may helps me a lot.

Kiran

Error updating dynamic datagrid with SQL server

Hello, I have a datagrid which is populated with data from an MS SQL server database.

When I run an update query it always throws an exception - what is the most likely cause for this given that I am using the code below:

1public void DataGrid_Update(Object sender, DataGridCommandEventArgs e)2 {3 String update ="UPDATE Fruit SET Product = @.ID, Quantity = @.Q, Price = @.P, Total = @.T where Product = @.Id";45 SqlCommand command =new SqlCommand(update, conn);67command.Parameters.Add(new SqlParameter("@.ID", SqlDbType.NVarChar, 50));8 command.Parameters.Add(new SqlParameter("@.Q", SqlDbType.NVarChar, 50));9 command.Parameters.Add(new SqlParameter("@.P", SqlDbType.NVarChar, 50));10 command.Parameters.Add(new SqlParameter("@.T", SqlDbType.NVarChar, 50));11 command.Parameters["@.ID"].Value = DataGrid.DataKeys[(int)e.Item.ItemIndex];12 command.Connection.Open();1314try15 {16 command.ExecuteNonQuery();17 Message.InnerHtml ="Update complete!" + update;18 DataGrid.EditItemIndex = -1;19 }20catch (SqlException exc)21 {22 Message.InnerHtml ="Update error.";23 }2425 command.Connection.Close();2627 BindGrid();28 }

All of the row types in MS SQL server are set to nvarchar(50) - as I thought this would eliminate any inconsistencies in types.

Thanks anyone

Hi,

Can you show us the error message which can help us to solve the problem.

Thanks.

|||

Sorry if this does not make sense although I printed the SQL exception to screen.

I also changed my code a bit as I needed to change the look of the website therefore the error line number has changed to 65.

Updateerror.System.Data.SqlClient.SqlException: The parameterized query '(@.IDnvarchar(50),@.Q nvarchar(50),@.P nvarchar(50),@.T nvarchar(50' expectsthe parameter '@.Q', which was not supplied. atSystem.Data.SqlClient.SqlConnection.OnError(SqlException exception,Boolean breakConnection) atSystem.Data.SqlClient.SqlInternalConnection.OnError(SqlExceptionexception, Boolean breakConnection) atSystem.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObjectstateObj) at System.Data.SqlClient.TdsParser.Run(RunBehaviorrunBehavior, SqlCommand cmdHandler, SqlDataReader dataStream,BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReaderds, RunBehavior runBehavior, String resetOptionsString) atSystem.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehaviorcmdBehavior, RunBehavior runBehavior, Boolean returnStream, Booleanasync) atSystem.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehaviorcmdBehavior, RunBehavior runBehavior, Boolean returnStream, Stringmethod, DbAsyncResult result) atSystem.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResultresult, String methodName, Boolean sendToPipe) atSystem.Data.SqlClient.SqlCommand.ExecuteNonQuery() atASP.asp_aspx.MyDataGrid_Update(Object sender, DataGridCommandEventArgse) in c:\Inetpub\wwwroot\asp.aspx:line 65

Cheers

|||

Hi,

From the error message, i think the situation is that the parameters isn't supplied to the sql statement correctly. You can insert a breakpoint in "command.ExecuteNonQuery();" and check the local variable such as @.ID, @.Q, @.P and update statement. You can find out which parameters is not working properly.

Hope that helps. Thanks.

|||

How would I insert a breakpoint in "command.ExecuteNonQuery();". I guess just "break;" just after the statement - but would that give any more error output. Please suggest how I should do this.

Cheers

|||

Hi,

What I mean is one kind of debug tool. Just move your mouse to ""command.ExecuteNonQuery();" sentence and right click, a menu will be shown and find breakpoint and click on "Insert BreakPoint". And then run your applicaiton, it will interuppt while running to the breakpoint, and then, in the below window of your Visual Studio, you'll find a Local tab, under the tab, you can see all the current value of local variable, just check these to find if each parameters do have provided the input value properly.

Thanks.

Error Updating DB2 on MVS-MF from a Linked Server

Need to be able to run update queries on DB2 on IBM MF from a Linked Server. Select and Insert queries work but Update and Delete queries don't. DB2 connect is installed and ODBC System dsn's are created for DEV and Production DB2 environments.

The ODBC drivers can be selected when running Imports/Exports but can't be specified through a linked server.

Any Ideas?

Tom...

Linked Servers do not directly support ODBC drivers, but you can plug in ODBC drivers by using a OLE DB to ODBC bridge technology 'Microsoft OLE DB Provider for ODBC (MSDASQL)'. This componentships with MDAC but is not available on 64-bit at this time.

Although option would be to use Microsoft's DB2 OLE DB Provider directly with Linked Server available for download on http://www.microsoft.com/downloads/details.aspx?FamilyId=50b97994-8453-4998-8226-fa42ec403d17&DisplayLang=en

Microsoft OLEDB Provider for DB2

The Microsoft OLE DB Provider for DB2 is a COM component for integrating vital data stored in IBM DB2 databases with new solutions based on Microsoft SQL Server 2005 Enterprise Edition and Developer Edition. SQL Server developers and administrators can use the provider with Integration Services, Analysis Services, Replication, Reporting Services, and Distributed Query Processor. Run the self-extracting download package to create an installation folder. The single setup program will install the provider and tools on x86, x64, and IA64 computers. The package includes product updates in the form of an integrated Service Pack 1. Read the installation guide and Readme for more information.

Error updating data in table that uses a trigger?

Hello. I am new to SQL Server Management Studio 2005 and am using it to connect to a database on another machine running SQL Server 2000. Everything seems to work well, except when I try to edit table data on a particular table that has an update trigger associated with it. I am receiving the error:

-

The data in row 1 was not committed.

Error Source: Microsoft.VisualStudio.DataTools.

Error Message: The row value(s) updated or deleted either do not make the row unique or they alter multiple rows(5 rows).

Correct the errors and retry or press ESC to chancel the changes.

--

I want it to update those the 5 rows in the other tables...that's the whole point of having the trigger!

This used to work fine from Enterprise Manager 2000 and If I issue the update query manually from the new integrated "Query Analyzer" it is also ok. Is there some way to deactivate this new feature from the table viewer?

Thanks very much!

That error message occurred once for because there was a constraint which the deletion violated. I believe I had a field set to "NOT NULL" and the deletion was attempting to delete just that field for some reason.|||Also make sure that there are not two rows where every column is exactly the same.|||

Thanks for responding. My modification is not causing duplicate records to be created, nor am I violating any of my table rules (such as not NULL).

What I have is a trigger associated with my table so that whenever a record is updated it runs a stored procedure which then updates related information in other tables. It is not an error, but a very essential function of my database.

If I issue a manual update query (with query analyzer) I receive no errors and my trigger runs perfectly. It's only when I try to update a record interactively with the "Open Table" viewer/interface that I receive the error.

This new feature is very disruptive to the way I work and I was hoping that there was an option somewhere to turn it off, or make it so that it only applies to real errors such as duplicate records being created.

Thanks....

|||Can you run Profiler and gather a trace to see what it's doing differently than QA?|||

It's not really doing anything different, it's just that the new interactive "table viewer" has some sort of error checking routine that prohibits the update from executing because it sees that the query will affect data in other tables... which is what it was designed to do and worked flawlessly with Enterprise Manager 2000.

Am I the only person here who uses triggers to update data in other tables?

Thanks...

|||

You're absolutely not... I have the same problem. Very frustrating having to run the old version of Enterprise Manager just to update a few values.

Did you manage to find a fix for this?

|||Nope. No fix yet (that I'm aware of). Maybe if we keep this thread visible someone higher up can recommend that it be addressed in the next service pack.|||

Please file a defect report with the MSDN Feedback Center (http://lab.msdn.microsoft.com/productfeedback/).

If you can include a minimal script to create sample tables and a stored procedure to set up the test, that will help quite a bit.

Thanks,
Steve

|||

This appears to be a bug in the how SMSS is interperting the ADO 'feedback' area.

I have a table (T1) with a trigger that updates another table (T2) on INSERT and UPDATE.

1. UPDATE T1 SET C1 = 'value' WHERE ID=2 works fines

2. Trapping the SSMS generated 'sp_executesql' statement using Profiler and then executing it works fine.

3. Using SSMS to update the same row results in the error above.

Note that both1 and 2 above result in messages as follows:

(1 row(s) affected)

(1 row(s) affected)

If memory serves me right these 'messages' are both passed back in the ADO 'feedback' area and can be processed by the code of SSMS. Seems the code wasn't tested with replications scenarios.

Im on W2K3 and SQL 2005 SP plus hot fixes.

|||

There is an open Microsoft Connect issue... you can track the progress here:
https://connect.microsoft.com:443/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=125566

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/

|||I'm not sure if this will help any of you but I was able to get around this by putting a SET NOCOUNT ON at the beginning of my trigger.

Error updating data in table that uses a trigger?

Hello. I am new to SQL Server Management Studio 2005 and am using it to connect to a database on another machine running SQL Server 2000. Everything seems to work well, except when I try to edit table data on a particular table that has an update trigger associated with it. I am receiving the error:

-

The data in row 1 was not committed.

Error Source: Microsoft.VisualStudio.DataTools.

Error Message: The row value(s) updated or deleted either do not make the row unique or they alter multiple rows(5 rows).

Correct the errors and retry or press ESC to chancel the changes.

--

I want it to update those the 5 rows in the other tables...that's the whole point of having the trigger!

This used to work fine from Enterprise Manager 2000 and If I issue the update query manually from the new integrated "Query Analyzer" it is also ok. Is there some way to deactivate this new feature from the table viewer?

Thanks very much!

That error message occurred once for because there was a constraint which the deletion violated. I believe I had a field set to "NOT NULL" and the deletion was attempting to delete just that field for some reason.|||Also make sure that there are not two rows where every column is exactly the same.|||

Thanks for responding. My modification is not causing duplicate records to be created, nor am I violating any of my table rules (such as not NULL).

What I have is a trigger associated with my table so that whenever a record is updated it runs a stored procedure which then updates related information in other tables. It is not an error, but a very essential function of my database.

If I issue a manual update query (with query analyzer) I receive no errors and my trigger runs perfectly. It's only when I try to update a record interactively with the "Open Table" viewer/interface that I receive the error.

This new feature is very disruptive to the way I work and I was hoping that there was an option somewhere to turn it off, or make it so that it only applies to real errors such as duplicate records being created.

Thanks....

|||Can you run Profiler and gather a trace to see what it's doing differently than QA?|||

It's not really doing anything different, it's just that the new interactive "table viewer" has some sort of error checking routine that prohibits the update from executing because it sees that the query will affect data in other tables... which is what it was designed to do and worked flawlessly with Enterprise Manager 2000.

Am I the only person here who uses triggers to update data in other tables?

Thanks...

|||

You're absolutely not... I have the same problem. Very frustrating having to run the old version of Enterprise Manager just to update a few values.

Did you manage to find a fix for this?

|||Nope. No fix yet (that I'm aware of). Maybe if we keep this thread visible someone higher up can recommend that it be addressed in the next service pack.|||

Please file a defect report with the MSDN Feedback Center (http://lab.msdn.microsoft.com/productfeedback/).

If you can include a minimal script to create sample tables and a stored procedure to set up the test, that will help quite a bit.

Thanks,
Steve

|||

This appears to be a bug in the how SMSS is interperting the ADO 'feedback' area.

I have a table (T1) with a trigger that updates another table (T2) on INSERT and UPDATE.

1. UPDATE T1 SET C1 = 'value' WHERE ID=2 works fines

2. Trapping the SSMS generated 'sp_executesql' statement using Profiler and then executing it works fine.

3. Using SSMS to update the same row results in the error above.

Note that both1 and 2 above result in messages as follows:

(1 row(s) affected)

(1 row(s) affected)

If memory serves me right these 'messages' are both passed back in the ADO 'feedback' area and can be processed by the code of SSMS. Seems the code wasn't tested with replications scenarios.

Im on W2K3 and SQL 2005 SP plus hot fixes.

|||

There is an open Microsoft Connect issue... you can track the progress here:
https://connect.microsoft.com:443/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=125566

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/

|||I'm not sure if this will help any of you but I was able to get around this by putting a SET NOCOUNT ON at the beginning of my trigger.

Error updating data in table that uses a trigger?

Hello. I am new to SQL Server Management Studio 2005 and am using it to connect to a database on another machine running SQL Server 2000. Everything seems to work well, except when I try to edit table data on a particular table that has an update trigger associated with it. I am receiving the error:

-

The data in row 1 was not committed.

Error Source: Microsoft.VisualStudio.DataTools.

Error Message: The row value(s) updated or deleted either do not make the row unique or they alter multiple rows(5 rows).

Correct the errors and retry or press ESC to chancel the changes.

--

I want it to update those the 5 rows in the other tables...that's the whole point of having the trigger!

This used to work fine from Enterprise Manager 2000 and If I issue the update query manually from the new integrated "Query Analyzer" it is also ok. Is there some way to deactivate this new feature from the table viewer?

Thanks very much!

That error message occurred once for because there was a constraint which the deletion violated. I believe I had a field set to "NOT NULL" and the deletion was attempting to delete just that field for some reason.|||Also make sure that there are not two rows where every column is exactly the same.|||

Thanks for responding. My modification is not causing duplicate records to be created, nor am I violating any of my table rules (such as not NULL).

What I have is a trigger associated with my table so that whenever a record is updated it runs a stored procedure which then updates related information in other tables. It is not an error, but a very essential function of my database.

If I issue a manual update query (with query analyzer) I receive no errors and my trigger runs perfectly. It's only when I try to update a record interactively with the "Open Table" viewer/interface that I receive the error.

This new feature is very disruptive to the way I work and I was hoping that there was an option somewhere to turn it off, or make it so that it only applies to real errors such as duplicate records being created.

Thanks....

|||Can you run Profiler and gather a trace to see what it's doing differently than QA?|||

It's not really doing anything different, it's just that the new interactive "table viewer" has some sort of error checking routine that prohibits the update from executing because it sees that the query will affect data in other tables... which is what it was designed to do and worked flawlessly with Enterprise Manager 2000.

Am I the only person here who uses triggers to update data in other tables?

Thanks...

|||

You're absolutely not... I have the same problem. Very frustrating having to run the old version of Enterprise Manager just to update a few values.

Did you manage to find a fix for this?

|||Nope. No fix yet (that I'm aware of). Maybe if we keep this thread visible someone higher up can recommend that it be addressed in the next service pack.|||

Please file a defect report with the MSDN Feedback Center (http://lab.msdn.microsoft.com/productfeedback/).

If you can include a minimal script to create sample tables and a stored procedure to set up the test, that will help quite a bit.

Thanks,
Steve

|||

This appears to be a bug in the how SMSS is interperting the ADO 'feedback' area.

I have a table (T1) with a trigger that updates another table (T2) on INSERT and UPDATE.

1. UPDATE T1 SET C1 = 'value' WHERE ID=2 works fines

2. Trapping the SSMS generated 'sp_executesql' statement using Profiler and then executing it works fine.

3. Using SSMS to update the same row results in the error above.

Note that both1 and 2 above result in messages as follows:

(1 row(s) affected)

(1 row(s) affected)

If memory serves me right these 'messages' are both passed back in the ADO 'feedback' area and can be processed by the code of SSMS. Seems the code wasn't tested with replications scenarios.

Im on W2K3 and SQL 2005 SP plus hot fixes.

|||

There is an open Microsoft Connect issue... you can track the progress here:
https://connect.microsoft.com:443/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=125566

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/

|||I'm not sure if this will help any of you but I was able to get around this by putting a SET NOCOUNT ON at the beginning of my trigger.

Error updating data in table that uses a trigger?

Hello. I am new to SQL Server Management Studio 2005 and am using it to connect to a database on another machine running SQL Server 2000. Everything seems to work well, except when I try to edit table data on a particular table that has an update trigger associated with it. I am receiving the error:

-

The data in row 1 was not committed.

Error Source: Microsoft.VisualStudio.DataTools.

Error Message: The row value(s) updated or deleted either do not make the row unique or they alter multiple rows(5 rows).

Correct the errors and retry or press ESC to chancel the changes.

--

I want it to update those the 5 rows in the other tables...that's the whole point of having the trigger!

This used to work fine from Enterprise Manager 2000 and If I issue the update query manually from the new integrated "Query Analyzer" it is also ok. Is there some way to deactivate this new feature from the table viewer?

Thanks very much!

That error message occurred once for because there was a constraint which the deletion violated. I believe I had a field set to "NOT NULL" and the deletion was attempting to delete just that field for some reason.|||Also make sure that there are not two rows where every column is exactly the same.|||

Thanks for responding. My modification is not causing duplicate records to be created, nor am I violating any of my table rules (such as not NULL).

What I have is a trigger associated with my table so that whenever a record is updated it runs a stored procedure which then updates related information in other tables. It is not an error, but a very essential function of my database.

If I issue a manual update query (with query analyzer) I receive no errors and my trigger runs perfectly. It's only when I try to update a record interactively with the "Open Table" viewer/interface that I receive the error.

This new feature is very disruptive to the way I work and I was hoping that there was an option somewhere to turn it off, or make it so that it only applies to real errors such as duplicate records being created.

Thanks....

|||Can you run Profiler and gather a trace to see what it's doing differently than QA?|||

It's not really doing anything different, it's just that the new interactive "table viewer" has some sort of error checking routine that prohibits the update from executing because it sees that the query will affect data in other tables... which is what it was designed to do and worked flawlessly with Enterprise Manager 2000.

Am I the only person here who uses triggers to update data in other tables?

Thanks...

|||

You're absolutely not... I have the same problem. Very frustrating having to run the old version of Enterprise Manager just to update a few values.

Did you manage to find a fix for this?

|||Nope. No fix yet (that I'm aware of). Maybe if we keep this thread visible someone higher up can recommend that it be addressed in the next service pack.|||

Please file a defect report with the MSDN Feedback Center (http://lab.msdn.microsoft.com/productfeedback/).

If you can include a minimal script to create sample tables and a stored procedure to set up the test, that will help quite a bit.

Thanks,
Steve

|||

This appears to be a bug in the how SMSS is interperting the ADO 'feedback' area.

I have a table (T1) with a trigger that updates another table (T2) on INSERT and UPDATE.

1. UPDATE T1 SET C1 = 'value' WHERE ID=2 works fines

2. Trapping the SSMS generated 'sp_executesql' statement using Profiler and then executing it works fine.

3. Using SSMS to update the same row results in the error above.

Note that both1 and 2 above result in messages as follows:

(1 row(s) affected)

(1 row(s) affected)

If memory serves me right these 'messages' are both passed back in the ADO 'feedback' area and can be processed by the code of SSMS. Seems the code wasn't tested with replications scenarios.

Im on W2K3 and SQL 2005 SP plus hot fixes.

|||

There is an open Microsoft Connect issue... you can track the progress here:
https://connect.microsoft.com:443/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=125566

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/

|||I'm not sure if this will help any of you but I was able to get around this by putting a SET NOCOUNT ON at the beginning of my trigger.

Error updating data in table that uses a trigger?

Hello. I am new to SQL Server Management Studio 2005 and am using it to connect to a database on another machine running SQL Server 2000. Everything seems to work well, except when I try to edit table data on a particular table that has an update trigger associated with it. I am receiving the error:

-

The data in row 1 was not committed.

Error Source: Microsoft.VisualStudio.DataTools.

Error Message: The row value(s) updated or deleted either do not make the row unique or they alter multiple rows(5 rows).

Correct the errors and retry or press ESC to chancel the changes.

--

I want it to update those the 5 rows in the other tables...that's the whole point of having the trigger!

This used to work fine from Enterprise Manager 2000 and If I issue the update query manually from the new integrated "Query Analyzer" it is also ok. Is there some way to deactivate this new feature from the table viewer?

Thanks very much!

That error message occurred once for because there was a constraint which the deletion violated. I believe I had a field set to "NOT NULL" and the deletion was attempting to delete just that field for some reason.|||Also make sure that there are not two rows where every column is exactly the same.|||

Thanks for responding. My modification is not causing duplicate records to be created, nor am I violating any of my table rules (such as not NULL).

What I have is a trigger associated with my table so that whenever a record is updated it runs a stored procedure which then updates related information in other tables. It is not an error, but a very essential function of my database.

If I issue a manual update query (with query analyzer) I receive no errors and my trigger runs perfectly. It's only when I try to update a record interactively with the "Open Table" viewer/interface that I receive the error.

This new feature is very disruptive to the way I work and I was hoping that there was an option somewhere to turn it off, or make it so that it only applies to real errors such as duplicate records being created.

Thanks....

|||Can you run Profiler and gather a trace to see what it's doing differently than QA?|||

It's not really doing anything different, it's just that the new interactive "table viewer" has some sort of error checking routine that prohibits the update from executing because it sees that the query will affect data in other tables... which is what it was designed to do and worked flawlessly with Enterprise Manager 2000.

Am I the only person here who uses triggers to update data in other tables?

Thanks...

|||

You're absolutely not... I have the same problem. Very frustrating having to run the old version of Enterprise Manager just to update a few values.

Did you manage to find a fix for this?

|||Nope. No fix yet (that I'm aware of). Maybe if we keep this thread visible someone higher up can recommend that it be addressed in the next service pack.|||

Please file a defect report with the MSDN Feedback Center (http://lab.msdn.microsoft.com/productfeedback/).

If you can include a minimal script to create sample tables and a stored procedure to set up the test, that will help quite a bit.

Thanks,
Steve

|||

This appears to be a bug in the how SMSS is interperting the ADO 'feedback' area.

I have a table (T1) with a trigger that updates another table (T2) on INSERT and UPDATE.

1. UPDATE T1 SET C1 = 'value' WHERE ID=2 works fines

2. Trapping the SSMS generated 'sp_executesql' statement using Profiler and then executing it works fine.

3. Using SSMS to update the same row results in the error above.

Note that both1 and 2 above result in messages as follows:

(1 row(s) affected)

(1 row(s) affected)

If memory serves me right these 'messages' are both passed back in the ADO 'feedback' area and can be processed by the code of SSMS. Seems the code wasn't tested with replications scenarios.

Im on W2K3 and SQL 2005 SP plus hot fixes.

|||

There is an open Microsoft Connect issue... you can track the progress here:
https://connect.microsoft.com:443/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=125566

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/

|||I'm not sure if this will help any of you but I was able to get around this by putting a SET NOCOUNT ON at the beginning of my trigger.

Error updating AS400 table

SQL2000 SP3a
I have a statement as follows which attempts to insert data into an AS400
table using a linked server.
[b]SET XACT_ABORT ON
GO
BEGIN DISTRIBUTED TRAN
INSERT OPENQUERY(LS_HMVCASW1,
'SELECT
FIELD
FROM
WARDOUR1.PCUPDDTA.KENNY
WHERE 1=0') --ADD WHERE 1=0 TO STOP QUERY RETURNING ANY VALUES
SELECT
'X'
COMMIT TRAN
SET XACT_ABORT OFF
GO[/b]
I get the following error:
[b]OLE DB provider 'MSDASQL' reported an error. The provider did not give
any information about the error.
OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowsetChange::InsertRow
returned 0x80004005: The provider did not give any information about the
error.].[/b]
Journaling is set on on the AS400 tables. As far as I can make out, the
provider supports distributed transactions - question is how? The user in
the LS has correct permissions on AS400.
Any help much appreciated.The error does imply Access Denied. Use your AS400 query interface, log on
as the user this job is running under, and manually test the SQL
Jeff
"Kendo Nagasaki" <Kendo Nagasaki@.discussions.microsoft.com> wrote in message
news:034E693C-0530-4719-B771-A472C9E83D9B@.microsoft.com...
> SQL2000 SP3a
> I have a statement as follows which attempts to insert data into an AS400
> table using a linked server.
> [b]SET XACT_ABORT ON
> GO
> BEGIN DISTRIBUTED TRAN
> INSERT OPENQUERY(LS_HMVCASW1,
> 'SELECT
> FIELD
> FROM
> WARDOUR1.PCUPDDTA.KENNY
> WHERE 1=0') --ADD WHERE 1=0 TO STOP QUERY RETURNING ANY VALUES
> SELECT
> 'X'
> COMMIT TRAN
> SET XACT_ABORT OFF
> GO[/b]
> I get the following error:
> [b]OLE DB provider 'MSDASQL' reported an error. The provider did not give
> any information about the error.
> OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowsetChange::InsertRow
> returned 0x80004005: The provider did not give any information about the
> error.].[/b]
>
> Journaling is set on on the AS400 tables. As far as I can make out, the
> provider supports distributed transactions - question is how? The user in
> the LS has correct permissions on AS400.
> Any help much appreciated.|||I cannot log into the green screen using this profile as it has been set up
to boot you off immediately you log on, but I can link to the table from
Access using the same system DSN and user profile, and I can add/edit data
through that, so that to me means permissions are ok.
"Jeff Dillon" wrote:
> The error does imply Access Denied. Use your AS400 query interface, log on
> as the user this job is running under, and manually test the SQL
> Jeff
> "Kendo Nagasaki" <Kendo Nagasaki@.discussions.microsoft.com> wrote in message
> news:034E693C-0530-4719-B771-A472C9E83D9B@.microsoft.com...
> > SQL2000 SP3a
> >
> > I have a statement as follows which attempts to insert data into an AS400
> > table using a linked server.
> >
> > [b]SET XACT_ABORT ON
> > GO
> > BEGIN DISTRIBUTED TRAN
> > INSERT OPENQUERY(LS_HMVCASW1,
> > 'SELECT
> > FIELD
> > FROM
> > WARDOUR1.PCUPDDTA.KENNY
> > WHERE 1=0') --ADD WHERE 1=0 TO STOP QUERY RETURNING ANY VALUES
> > SELECT
> > 'X'
> >
> > COMMIT TRAN
> > SET XACT_ABORT OFF
> > GO[/b]
> >
> > I get the following error:
> >
> > [b]OLE DB provider 'MSDASQL' reported an error. The provider did not give
> > any information about the error.
> > OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowsetChange::InsertRow
> > returned 0x80004005: The provider did not give any information about the
> > error.].[/b]
> >
> >
> > Journaling is set on on the AS400 tables. As far as I can make out, the
> > provider supports distributed transactions - question is how? The user in
> > the LS has correct permissions on AS400.
> >
> > Any help much appreciated.
>
>|||After applying a Client Access SP, I've got it working ... sometimes. If I
remove the BEGIN TRAN and COMMIT TRAN it works. Leave those in and I get :
[b]The operation could not be performed because the OLE DB provider
'MSDASQL' was unable to begin a distributed transaction.
OLE DB error trace [OLE/DB Provider 'MSDASQL'
ITransactionJoin::JoinTransaction returned 0x8004d00a].
[/b]
But if I stop and restart SQL, the TRAN stuff then works.. but only once,
which is bizarre. If I run it a second time it errors again. The field I'm
updating doesn't need to be unique.
Any ideas?
"Jeff Dillon" wrote:
> The error does imply Access Denied. Use your AS400 query interface, log on
> as the user this job is running under, and manually test the SQL
> Jeff
> "Kendo Nagasaki" <Kendo Nagasaki@.discussions.microsoft.com> wrote in message
> news:034E693C-0530-4719-B771-A472C9E83D9B@.microsoft.com...
> > SQL2000 SP3a
> >
> > I have a statement as follows which attempts to insert data into an AS400
> > table using a linked server.
> >
> > [b]SET XACT_ABORT ON
> > GO
> > BEGIN DISTRIBUTED TRAN
> > INSERT OPENQUERY(LS_HMVCASW1,
> > 'SELECT
> > FIELD
> > FROM
> > WARDOUR1.PCUPDDTA.KENNY
> > WHERE 1=0') --ADD WHERE 1=0 TO STOP QUERY RETURNING ANY VALUES
> > SELECT
> > 'X'
> >
> > COMMIT TRAN
> > SET XACT_ABORT OFF
> > GO[/b]
> >
> > I get the following error:
> >
> > [b]OLE DB provider 'MSDASQL' reported an error. The provider did not give
> > any information about the error.
> > OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowsetChange::InsertRow
> > returned 0x80004005: The provider did not give any information about the
> > error.].[/b]
> >
> >
> > Journaling is set on on the AS400 tables. As far as I can make out, the
> > provider supports distributed transactions - question is how? The user in
> > the LS has correct permissions on AS400.
> >
> > Any help much appreciated.
>
>

Error updating a DateTime field

Hi, I'm having trouble updating a DateTime field in my SQL database. Here is what I'm trying to do...I retrieve the existing value in the DateTime field (usually a bum date like 1/1/1900 00:00:00:00), then put it in a variable. Later, depending on some conditions, I'll either update the DateTime field to today's date (which works great) or set it back equal to the existing value from the variable (this one messes up and says "SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM. "). There is a ton more than this but here are the relevant snippets:
<code>
Dim CompDate As DateTime
Dim aComm As SQLCommand
Dim aReader As SQLDataReader
Dim bSQL,bConn As String
bSQL= "SELECT CompleteDate,StatusOfMarkout FROM Tickets WHERE TicketName=" _ & CHR(39) & Trim(Ticket.Text) & CHR(39)
bConn = serverStuff aConn = New SQLConnection(bConn)
aComm = New SQLCommand(bSQL,aConn)
aConn.Open()
result = aComm.ExecuteReader()
'fills controls with data
While result.Read()
CompDate = result("CompleteDate")
PreviousMarkoutStatus.Text = result("StatusOfMarkout")
End While
result.Close()
aConn.Close()
sSqlCmd ="Update OneCallTickets CompleteDate=@.CompleteDate, StatusOfMarkout=@.StatusOfMarkout WHERE TicketFileName=@.TicketFileName"
dim SqlCon as New SqlConnection(serverStuff)
dim SqlCmd as new SqlCommand(sSqlCmd, SqlCon)
If Flag1List.SelectedItem.Value = "No Change" Then
SqlCmd.Parameters.Add(new SqlParameter("@.Flag1", SqlDbType.NVarChar,35))
SqlCmd.Parameters("@.Flag1").Value = PreviousMarkoutStatus.Text
SqlCmd.Parameters.Add(new SqlParameter("@.CompleteDate", SqlDbType.DateTime, 8))
SqlCmd.Parameters("@.CompleteDate").Value = CompDate
Else
SqlCmd.Parameters.Add(new SqlParameter("@.Flag1", SqlDbType.NVarChar,35))
SqlCmd.Parameters("@.Flag1").Value = CurrentStatus.Text
SqlCmd.Parameters.Add(new SqlParameter("@.CompleteDate", SqlDbType.DateTime, 8))
SqlCmd.Parameters("@.CompleteDate").Value = Today()
End If
SqlCon.Open()
SqlCmd.ExecuteNonQuery()
SqlCon.Close()
</code>
Can anybody help me with this? Thanks a bunchIs your CompDate a DateTime or is it a string? #1 make sure it is a DateTime.
You might also try using the Convert function in your procedure to convert the argument to a SQL DateTime and see what happens.|||

Yes, the value I'm reading from the database is 100% a datetime. Could you give me an example of how to convert? Thanks

|||

I think you need the DateDiff function of both VB .NET and SQL Server and also change your data type to SmallDateTime it has less resolution if the seconds are not important. Try the links below for sample code using TimeSpan with DateDiff. Hope this helps.
http://blogs.msdn.com/vbfaq/

http://www.stanford.edu/~bsuter/sql-datecomputations.html

|||Hmm, I guess I don't understand. I read through those links and all I could find was how to calculate the difference between two dates. I couldn't really find an answer in there?|||CONVERT(DATETIME, Your_Date_Field)|||

When I try that here:
SqlCmd.Parameters.Add(new SqlParameter("@.CompleteDate", SqlDbType.DateTime, 8))
SqlCmd.Parameters("@.CompleteDate").Value = CONVERT(DATETIME, CompDate)
I get a Compiler Error Message: BC30684: 'CONVERT' is a type and cannot be used as an expression.
Should I be using it somewhere else?

|||I was assuming you are using a stored procedure to do the work. The CONVERT function is a T_SQL function and should be done inside of a stored procedure or SQL statement.

Error updating a data source

I have a strange problem and not sure where to go.
If I go into Report Manager and create a datasource, RS will create the
datasource and it will work properly. However if I go into that datasource
and edit the connection string, I get an error that the item could not be
found. The log file shows:
<Header>
<Product>Microsoft SQL Server Reporting Services Version
8.00.878.00</Product>
<Locale>en-US</Locale>
<TimeZone>Central Standard Time</TimeZone>
<Path>C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\LogFiles\ReportServerWebApp__02_19_2005_13_00_31.log</Path>
<SystemName>TRANQ</SystemName>
<OSName>Microsoft Windows NT 5.0.2195.0</OSName>
<OSVersion>5.0.2195.0</OSVersion>
</Header>
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
MaxScheduleWait to default value of '1' second(s) because it was not
specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
DatabaseQueryTimeout to default value of '30' second(s) because it was not
specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing InstanceName
to default value of 'MSSQLSERVER.1' because it was not specified in
Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
ProcessRecycleOptions to default value of '0' because it was not specified
in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
RunningRequestsScavengerCycle to default value of '30' second(s) because it
was not specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
RunningRequestsDbCycle to default value of '30' second(s) because it was not
specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
RunningRequestsAge to default value of '30' second(s) because it was not
specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
CleanupCycleMinutes to default value of '10' minute(s) because it was not
specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
SecureConnectionLevel to default value of '1' because it was not specified
in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
DisplayErrorLink to 'True' as specified in Configuration file.
aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
WebServiceUseFileShareStorage to default value of 'False' because it was not
specified in Configuration file.
aspnet_wp!ui!aa0!2/19/2005-13:01:39:: e ERROR:
System.Web.Services.Protocols.SoapException: The item
'/TSIReports/Reports/test' cannot be found. -->
Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: The
item '/TSIReports/Reports/test' cannot be found.
at
Microsoft.ReportingServices.Library.RSService._SetDataSourceContents(String
path, DataSourceDefinition dataSourceDefinition)
at
Microsoft.ReportingServices.Library.RSService.SetDataSourceContents(CallParameters parameters)
at Microsoft.ReportingServices.Library.RSService.ExecuteBatch(Guid batchId)
at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
-- End of inner exception stack trace --
at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
aspnet_wp!ui!aa0!2/19/2005-13:01:40:: e ERROR: HTTP status code --> 200
--Details--
System.Web.Services.Protocols.SoapException:
System.Web.Services.Protocols.SoapException: The item
'/TSIReports/Reports/test' cannot be found. -->
Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: The
item '/TSIReports/Reports/test' cannot be found.
at
Microsoft.ReportingServices.Library.RSService._SetDataSourceContents(String
path, DataSourceDefinition dataSourceDefinition)
at
Microsoft.ReportingServices.Library.RSService.SetDataSourceContents(CallParameters parameters)
at Microsoft.ReportingServices.Library.RSService.ExecuteBatch(Guid batchId)
at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
-- End of inner exception stack trace --
at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
at Microsoft.ReportingServices.UI.BaseProperties.ApplyChanges()
at Microsoft.ReportingServices.UI.DataSourceProperties.ApplyChanges()
at Microsoft.ReportingServices.UI.BaseApplyPage.ApplyBtn_Click(Object
sender, EventArgs e)
at Microsoft.ReportingServices.UI.ScriptButton.OnClick(EventArgs e)
at Microsoft.ReportingServices.UI.ScriptButton.RaisePostBackEvent(String
eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain()
aspnet_wp!ui!aa0!2/19/2005-13:01:41:: e ERROR: Exception in ShowErrorPage:
System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String
errMsg) at at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String
errMsg)
It does not matter if I update the data source programatically either, the
result is the same. I see nothing on this server that is different than any
other servers that I have setup and worked with. I am a admin on the box and
RS is running locally. I have uninstalled and reinstalled to no avail.
Any ideas? It seems like some type of rights issue, but as admin, I am a
content manager and that is applied at the home page level, so should trickle
down to all objects and folders. It is a 2000 box with SP4, RS with SP1.
ThanksI'm not 100% sure about your problem in particular, but I have found
that editing datasources after they have been created in a bad thing,
unless you change the XML file by hand.
Jeff Morgan wrote:
> I have a strange problem and not sure where to go.
> If I go into Report Manager and create a datasource, RS will create the
> datasource and it will work properly. However if I go into that datasource
> and edit the connection string, I get an error that the item could not be
> found. The log file shows:
> <Header>
> <Product>Microsoft SQL Server Reporting Services Version
> 8.00.878.00</Product>
> <Locale>en-US</Locale>
> <TimeZone>Central Standard Time</TimeZone>
> <Path>C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
> Services\LogFiles\ReportServerWebApp__02_19_2005_13_00_31.log</Path>
> <SystemName>TRANQ</SystemName>
> <OSName>Microsoft Windows NT 5.0.2195.0</OSName>
> <OSVersion>5.0.2195.0</OSVersion>
> </Header>
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> MaxScheduleWait to default value of '1' second(s) because it was not
> specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> DatabaseQueryTimeout to default value of '30' second(s) because it was not
> specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing InstanceName
> to default value of 'MSSQLSERVER.1' because it was not specified in
> Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> ProcessRecycleOptions to default value of '0' because it was not specified
> in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> RunningRequestsScavengerCycle to default value of '30' second(s) because it
> was not specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> RunningRequestsDbCycle to default value of '30' second(s) because it was not
> specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> RunningRequestsAge to default value of '30' second(s) because it was not
> specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> CleanupCycleMinutes to default value of '10' minute(s) because it was not
> specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> SecureConnectionLevel to default value of '1' because it was not specified
> in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> DisplayErrorLink to 'True' as specified in Configuration file.
> aspnet_wp!library!aa0!2/19/2005-13:00:31:: i INFO: Initializing
> WebServiceUseFileShareStorage to default value of 'False' because it was not
> specified in Configuration file.
> aspnet_wp!ui!aa0!2/19/2005-13:01:39:: e ERROR:
> System.Web.Services.Protocols.SoapException: The item
> '/TSIReports/Reports/test' cannot be found. -->
> Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: The
> item '/TSIReports/Reports/test' cannot be found.
> at
> Microsoft.ReportingServices.Library.RSService._SetDataSourceContents(String
> path, DataSourceDefinition dataSourceDefinition)
> at
> Microsoft.ReportingServices.Library.RSService.SetDataSourceContents(CallParameters parameters)
> at Microsoft.ReportingServices.Library.RSService.ExecuteBatch(Guid batchId)
> at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
> -- End of inner exception stack trace --
> at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
> aspnet_wp!ui!aa0!2/19/2005-13:01:40:: e ERROR: HTTP status code --> 200
> --Details--
> System.Web.Services.Protocols.SoapException:
> System.Web.Services.Protocols.SoapException: The item
> '/TSIReports/Reports/test' cannot be found. -->
> Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: The
> item '/TSIReports/Reports/test' cannot be found.
> at
> Microsoft.ReportingServices.Library.RSService._SetDataSourceContents(String
> path, DataSourceDefinition dataSourceDefinition)
> at
> Microsoft.ReportingServices.Library.RSService.SetDataSourceContents(CallParameters parameters)
> at Microsoft.ReportingServices.Library.RSService.ExecuteBatch(Guid batchId)
> at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
> -- End of inner exception stack trace --
> at Microsoft.ReportingServices.WebServer.ReportingService.ExecuteBatch()
> at Microsoft.ReportingServices.UI.BaseProperties.ApplyChanges()
> at Microsoft.ReportingServices.UI.DataSourceProperties.ApplyChanges()
> at Microsoft.ReportingServices.UI.BaseApplyPage.ApplyBtn_Click(Object
> sender, EventArgs e)
> at Microsoft.ReportingServices.UI.ScriptButton.OnClick(EventArgs e)
> at Microsoft.ReportingServices.UI.ScriptButton.RaisePostBackEvent(String
> eventArgument)
> at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
> sourceControl, String eventArgument)
> at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
> at System.Web.UI.Page.ProcessRequestMain()
> aspnet_wp!ui!aa0!2/19/2005-13:01:41:: e ERROR: Exception in ShowErrorPage:
> System.Threading.ThreadAbortException: Thread was being aborted.
> at System.Threading.Thread.AbortInternal()
> at System.Threading.Thread.Abort(Object stateInfo)
> at System.Web.HttpResponse.End()
> at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
> at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String
> errMsg) at at System.Threading.Thread.AbortInternal()
> at System.Threading.Thread.Abort(Object stateInfo)
> at System.Web.HttpResponse.End()
> at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
> at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String
> errMsg)
>
> It does not matter if I update the data source programatically either, the
> result is the same. I see nothing on this server that is different than any
> other servers that I have setup and worked with. I am a admin on the box and
> RS is running locally. I have uninstalled and reinstalled to no avail.
> Any ideas? It seems like some type of rights issue, but as admin, I am a
> content manager and that is applied at the home page level, so should trickle
> down to all objects and folders. It is a 2000 box with SP4, RS with SP1.
> Thanks
>