I am using SQL Server 2000 sp4 (standard edition); when I run an Update Stats command against a table I get error 3628:
UPDATE STATISTICS IMSV7.BLITEMRT WITH SAMPLE 20 PERCENT Server: Msg 3628, Level 16, State 1, Line 1 A floating point exception occurred in the user process. Current transaction is canceled.
I am hoping someone can shed light on this odd behavior I am seeing running a simple UPDATE statement on a table in SQL Server 2000. I have 2 tables - call them Table1 and Table2 for now (among many) that need to have certain columns updated as part of a single transaction process. Each of the tables has many columns. I have purposely limited the target column for updating to only ONE of the columns in trying to isolate the issue. In one case the UPDATE runs fine against Table1... at runtime in code and as a manual query when run in QueryAnalyzer or in the Query window of SSManagementStudio - either way it works fine. However, when I run the UPDATE statement against Table2 - at runtime I get rowsaffected = 0 which of course forces the code to throw an Exception (logically). When I take out the SQL stmt and run it manually in Query Analyzer, it runs BUT this is the output seen in the results pane... (0 row(s) affected) (1 row(s) affected) How does on get 2 answers for one query like this...I have never seen such behavior and it is a real frustration ... makes no sense. There is only ONE row in the table that contains the key field passed in and it is the same key field value on the other table Table1 where the SQL returns only ONE message (the one you expect) (1 row(s) affected) If anyone has any ideas where to look next, I'd appreciate it. Thanks
Database Layout: Database 1 Contains table called “dbo.Users� Users table contains field/column “Username�. Database 2 Contains table called “dbo.aspnet_Users� Aspnet_Users contains field/column “UserName� Problem: Whenever a record’s “Username� field is updated in dbo.Users (Database 1), I need to update the “UserName� field in aspnet_Users (Database 2). How should I write the trigger to accomplish this task? The following trigger is currently_not_ working. :(ALTER TRIGGER [trig_updateUserNameForForum] ON [dbo].[Users] FOR UPDATE AS DECLARE @oldUserName NVARCHAR(256) DECLARE @newUserName NVARCHAR(256) IF UPDATE(Username) BEGIN SELECT @oldUserName = (SELECT Username FROM Deleted) SELECT @newUserName = (SELECT Username FROM Inserted) UPDATE Database2.dbo.aspnet_Users SET Username = @newUsername WHERE UserName = @oldUserName RETURN END Thanks!!! -Cody
I have an app that performs scans and returns information like what windows updates it has, services running, programs installed, browsesr history, etc. Scans will be performed once a week and sent to a server. The server will only save the most recent scan and store the rest in a history database. I have the methods for inserting and they work fine. However I am stuck with the task of getting this to work after a scan from a PC is already stored. The procedure will have to check the AssetName from tblAsset and compare it to the equivalent in my XML input. It will get the associated ScanID and use that to make updates in tblScan and tblScanDetail.
ALTER PROCEDURE csTest.StoredProcedure1 (@doc NTEXT)
AS declare @iTree int declare @assetid int declare @scanid int create table #temp (ID nvarchar(50), ParentID nvarchar(50), Name nvarchar(50), scanattribute nvarchar(50)) create table #dup (attid nvarchar(50), name nvarchar (50), ID nvarchar(50))
/* SET NOCOUNT ON */
EXEC sp_xml_preparedocument @iTree OUTPUT, @doc
INSERT INTO tblAsset (AssetName, DatelastScanned, LastModified) SELECT *, LastModified = getdate() FROM openxml(@iTree, 'ComputerScan', 1) WITH ( ComputerName nvarchar(30) 'computer/ComputerName', DatelastScanned smalldatetime 'scanheader/ScanDate' )
set @assetid = scope_identity()
INSERT INTO tblScan (AssetName, ScanDate, AssetID, LastModified) SELECT *, @assetid, LastModified = getdate() FROM openxml(@iTree, 'ComputerScan', 1) WITH ( ComputerName nvarchar(30) 'computer/ComputerName', ScanDate smalldatetime 'scanheader/ScanDate' )
SET @scanid = scope_identity()
INSERT INTO #temp SELECT * FROM openxml(@iTree, 'ComputerScan/scans/scan/scanattributes/scanattribute', 1) WITH( ID nvarchar(50) './@ID', ParentID nvarchar(50) './@ParentID', Name nvarchar(50) './@Name', scanattribute nvarchar(50) '.' )
INSERT INTO #dup SELECT ScanAttributeID, #temp.scanattribute, #temp.ID FROM tblScanAttribute, #temp WHERE tblScanAttribute.Name = #temp.Name
INSERT INTO tblScanDetail(Instance, ScanAttributeID, ScanID, AttributeValue, LastModified) SELECT instance = (select count(*) from #dup where #dup.attid = tblScanAttribute.ScanAttributeID AND ((#dup.name<#temp.scanattribute) or (#dup.name=#temp.scanattribute) and (#dup.ID<=#temp.ID))), tblScanAttribute.ScanAttributeID, tblScan.ScanID, #temp.scanattribute, getdate() FROM tblScanAttribute, #temp, tblScan WHERE tblScanAttribute.Name = #temp.Name ORDER BY tblScan.ScanID
I have the following statement that takes quite a long time. Longestof any of my SQL statment updates.UPDATE F_REGISTRATION_STD_SESSIONSET PREVIOUS_YEAR_SESSION_ID = (SELECT s.previous_year_session_idFROM F_REGISTRATION_STD_SESSION R,DS_V4_TARGET.dbo.D_H_Session_By_SessQtr SWHEREr.STUDENT_ID = F_REGISTRATION_STD_SESSION.STUDENT_IDand s.previous_year_SESSION_ID = r.SESSION_IDand s.session_id = F_REGISTRATION_STD_SESSION.SESSION_ID)STUDENT_ID varchar(20) and SESSION_ID char(10) and are indexedWhat I want to accomplish:I want to know if there was a student registration from the prior yearof a registration.Example, if there is a registration for Fall 2004, was there also aregistration for the same student Fall 2003?Maybe there is a better way to approach this?TIARob
I am trying to update my table Members in my SQL server database "Portfolio".
When I click the button, It throws an exception with the following message: "String or binary data would be truncated. The statement has been terminated."
First i use openxml to get my data to update the other server with webservices.
my prob is that i cant update text Fields because i got an error
================ OLE DB provider 'OpenXML' reported an error. The provider did not give any information about the error. OLE DB error trace [OLE/DB Provider 'OpenXML' IRowset::RestartPosition returned 0x80004005: The provider did not give any information about the error.]. ================
what would be my best shot here...
thanx
======================================= XEC sp_xml_preparedocument @handle OUTPUT, @data begin transaction SELECT * FROM TblEvenement WHERE idEvenement = 95
Hi Iam trying to do a trigger that everytime I Update a record de date get update too I finally find a trigger close to that, but this trigger update all the dates from all the record of the same table I wonder is there are a way that I can do it by the date of the record, if somebody could help I will really appreciate.
Thi is the trigger that I have so far
Create Trigger Update_Date on DBO.Company After Update as Update dbo.Company Set ActualiizationDate=Getdate() go
I have two tables in an inner join. I'm detailing the tables with some of their fields below. These tables are in a database I'm creating to manage backup tapes. Most importantly, this database will inform me when backup tapes which have already been used can be recycled (e.g. after all the jobs on the tape are over 28 days old). I want to write something which will look at each tape in turn and, if all related backup jobs on that tape are aged, the tape status will be changed from Active to Spare.
Tapes --TapeNo --Status (Spare / Assigned)
Jobs --JobNo --Name --Description --TapeNo --AgedJob (BIT field indicating whether or not the job has aged)
Each tape can have 0, 1 or many jobs and each job can be on more than one tape.
Anyway, I have the tables and relationsips set up and they're ok. Again, what I'm struggling with is how I take each tape and look at all its jobs and, if all have aged, change the Status for the tape to Spare. I'm using SQL Server 2000 (Access 2003 as front end) and am pretty new to SQL. I was thinking this could be done by using some kind of update query and subquery, but I'm stumped. Could someone please help ?
I have two tables:T1 : Key as bigint, Data as char(20) - size: 61M recordsT2 : Key as bigint, Data as char(20) - size: 5M recordsT2 is the smaller, with 5 million records.They both have clustered indexes on Key.I want to do:update T1 set Data = T2.Datafrom T2where T2.Key = T1.KeyThe goal is to match Key values, and only update the data field of T1if they match. SQL server seems to optimize this query fairly well,doing an inner merge join on the Key fields, however, it then does aHash match to get the data fields and this is taking FOREVER. Ittakes something like 40 mins to do the above query, where it seems tome, the data could be updated much more efficiently. I would expectto see just a merge and update, like I would see in the followingquery:update T1 set Data = [someconstantdata]from T2where T2.Key = T1.Key and T2.Data = [someconstantdata]The above works VERY quickly, and if I were to perform the above query5 mil times(assuming that my data is completely unique in T2 and Iwould need to) it would finish very quickly, much sooner than theprevious query. Why won't SQL server just match these up while it ismerging the data and update in one step? Can I make it do this? If Iextracted the data in sorted order into a flat file, I could write aprogram in ten minutes to merge the two tables, and update in onestep, and it would fly through this, but I imagine that SQL server iscapable of doing it, and I am just missing it.Any advice would be GREATLY appreciated!
I have a simple update statement that looks like this:
UPDATE tblTableName SET colDate = DATEADD(DAY, increment, colDate)
This works fine in SQL Server 2005, but in SQL Server 2000 I get the message:
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
This doesn't seem right to me as there is no subquery! Does anyone have any suggestions?
I have a trigger for column eISBNEnteredDate on update or insert changes of eISBN of the table Products2 ( both belong to the same table). The column eISBNEnteredDate can either be added manually along with eISBN value or when only eISBN value is entered it is updated with present date.
The problem I am facing is when I send eISBN along with eISBNEnteredDate the present date is what is getting saved. Upon the same record when a new date is updated the new date is getting saved. Can someone tell me where I am going wrong?
Here is my trigger:
Code Block ALTER TRIGGER [dbo].[Products2_eISBNEnteredDate] ON [dbo].[Products2] For Insert, Update As Begin Declare @ProductId int Declare @eISBN Varchar(17) Set @eISBN = '0' If ( Update(eISBN) ) Begin Select @Productid = I.Productid,@eISBN = I.eISBN From Inserted I Left Join Deleted d on I.Productid = D.Productid Left join Products2 P on P.Productid = I.Productid Where (ISNULL(I.eISBN,'') <> ISNULL(D.eISBN,''))
If (IsNull(@eISBN,'') <> '' and IsNull(@eISBN,'') <> '0') Begin Update Products2 Set eISBNEnteredDate = getdate() Where ProductID in (select i.ProductID From Inserted i Left join Deleted d on d.ProductID = i.ProductID Where (i.eISBN is not null or replace(i.eISBN,' ','') != '') --where the new eISBN is not null or blank and (d.eISBN is null or replace(d.eISBN,' ','') = '') --where the old eISBN is null or blank and isnull(i.eISBN,'') != isnull(d.eISBN,'') --where the new eISBN is not equal to the old ISBN13 and d.eISBNEnteredDate is null) End If IsNull(@eISBN,'') = '' and IsNull(@eISBN,'') = '' Begin Update Products2 set eISBNEnteredDate = NULL Where ProductID = @Productid End End End
Hi, I have a table with 48 million rows,when i executed following update query it is taking 10 HOURS in SQL SERVER 2000 with SP1. Where as when i executed same query in SQL SERVER7.0 with same table then it is taking 13 MINUTES. Comming to Machine...SQL 2000 Server has more processors and greater memory than SQL 7.0 m/c. It looks strange but this is true.Does any one faced such problem..is there any bug in SQL 2000?????
Here is Query::
update cus_pay_jan_dist set univ_regdate = b.dayid from cus_pay_jan_dist a with (nolock), tm_dayids b with (nolock) where a.univ_regdate = b.dayidnum and a.univ_regdate like '2001%'
I'm trying to update a field (tmpRequestID) in a SQL Express table (tblTSubRequest) using a value in a SQL 2000 database field (fldtmpRequestID) in the dbo.NewPurchase table.
The procedure I thought would work is: USE [tempPurchase] GO /****** Object: StoredProcedure [dbo].[UpdateSubfldRequestID] Script Date: 07/11/2007 15:01:51 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[UpdateSubfldRequestID] AS BEGIN -- Insert statements for procedure here UPDATE tblTSubRequest SET tmpRequestID = tblRequest.fldRequestID FROM tblTSubRequest INNER JOIN [NGTXA4-RSMSZ-01].NewPurchase.dbo.tblRequest ON tblTSubRequest.fldRequestID = tblRequest.fldRequestID WHERE (tblRequest.fldUpdateCode = 99) END
It appears that the procedure cannot read the field value on the 2000 server and the 2000 server is linked to the 2005 express edition.
Hi,I have an application that's running fine on development servers (weband database-sql server 2000). I'm updating a record through a thirdparty component but I don't think the component is the problem. What'shappening is that I'm updating fields that are part of view. I'm onlyupdating fields in one table of the view and this works fine in thedevelopment environment.What happens in the production environment when I try to update(using the third party component) I get the following message:"Current recordset does not support updating. This may be a limitationof the provider or of the selected locktype."As an experiment I took the same code but removed the view, leavingonly the table I want to update as the record source. In that case theupdate worked. So it seems that something in the production databasedoesn't like me updating a view. However I can do that in the databasein the development environment.The third party component is dbnetgrid which works fine in thedevelopment environment. I can only conclude it's something about thedatabase that prevents me from updating this same table if it's in aview. I've talked to our DBA but he says there's no difference betweenthe databases. Any ideas would be appreciated.Neil
Hi allWe had a small problem when an ASP web page had a missing 'where' statementand updated all the records in the table. Luckily we could retrieve all thedata from the backups.How do you guys prevent this from happening in your large systems. Is theresome teqnique for controlling this, I would imagine if you had thousands ofrecords in a table and some one made a programming error, then theconsequences would be disastrous.is there a setting within SQL Server that could force SQL update commands tobe limited to a criteria and if no criteria is supplied then reject thecommandthanks in advanceAndy
I just wanted to post a difference I found between SQL 2000 and SQL 2005 regarding UDPATE statements that are done on a join. I understand that if tables are designed correctly this won't be a problem. But, when you inherit a bad design, you are unfortunately stuck with it. Hopefully this will help ease data differences in your migration from SQL 2000 to SQL 2005.
Run this code on a SQL 2000 connection, then run on SQL 2005. My guess on the behavior difference is strictly performance based since 2005 pulls the top result. Either way it can cause a lot of head scratching if you're not aware of it.
IF OBJECT_ID('tempdb..#UpdateTestA') IS NOT NULL
DROP TABLE #UpdateTestA
IF OBJECT_ID('tempdb..#UpdateTestB') IS NOT NULL
DROP TABLE #UpdateTestB
CREATE TABLE #UpdateTestA(
UpdateTestA int identity(1, 1),
FullName varchar(20),
UpdateData varchar(10))
CREATE TABLE #UpdateTestB(
UpdateTestB int identity(1, 1),
FullName varchar(20),
UpdateData varchar(10))
INSERT INTO #UpdateTestA(
FullName)
VALUES ('Barney Rubble')
INSERT INTO #UpdateTestB(
FullName,
UpdateData)
VALUES ('Barney Rubble', 'First')
INSERT INTO #UpdateTestB(
FullName,
UpdateData)
VALUES ('Barney Rubble', 'Second')
SELECT * FROM #UpdateTestA
UPDATE a
SET a.UpdateData = b.UpdateData
FROM #UpdateTestA a
INNER JOIN #UpdateTestB b on b.FullName = a.FullName
SELECT * FROM #UpdateTestA
DROP TABLE #UpdateTestA
DROP TABLE #UpdateTestB
Hope this solves a problem that you were having too.
I'll installing update http://support.microsoft.com/?kbid=899761 to correct memory usage. When installation process started I recieved this error - "An error in updating your system is occured." and installation failed. What I must doing to correct this issue?
I have a web application developed in VS.NET 2005 [using C# as code behind]; and it uses SQL Server 2000 Enterprise edition as backend. The application runs fine, though it gives an error on IRREGULAR intervals on SQL data requests. Error Details: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
My problem is this: 1) Why does it show an error of SQL 2005, while I use SQL 2000. SQL 2005 is not even installed on the server, though VS.NET 2005 is installed. 2) The error comes only at irregular intervals. Users are able to login properly otherwise. 3) Application starts working again if we do either of the following: (a) Restart IIS (b) Restart application pool (c) Restart server. 4) Named pipes and TCP/IP are added to the "Network Configuration" of the SQL server 2000. 5) Error does not come on any specific page; or any specific code; or at any specific time. 6) We do not have any background service or any other activity happening on the server; and the server hosts only this application, within a single virtual root.
Any thoughts on why is this happening, and how to resolve this?
I am applying hourly differential backup to the backup server from production with the following command. This command makes the database on standby server into read only mode.
RESTORE DATABASE ARSYSTEM FROM DISK = 'E:SQL backup from productionsql_full_backup' WITH MOVE 'arsystem' TO 'd:ardataarsystem.mdf' , MOVE 'arsystem_log' TO 'D:ARLOGARsystem' , STANDBY = 'E:SQL backup from productionSQL daily diff back up'
Now I want to run a command which will put the database in write mode. I have created a job which would make the datbase Write mode. This job runs successfully sometimes and fails sometimes. I need to ensure that the job always succeeds. When it fails, how do I troubleshoot and what is the possible fix?
Thanks in advance.
The error message is
Cannot apply the backup on device 'E:SQL backup from productionSQL daily diff back up' to database 'ARSYSTEM'. [SQLSTATE 42000] (Error 3136) RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed.
The steps for the job are as follows with the failing step highlighted in bold.
copy /y "\172.31.9.12Remedy BackupackupSQL backupsql_full_backup" "E:SQL backup from productionsql_full_backup"
copy /y "\172.31.9.12Remedy BackupackupSQL backupSQL daily diff back up" "E:SQL backup from productionSQL daily diff back up"
xp_cmdshell 'net stop "bmc remedy action request system server"'
exec rp_kill_db_processes 'ARSYSTEM'
RESTORE DATABASE ARSYSTEM
FROM DISK = 'E:SQL backup from productionsql_full_backup'
WITH
MOVE 'arsystem' TO 'd:ardataarsystem.mdf' ,
MOVE 'arsystem_log' TO 'D:ARLOGARsystem' ,
NORECOVERY
Failing step
RESTORE DATABASE ARSYSTEM
FROM DISK = 'E:SQL backup from productionSQL daily diff back up'
WITH
MOVE 'arsystem' TO 'd:ardataarsystem.mdf' ,
MOVE 'arsystem_log' TO 'D:ARLOGARsystem' ,
RECOVERY
xp_cmdshell 'del /f "E:SQL backup from productionsql_full_backup"'
xp_cmdshell 'del /f "E:SQL backup from productionsql daily diff back up"'
xp_cmdshell 'net start "bmc remedy action request system server"'
I have scheduled the following hourly diffential restore job too which never fails.
RESTORE DATABASE ARSYSTEM FROM DISK = 'E:SQL backup from productionsql_full_backup' WITH MOVE 'arsystem' TO 'd:ardataarsystem.mdf' , MOVE 'arsystem_log' TO 'D:ARLOGARsystem' , STANDBY = 'E:SQL backup from productionSQL daily diff back up' EXEC MASTER..XP_CMDSHELL 'del /f "E:SQL backup from productionSQL daily diff back up"'
Hi, How can i store the record insert/update timestamp in a SQL server 2000 db programacally. ? what are the date/time functions in ASP.NET 2.0 ? I know that this can be done by setting the default valut to getdate() function in SQL, but any other way on ASP page or code-behind page ???
I have current current sql server 2000 database containing some columns in big5. To display these cols correctly, my asp.net nust have directive with CodePage="1252" ContentType="text/html;charset=BIG5". I can not update, or insert big5 character into these columns via .aspx page. I'm using .net framework 2.0. Please help me, thanks a lot for any help.
i want to update employee table by selecting columns from employee_temp
i do that using oracle but i want it using sql server 2000
Sample syntax Below: for oracle
update employee e set (col1,col2,col3,col4)= (select t1.col1,t1.col2,t1.col3,t1.col4 from employee_temp t where t.col1=:new.col1) where e.col1=:new.col1
this syntax for oracle....
plsease provide sql 2000 syntax and sql 2005 syntax please.........
I have Re-Builld index Job,it is runnining evry week.now a days my queries are runnign very slow.eben after running re-build indexs.Please guide me how to check where was the problem.
I am suspecting Stastitics how check the stastitics updation.
Our SQL Server 200 box is getting perflib errors when we get a decentamount of people using an application that I wrote, call queue system,web based. To accomplish a queue type system on a button push I wrotea query like this...BEGIN TRANSACTION;Select top 1...fields here...FROM table with (xlock,readpast)(2 joins)WHERE numerous where clausesORDER BY 2 order bys.Now our sql server starts timing out..then in the app log this showsup....Error: 1203, Severity: 20, State: 1Process ID 62 attempting to unlock unowned resource PAG: 6:1:126407.For more information, see Help and Support Center athttp://go.microsoft.com/fwlink/events.asp.The reason I am doing xlock is to make a record not viewable to 2people if they click the button on the web form that runs the abovequery within the same minute, they would get different records....So to avoid this error which I assume is due to my xlock should Irethink my query?
We have a stored procedure that calculates the floor nr for users at our company campus using their office location. The calculation is done by a function that returns an integer. Unfortunately, not all users enter their information correctly so the function sometimes raises an error. Below is the code of that stored procedure.
UPDATE PERSONS
SET FLOORNR = dbo.FloorNR(OFFICELOCATION)
WHERE OFFICELOCATION IS NOT NULL
IF(@@ERROR <> 0 OR @@ROWCOUNT = 0)
BEGIN
RAISERROR ('Failed to calculate the floor number', 16, 1 ) with nowait
END
However, when the function dbo.FloorNR fails, it doesn't raise our error, but it seems to raise the error that comes from dbo.FloorNR.
How can we catch errors that come from dbo.FloorNr so that we can raise our own error? Our company still uses SQL 2000, so we cannot use the SQL 2005 try/catch option.
Hi all,I am doing some large updates,that may update 10,000 plus rows.This works fine when I execute the SQL directlyin Query Analyzer.If I set the timeout on my VB connection to 0 (zero)the connection should not time out????But it does.If I set the time out to a high value, say 1200,I get the same problem well within 1200 seconds.Also, I am getting the problem that the log fills up,but it is set to auto grow????Any ideas would be appreciated.ThanksGreg
I created an updateable partioned view of a very large table. Now I get an error when I attempt to declare a CURSOR that SELECTs from the view, and a FOR UPDATE argument is in the declaration.
There error generated is:
Server: Msg 16957, Level 16, State 4, Line 3
FOR UPDATE cannot be specified on a READ ONLY cursor
Here is the cursor declaration:
declare some_cursor CURSOR
for
select *
from part_view
FOR UPDATE
Any ideas, guys? Thanks in advance for knocking your head against this one.
PS: Since I tested the updateability of the view there are no issues with primary keys, uniqueness, or indexes missing. Also, unfortunately, the dreaded cursor is requried, so set based alternatives are not an option - it's from within Peoplesoft.
We are going insane trying to start Report Manager on a SQL Reporting Services 2000 installation. The programmer/admin who originally set this up for us is gone.
We recently upgraded a database/application server to a new server, causing the data source being used by reports in reporting services to no longer be valid. Unfortunately, we do not have access to the original report project to 're-deploy' with the corrected data source.
We desperately need to get the reports that are installed to retrieve their data from the new database location/machine. We understand this can be done by specifying a new data source in Report Manager. (To clarify, we have NOT moved the report servier installation or database, these remain in place - it's just the deployed reports that no longer point to the correct data source.)
For some reason, our Report Manager will no longer run - when we try to launch it, we get a windows login dialog - nothing will work here. We've tried both local and domain admins and constantly get ACCESS IS DENIED 401.3 error messages that we do not have permission/problems with ACL's.
We've gone so far as to allow EVERYONE read/write access to the ReportManager and ReportServer folders and the RS virtual directories, but nothing seems to help.
Can anyone help with this? Ideas on how to change our data source, or how to get back into Report Manager?
Since we are somewhat technical, but not experts, and don't have much more time to waste, we are willing to pay $500 for this project to someone willing to access the server and fix the problem so that the reports point to the correct database and restore access to Report Manager.
I'm trying to finish a DTS Package by controlling the error flow with @@ERROR. Yet, there's one error which I can't seem to capture 'Syntax error converting the varchar value to a column of data type int'
If you try the code below, I can't seem to pull an @@ERROR ID from it.
IF OBJECT_ID('tempdb..##LogTemp') IS NOT NULL BEGIN DROP TABLE ##LogTemp END
CREATE TABLE ##LogTemp ( Error_ID INT ) INSERT INTO ##LogTemp ( Error_ID )
VALUES ( 'Test' )
PRINT @@ERROR
Query Analyzer prints this out:
Server: Msg 241, Level 16, State 1, Line 83 Syntax error converting datetime from character string.
I am trying to update a value in the aspnet_Users table using a gridview. I'm currently using the vw_aspnet_Users view to select which columns want to display. I have ensured the primary key exists and have it selected as a column to display (although it will serve no purpose). Unfortunately when I click on the advanced tab, it does not let me tick either boxes as they are both greyed out. I have followed "solutions" to this problem in other posts but as I definitely have the primary key source present AND selected, I dont see what the problem is. The only thing I have noticed is that in the "Configure the select statement" window, you are unable to see the aspnet_Users table in the dropdownlist (only the view is present). Non of the views that I choose allow me to update, however, when I choose one of my own tables that I have made (and these appear in the dropdownlist) the tickboxes become available. Is there an underlying problem with editing SQL sources using views? I need a view as I need to display information found in aspnet_Users and aspnet_Membership The following error is what is displayed after I click 'Update' Updating is not supported by data source 'SqlDataSource1' unless UpdateCommand is specified Thanks!