I'm aware that when bulk loading to a SQL 2005 database through an OLE DB Destination, you can enable the FIRE TRIGGERS option. Is this option available when your database target is SQL 2000? I can't find it in the Properties or other windows.
I have an updateable and sensitive SqlCeResultSet that is bound to a DataGrid via a BindingSource. All updates to the resultset are programmatic. Changes to an existing record in the resultset are visible in the DataGrid and I am getting corresponding ListChanged events fired from the BindingSource. When I perform an database update independent of the resultset that changes resultset membership, I can peform a ReadLast and see the additional records; however the ListChanged event does not fire. Also, when I explicitly "create" a new record in the resultset I do not get a ListChanged event and in both cases the DataGrid does not display the records. Re-binding to the existing resultset does not appear to work either. Only when I create a new resultset and bind do the new or records display. Using Compact Framework 2.0.
If I have a trigger on a field in a table, and I update one record trigger fire properly. If I do a update to that same field on all records in the table the trigger does not fire. I the error in the trigger, or do I need to change my update statement?
Hi to all Gurus,I am working with two tables, where in if a record is inserted in onetable an insert trigger fires and inserts relevant information for thatrecord in the second table. This works well within my applications.But it failed (or the trigger never fired)when we used the DTS Importwizard to insert new data into the table from an excel file.How can I overcome this situation? Any help is greatly appreciated.--Part-time BE
I know that INSTEAD OF triggers are not allowed on updatable views that use WITH CHECK OPTION, but this is different. WITH CHECK OPTION has no effect on a view used to update a table with INSTEAD OF triggers. Can you create an updatable view that uses WITH CHECK OPTION on a table that has INSTEAD OF triggers?
The following code demonstrates the problem. Comment out the create trigger statement to see the behavior change.
create table test (test int not null) GO create view test_view as select * from test where test < 0 with check option GO /**/create trigger test_insert on test instead of insert as insert into test select * from inserted GO insert into test values (1) GO insert into test_view values (2) GO select * from test select * from test_view GO drop view test_view GO drop table test GO
Hello, Is there any ability to do database-level triggers in SQL 2000? I have a SQL 2000 database, and I was asked if we could create a trigger that whenever anyone touches the data in a database, to create an entry in an event log? If not, I have a main table I can put a trigger on; however, my question is how do you write to a file in a trigger as well? Thanks.
Hi All, I am looking to do the following: 1) Upload a text file via a website to a server with sql server 2000. 2) Fire a DTS package on that file so it appends the contents to a table in the database. 3) Choose a variable via a dropdown list on the website 4) Run a different DTS Package that uses an update sql statement that uses that Variable. Any help or suggestions would be greatly appreciated. Thanls, Doug
In SQL Server 2000, can you enable an option to check password retries? For example if an SQL Server ID logs incorrectly 5 times, you disable the login account.
I realize this must be an unexpected question in this day and age of MS SQL 2005, however, at my company i need to upgrade from SQL 7.0 to SQL 2000 standard on a WIN2K machine.
can anyone out there tell me why the option to upgrade ("Upgrade, remove, or add components to an existing installation of SQL Server") is disabled ?
I'm reading that i should be able to upgrade without having to install a second instance.
Hi All, I'm trying to make a trigger on a table. If the data changed, the trigger will fire and copy the table into another table. Can u give me examples on Triggers for Update.. Thanks
I am working on Visual Web Developer Express Edition 2005. When I right click on database explorer to create an SQL server database then I always find the option " Create New SQL Server database " Disabled.
Can any one tell me how to enable that option please ?
This is more of a philosophical post, but feedbacks are welcome!
I am working at migrating SQL 2000 DTS packages that pulls data from MAS90 via ODBC connections. At first, I REALLY tried to learn SSIS and I hated it at first, with all the new things one has to do to get a simple import to work. After a while, I begin to appreciate some of the new design and the more tiered approach. Indeed, I tried to use SSIS to import the tables and even learned how to overcome the Unicode/non-Unicode conversion errors by using the Import Wizard to do the grunt work.
But today I came across a show stopper: My imports are failing because the source lied about its metadata type and I am getting a "Value too large for output column" error. I tried to recreate the Task to no avail. I searched on the web and there are very few posts regarding to this and unfortunately I don't have a way to tweak my ODBC connection properties for MAS90 to some how "fool" SSIS. I finally give up and migrate the DTS 2000 package instead.
I am not too happy about this solution because I know that more likely or not Microsoft will discontinue support for such legacy approach and then it is more work down the road. I REALLY wanted to do it right, to rebuild it natively in SSIS but why does SSIS have to make things so hard by enforcing the type checks so tightly? Is it so bad to allow users who know the data better to by pass the validations? We are not working in a perfect Comp Sci 101 world where every thing is scrubbed clean, we work in a world of bad, old, malformed data.
If there is a way for me to overcome that "value too large" error, I am all ears. Thank you for reading.
hi all, i had a view in my project, i am inserting a record in to that view(View contains a identity key for a column), with in stored procedure i am inserting a record i am not passing the identity key value to the insert statement. The record is getting inserted,Based on the identity key(i am getting the identity key value with Scope_Identity()) and with that value i am inserting records into another two tables.In this scenario every thing is working fine. but now i am trying to place a trigger(instead of insert trigger) on the view, when i placed,it is not inserting record into first table,so i am not able to get the identity value of that record and process failed. how can this achived, let me know.
Hello Guys!i have been working with oracle with quite a time. No i migrated to sqlserver 2000 and i want to create a trigger on a table.the trigger function has to update the Modification field to getdate()whenever a row is being updated.i tried lots of thingsif anyone can help i would appreciate a lot!Regards
Hi everybody,I just wrote my first two triggers and from the minimal amount of testing Ihave done, they work! However, I was hoping I could get some feedback fromthose of you more experienced in writing triggers.Here is the first one:CREATE TRIGGER DecreInters ON InteractionFOR DELETEASdeclare @stu INTdeclare @num INTselect @stu = Student_FK from deletedselect @num = (select Inters from Student where Student_Key = @stu)UPDATE StudentSET Inters = @num - 1FROM StudentWHERE Student.Student_Key = @stuHere is the second one:CREATE TRIGGER IncreIntersON InteractionAFTER INSERTASdeclare @stu INTdeclare @num INTdeclare @last_rec INTselect @last_rec = @@IDENTITYselect @stu = (select Student_FK from Interaction where Interaction_ID =@last_rec)select @num = (select Inters from Student where Student_Key = @stu)UPDATE StudentSET Inters = @num + 1FROM StudentWHERE Student.Student_Key = @stuAre there any shortcuts I could use or things I could do to make thesetriggers more efficient. Please give me some feedback and let me know ofany problems that might possibly be caused due to my doing this improperly.Thanks ahead,Corey
We have trigger on a table. The trigger implementation is to insert a record in another table. If any error occurred in the trigger then the trigger should log the error to a file on the file system.
CREATE TRIGGER [myTRIGGER] ON [dbo].[MyTest] AFTER INSERT AS declare @errorcode int; INSERT INTO MySecondTable (id, myvalue) values (null, 'hey') set @errorcode=@@ERROR if (@errorcode <>0) print 'Error occurred with error code "' + CONVERT(varchar, @@ERROR) + '"'
Problem If the insert statement fails, for example because of a null violation, then trigger aborts and never reaches the next step in the trigger T-SQL code. IS this a limitation or there's somthing wrong on the above code? Thanks
Hi everyone In my SqlServer Management Studio Express, on start up it shows the server type option, but greyed.So that value is fixed to database engine. ( I'm trying to work on an SqlServer Compact Edition database through the SSMStudiothat's why I'm trying to get this to change.)Besides, after I connect i go to the Object Explorer, expand the server node, and go to Replication.When i expand replication, i get the "Local Subscription" option, but nothng for Publication.( I want to work on Merge Replication, that's why I desparately need Publication to work)Am i missing something here? I did not install SqlServer separately, I only have what comes bundled with the Visual Studio 2005 Setup.
I am trying to change values of two tables in my sql server 2000 database. When one of the tables is modified in some way like adding/updating a record, I need a trigger procedure to copy this new data from the first table to the second. Problem is, how do I get the newly inserted or updated data from the first table? How do I specify that I only want the data which caused the trigger to execute? Anyone know?
I am writing a simple program which runs on users xp machines and accesses a simple table on an NT Server.
In otherwords, the database consists of just a single table with perhaps 4 fields and a maximum of 200 records, with low transaction activity (users periodically update their status or check on other users' statuses).
Do I need to use SQL????
What is my best option for such a simple table / database.
Hi all,I am fairly new to using triggers and was seeking some help from thosethat have experience with them. I am looking to transfer data from aSQL 2000 database to a Visual FoxPro database on another computer. Iwould like to transfer about three fields of data to a VFP table eachtime an insert is made on the SQL table. I am some what familiar withthe structure of creating the trigger but here is what I would likehelp with: Selecting the SQL data to transfer, Connecting to VFPdatabase, Insert SQL data into VFP table.CREATE TRIGGER [xyz] ON [dbo].[AAA]FOR INSERT??? Select a,b,c from SQL table??? Connect to VFP Database and Table??? Insert into VFP table Values a,b,cAny information, tips, or even an example Trigger procedure would helpand be greatly appreciated.Thank you,Brett
I have a problem with CREATE DATABASE statement, since it needs to specify the absolut path for a file in the FILENAME= option. I would need instead a relative path, i.e. only the name of the file because the script that launch this SQL command is dependant on the installation path decided by the user, during the installation. Is there a way to pass to the FILENAME only the name of the file? Hope to have been clear :-)
Hi,I am using SQL Server 2005 32 bit version. Could any one clarify methe caption database option with some examples? I am quite confusedwith the explanation given in MSDN. Kindly help me.Thanks in Advance.Om Prakash
I'm trying to install SQL Server 2005 onto my XP Professional PC. When I get to the "Components to install" part, the "SQL server database services option" is greyed out. Infact, all options except "Workstation components..." are greyed out. I've tried uninstalling all previous versions of SQL server and trying again, but with the same results.
I'm currently using SQL Server 2005. Before I have set my database on unrestricted auto growth. But today, I have noticed that the Log file has been set to limit its growth to 2,097,152 MB. I have 160GB space for my log files, I just want to maximize the space for logs in my hard drive.
When I try to change the settings back to auto growth it still keeps on returning to its previous setting it is still set on 2,097,152 MB. What I did was : Right Click on the Database - Properties - Files - Click the (...) - set the auto growth option to unrestricted - Click Ok But when I checked log file, it is still set on 2,097,152MB.
Can some one help me change the settings of my Database.
I am actually a newbie to asp.net and i m using ASP.net 3.5 i.e, VWD 2008. i am using it for the first time as my tool to develop a website for my final year project. i am planning to develop an online job recruitment site like www.monster.com. Rigth now i am confused how will i manage my database. i've learned to use databinding concept of SQL SERVER in VWD 2008 but will it be enough to handle such huge # of Job postings and employers and as well as Resumes in pdf of word format? or do i have to create a separate databse in SQL Server and to connect it with my website? i am confused at the moment. please help me in this matter. Regards, Jigzy