I'm trying to use bcp to move a table into SQL Server 6.5. The command I am using is bcp CCI..contacts in A:Contacts.txt -fC:contacts.fmt -Usa -P -eC:errors.txt. When executing, I receive the Dr. Watson error message shown here:
Exception: access violation (0xc0000005), Address: 0x77f64d28
If I run DRWTSN32.log it shows the application error to be the following:
c0000005 RtlFreeHeap(77f64d28)
ID (PK), userID (FK), from [Datetime], to[datetime], type [int] , value [nvarchar]
Conditions I want to select the column "to" which is a datetime-column for all users within the table.
One user can have multiple registered rows in "mytable", so I want to select the row that contains the newest "from" date.The newest "from"-column for a specific user is where I am struggling... Because if the "to"-column of any of the registered rows by the current user is equal to the newest "from -1 day" column for the user, I want to select the second newest from-date.
Code: //Handwritten DECLARE @from DATETIME //Current Selected datetime [the newest of the current user doing the query] DECLARE @id INT //userID DECLARE @tbl TABLE (from datetime, userid int)
[code]....
But for user ID 201 [all users with Type = 1], I need to run through some more code, to figure out which date we want... Which date do I want? The "from"-date that is the newest, but if "to" is just 1 day before "from", I want to select the "from" at that row instead... Example with numbers [integers] instead of Date:
Code: From - To 5 8 10 15 16 20
I want to select "10" in the from column as the maximum "from"-integer, and not 16. Because in the "To" column we have a match in the "from" column on the condition "To + 1" [15+ 1 == 16], so then I want the "from" value where "To" equals 15, which is 10. The top row I do not want, because the difference between From and To [10 - 8 is larger than 1]...
This means that the Image shown... I am first selecting the "1", then I do some checks, if the "to" for the user is 1 day earlier than the MAX(from) I grab a new "from" value...
Code: SELECT MIN (t1.from) FROM table as t1 WHERE t1.from IN ( SELECT t2.to+ 1 FROM table as t2 WHERE t2.userID = @id )
CREATE TABLE #tblTemplateBlocks ( TemplateID int, BlockID int, OrderID int
[Code] ....
I have a table called TemplateBlocks which contains which Blocks are on a Template. In this example - just one template - with three Blocks.
Table tblFields contains a list of Fields that are on each TemplateID/BlockID. In this example there are 3 fields on each TemplateID/BlockID pair.
Before I can use a template, I have to check that, in tblFields, for each Template/BlockID pairing - one of the fields must be set as the Stage Base (I cannot have 2 fields as StageBase or no fields as StageBase). In the example data above, the data would be okay as each Template/BlockID pairing has one row where StageBase is true.
Having checked that each Template/BlockID pairing has a StageBase, I need to check that each row where StageBase is true has a value for the WeekStart column and that, taking into account the order of the Blocks in tblTemplateBlocks, the values in WeekStart for each TemplateID/BlockID pairing are getting progressively bigger.
So, for example, the example data above would fail because the third TemplateID/BlockID pairing has no value for the WeekStart column in the row where StageBase is true.
If I added a value of 2 for WeekStart in the row for the third TemplateID/Block that has a StageBase of true - again the data would fail because, taking into account the order of the Blocks - the values for WeekStart would be 0,3,2 and these numbers need to increase.
0,3,4 would be fine. 0,3,10 would be fine. 0,3,3 would fail.
I can do this easily using a cursor or two - but how to do this without cursors.
I have been using this code for years but today it is giving me Dr Watson Error "Access Violation" can someone help pls. BCP PROD_elsie_DB..tblStudent_Info_Temp_Alex in P:elsiedataincomingacapsstu.txt /m 100 /f G:elsieapplsqlcpbstua.fmt /e G:custbasedata eportsbstuaiw.err /o G:elsiedata eportsbstuaiw.out /b 1000 /Sdwslc000 /U /P
I had an error crop up with a DTS package which I need some help with.Error Message :The application, , generated an application error The error occurredon 07/20/2004 @ 06:12:28.203 The exception generated was c0000005 ataddress 41504E2C (<nosymbols>)This happened this morning, but the DTS package runs every 10 minutesand it is the only occurance of this error. Nothing in the DTS packagehas changed and there will not have been any users on the network. I'mas convinced as I can be that the DTS package is fine. Nothing obviousas to what has caused the error, and it hasn't happened again, but Iwould like to understand it more if possible.The closest answer we found was for a SQL2000 error (http://support.microsoft.com/defaul...en-us%3BQ290644 ),but we are running SQL7 (latest sp), so any fix wouldn't apply.The DTS package does a fair amount of importing data and then variousSP's are run to generate a final table of data. From the timing, itlooks to have happened at the end of the process, so would suggestsomething with an SP. Unfortunately, I cannot tell which one. 10minutes after it failed, it worked again and has since, but no-one wasin to correct anything.Any ideas ?ThanksRyan
Hi I've recently upgraded 4 sql servers to sp5a and have just found that BCP fails on all of them with a DR Watson error. I did reinstall the Nt sp after installing sql server sp5a. Can anyone help ? Thanks
We have, on a devlopment server, running a long_running transaction for almost two days. It was still running. This morning I decided to look at three of two backup devices under EM to see if any backups were made to these devices during the last couple of days on a de,mand basis by anyone. The first one had a backup and the second and third device did not. Somehow, and for some unexplained reason, the following message was put into the MSSQL error log (and pretty much the same message went into the NT event viewer).
---------------------------------------------------------------------- 99/02/23 10:05:45.81 kernel dbsvolopen: Backup device 'E:MSSQLBACKUPEaglePro2_run02.DAT' failed to open, operating system error = 2(The system cannot find the file specified.) 99/02/23 10:05:48.48 kernel dbsvolopen: Backup device 'E:MSSQLBACKUPEaglePro2_run02.DAT' failed to open, operating system error = 2(The system cannot find the file specified.) 99/02/23 10:05:49.17 kernel dbsvolopen: Backup device 'E:MSSQLBACKUPEaglePro2_run03.DAT' failed to open, operating system error = 2(The system cannot find the file specified.) ---------------------------------------------------------------------
This error, I beleive, caused DR watson to kick off and we could only sopt it and revive the long running transaction by rebooting the machine, of course thus requiring us to restart the lon_running transaction.
It look like NT couldn't find the backup device and therefore activated the drwatson executible or so it seems to me.
Has anyone experienced this error before? IS it caused by NT? Or that perhaps a certain threshhold was reacched on NT and drwatson kicked in?Any other ideas?
Any information that can be provided would be GREATLY appreciated. THanks.