f



Trigger: To fill another Database with using Stored Procedures of the other Database

Hello everyone,

I face currently a problem where I could need some input for searching
the source of the Problem

System: SQL Server 9.0

I fill from Database A with triggers Database B, everything works
fine.
On Database B there is a Stored Procedures that checks the records and
add additional information accordingly, this Stored Procedures is
normally called by the application on "update and insert" in the
according table.

When I try to call this Stored Procedures from the Database A, the
trigger does not work anymore, even if I do a try catch over the whole
trigger, he never reach the Catch and the insert I try to do there to
get the error message.

On both Databases the user, that is taken to execute the trigger is
existent and DB-Owner of both Databases.

If I go and execute the Stored Procedures manually after an insert or
update to Database B everything works fine.

I also already tried to check on Database B if there is an insert or
update from Database A and if, to execute the Stored Procedures, with
the same result, nothing and all happens anymore, neither update on
Database A and also not on Database B.
And also I cant catch the error as the Try/Catch is not working.

Hope I could explain it understandable and maybe someone remembers
already having the same problem.

Thanks & Best regards
Pascal

0
4/24/2007 2:15:29 PM
comp.databases.ms-sqlserver 14567 articles. 1 followers. janinepelletier (108) is leader. Post Follow

2 Replies
687 Views

Similar Articles

[PageSpeed] 31

 (pascal.baetscher@gmail.com) writes:
> I face currently a problem where I could need some input for searching
> the source of the Problem
> 
> System: SQL Server 9.0
> 
> I fill from Database A with triggers Database B, everything works
> fine.
> On Database B there is a Stored Procedures that checks the records and
> add additional information accordingly, this Stored Procedures is
> normally called by the application on "update and insert" in the
> according table.
> 
> When I try to call this Stored Procedures from the Database A, the
> trigger does not work anymore, even if I do a try catch over the whole
> trigger, he never reach the Catch and the insert I try to do there to
> get the error message.

So there is a an error message? What about posting it?

Overall, if it's possible, I would appreciate if you could post the
code of the stored procedure and the trigger, because I have some
problems following your narrative what is happening.
 

-- 
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
0
esquel (7068)
4/24/2007 10:30:47 PM
Hello,

Thanks for your answer and I just noticed that I double posted this
message.

First I was not able to catch the errormessage, I started the triggers
over the application and in the expected return value was nothing,
after change the Trigger and lunch with the console, i had the
following error:
Msg 3616, Level 16, State 1
Transaction doomed in trigger. Batch has been aborted.

I already found the problem and was able to solve it, sorry for the
late reply.

And thanks for the input, next time I'll extract necessary parts of
the triggers.

0
4/27/2007 1:39:56 PM
Reply:

Similar Artilces:

Database Database Database Database Software Cheap
Database Database Database Database Software Cheap Great Datase Software See Website Below. Ultra Easy to Learn (Typically 30 Seconds) Professional Programmable Database Ver. 2.3 2.1 Million Record Capacity, (New cond). Search Rate: 2000 / Records / Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Has Six Seperate Field Sets All Programmable. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Email). http://www.vehiclerepair.org/dbPro/dbpro.html ...

Database Database Database Database Software Cheap
Database Database Database Database Great Datase Software See Website Below. Ultra Easy to Learn (Typically 30 Seconds) Professional Programmable Database Ver. 2.3 2.1 Million Record Capacity, (New cond). Search Rate: 2000 / Records / Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Has Six Seperate Field Sets All Programmable. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Email). http://www.vehiclerepair.org/dbPro/dbpro.html ...

a database, is a database, is a err database
How many times can we see the same request from someone who wants to access data from a 'pick' database through what has come to be 'standard' practices (odbc, oledb) and still get the same old sloppy ' buy this proprietary utility (and above all, my services)' answer. I think most of these pick flavors should have some sort of layer (by now!) to handle this; If someone needs to do this, the service is really 'education' i.e to show them how. Lets cut the shit now and stop with this tired and silly BS and sad marketing schlock. Regards, -Jim Jim wrote: > How many times can we see the same request from someone who wants to > access data from a 'pick' database through what has come to be > 'standard' practices (odbc, oledb) > and still get the same old sloppy ' buy this proprietary utility (and > above all, my services)' answer. I think most of these pick flavors > should have some sort of layer (by now!) to handle this; If someone > needs to do this, the service is really 'education' i.e to show them > how. Lets cut the shit now and stop with this tired and silly BS and > sad marketing schlock. > > Regards, > > -Jim Jim who? I wonder? What is this? An attack on capitalism? Providing services for those who perhaps lack the time, skill, or knowledge to perform such tasks is hardly a crime. Maybe "standard" odbc and...

Database Database Database Software Cheap
Database Database Database Database Software Cheap Great Datase Software See Website Below. Ultra Easy to Learn (Typically 30 Seconds) Professional Programmable Database Ver. 2.3 2.1 Million Record Capacity, (New cond). Search Rate: 2000 / Records / Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Has Six Seperate Field Sets All Programmable. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Email). http://www.vehiclerepair.org/dbPro/dbpro.html ...

Using Objects from one database in another database
I've looked around here to see if this can be done, but haven't found the answer. Here is what I want to do... I have a two databases -- One for Sales and one for Operations. These are used by two groups of people with some obvious overlap (like the boss, for example). Some of the data is the same, so I'm using only one backend database file to hold the data. However, I want to have one piece (projects) from the Operations database to also be used in the sales database. The projects piece of it consists of several forms, subforms, reports, queries, code, etc. To cut down on maintenance (so without actually importing) I want to be able to use those forms, subforms, etc. in the Sales database, exactly as they are in the Operations database. Is there a way to do this so that any changes made in the Operations database are also reflected in the Sales database? I've never created Add-ins before, but before I go trying to make this happen, is this the way I need to go? Would this even work? I guess what I'm saying is I want to link code, forms, reports, etc. just like I can link tables. Any ideas? ...

How to copy a sun-database in one informix database to another informix database?
Hi, Sorry I am not an informix dba, and I was faced to copy a sub-database(sorry I don't know the clear name of such concept, as informix is like sql-server, which used multiple database) from one informix database system to another informix database. I know in oracle, we can use transportable tablespace, copy the datafile and transport the metadata, and do something else. How can I do it in informix then? Is there document which talk about the detail step? Thanks It would really help if you knew the versions of the Informix databases. Assuming Informix IDS 7.x or IDS 9.x If the two systems are binary compatible the fastest method is to use onunload/onload. If the systems are not binary compatible the easiest way is to use dbexport/dbimport. Everything is well documented in the manual "IBM Informix Migration Guide". This manual covers all Informix databases from Standard Engine and Online to IDS and XPS. See http://www.ibm.com/informix/pubs zhu chao wrote: > Hi, > Sorry I am not an informix dba, and I was faced to copy a > sub-database(sorry I don't know the clear name of such concept, as > informix is like sql-server, which used multiple database) from one > informix database system to another informix database. > I know in oracle, we can use transportable tablespace, copy the > datafile and transport the metadata, and do something else. How can I > do it in informix then? Is there...

Can I use an O8 database as a transit database between a O9 and an O7 database?
Hi all, We will gradually migrate our application data from a O7 database to a new O9 database. The application data is also written to an O7 datawarehouse via a database link. In the intermediate period data has to be written to the O7 datawarehouse db from the old O7 application db and also from the new O9 database. I did a test to see if could do an insert from the O9 database over a database link into the O7 datawarehouse database, but this is not supported. Then I did the following: - create a dblink in the O9 database to a O8 database - create a dblink in the O8 database to the O7 database - create a synonym in the O8 database to the desired table in the O7 database - create a synonym in the O9 database to the synonym in the O8 database Now in the O9 database I inserted a record into the synonym, which indeed resulted in a record in the O7-table. Would it be a sensible solution to use an O8 database as a transit database in this way? Jaap. yes "Jaap W. van Dijk" <j.w.vandijk.removethis@hetnet.nl> wrote in message news:7fm4b05a4mbbb4jub1urin1j163jjsc7vg@4ax.com... > Hi all, > > We will gradually migrate our application data from a O7 database to a > new O9 database. The application data is also written to an O7 > datawarehouse via a database link. In the intermediate period data has > to be written to the O7 datawarehouse db from the old O7 application > db and also from the new O9 database. I did a test to see if could do >...

Using Objects from one database in another database #2
I've looked around here to see if this can be done, but haven't found the answer. Here is what I want to do... I have a two databases -- One for Sales and one for Operations. These are used by two groups of people with some obvious overlap (like the boss, for example). Some of the data is the same, so I'm using only one backend database file to hold the data. However, I want to have one piece (projects) from the Operations database to also be used in the sales database. The projects piece of it consists of several forms, subforms, reports, queries, code, etc. To cut down on maintenance (so without actually importing) I want to be able to use those forms, subforms, etc. in the Sales database, exactly as they are in the Operations database. Is there a way to do this so that any changes made in the Operations database are also reflected in the Sales database? I've never created Add-ins before, but before I go trying to make this happen, is this the way I need to go? Would this even work? I guess what I'm saying is I want to link code, forms, reports, etc. just like I can link tables. Any ideas? ...

open database from another database
I'm struggling with this, and I'm sure there's a way to do it. I would like to automate the back-up of an Access application to a writeable CD drive. I've got the process of creating a folder on the CD with the back-up date done, and I can copy the database objects (there are four MDB files in total) to the CD. All of that works. Here's my problem: because Access databases cannot be copied when they are open, I need to have my CD writing code in a new MDB, and will need to launch the new CD writing MDB from within one of the existing databases. I've done this kind of thing before, but I don't have the slightest recollection on how I did it (used to be you had to do that kind of thing in order to compact/repair through automation). So, I give up. How do you launch Access from within Access??? Well this will do it: Dim i As Variant i = Shell("msaccess d:\persprop\CSCPP.mdb") Just put in your own db path. But this does come up with the warning that requires you to click to get into to the db (in 2003). If you know how to get by that I'd like to know. You could put the function in a macro and then close the db stat started the new one. Good luck Ira Solomon On Tue, 25 Apr 2006 20:17:10 -0500, Mike Easter <username@domain.com> wrote: >I'm struggling with this, and I'm sure there's a way to do it. I would like >to automate the back-up of an Access application to a wri...

Open a database from a database
I want to be able to open and run an Access database from within an already running one. The OpenDatabase command simply opens it but does not run the startup routine. Interestingly opening from Windows Explorer has a different meaning in that it opens and runs! What command enables me to open another database and get it to run its AutoExec macro, from code? Jim I don't know the answer, but I do know that when you use OpenDatabase the code in a startup form of that database does work. Martin "Jim Devenish" schreef in bericht news:0b4510ac-d415-4c2c-b200-7546aae178a4@gu8g2000vbb.googlegroups.com... I want to be able to open and run an Access database from within an already running one. The OpenDatabase command simply opens it but does not run the startup routine. Interestingly opening from Windows Explorer has a different meaning in that it opens and runs! What command enables me to open another database and get it to run its AutoExec macro, from code? Jim On Tue, 12 Apr 2011 13:37:41 -0700 (PDT), Jim Devenish <internet.shopping@foobox.com> wrote: Have you tried the Shell command? If you weren't using the AutoExec macro but one with another name, you could use the /X command line switch for msaccess.exe -Tom. Microsoft Access MVP >I want to be able to open and run an Access database from within an >already running one. The OpenDatabase command simply opens it but >does not run the startup routine. Interestingly opening ...

Opening Another Database from WITHIN a Database
I have a database (2000.mdb) which links to my data tables (Data2000.mdb). The database has a Main Menu screen (not a switchboard - a custom one). I need to import records from 5 text files into the 5 different Tables in Data2000.mdb. Here was my plan: Create various Import specs in Data2000.mdb Create a Macro (in Data2000.mdb) which calls each of the specs sequentially. Place a button on the Main Menu (2000.mdb), which closes the current database (optional), opens Data2000.mdb, runs the Macro (Import Reg), then returns the user to the original Menu in the original database (2000.mdb) I can't seem to get past running the Macro. See my code below: Private Sub cmdOpenDataTables_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Dim wrkJet as Workspace Dim dbsAnother as Database Set wrkJet = CreateWorkspace("DataWorkspace", "admin", _ "", dbUseJet) Workspaces.Append wrkJet Set dbsAnother = wrkJet.OpenDatabase("Data2000.mdb") With dbsAnother DoCmd.RunMacro "Import Reg" End With End Sub I keep getting a "Can't find Macro Import Reg" error. Any suggestions? Is there an easier way to automate this? Is part of the problem is having 2000.mdb open (and linked) to Data2000.mdb when I try to execute this? Thanks in advance for any assistance. -- Andi Plotsky IRIS, LLC 2859 Galahad Drive Atlanta, GA 30345 404-321-9459 (office) 404-636...

Check if a database is available from another database
Hello, i'm new, so i want to ask you if you know how can i check if a database is available before i connect to it. I am using Oracle 7.3.4 on a UNIX machine, and i am using Oracle Forms 4.5. The situation goes as follows: I'm using Oracle Forms and i want at some point to chande my database connection to do some job. What i want is to check if the database is available before i connect to it. If it is available i continue, else a message will tell me that the database is not available. Can this be done using PL/SQL? If you have anything please tell me. Thanks. Marios Varna...

copying data from one database to another database
I want to copy data from our production database to the development database. I want to move only the data. I do not need the table structure, constrains or anything else. I think I can use the db2move command to export out all the data like the following: db2move dbname export -tc schema1 When I load the data into our development database, will it recreate the tables? My problem is that I do not want to recreate the structure. I want to make sure that I am copying over only the data. Is db2move the best utility to move the data between two databases without making any stru...

How to copy table from oracle database to sqlserver database ?
Hello, I need to copy a table from an 8i oracle database to a sqlserver 2000 database. Is it possible to use the command "COPY FROM ... TO ..." ? So, what is the correct syntax ? Thanks for your help Cyril "Cyril" <jewelk@free.fr> wrote in message news:cd38c3d6.0408100617.6f7b9f3e@posting.google.com... > Hello, > > I need to copy a table from an 8i oracle database to a sqlserver 2000 database. > > Is it possible to use the command "COPY FROM ... TO ..." ? > So, what is the correct syntax ? > > > Thanks for your help > &...

How to copy table from oracle database to sqlserver database ?
Hello, I need to copy a table from an 8i oracle database to a sqlserver 2000 database. Is it possible to use the command "COPY FROM ... TO ..." ? So, what is the correct syntax ? Thanks for your help Cyril On 10 Aug 2004, jewelk@free.fr wrote: > Hello, > > I need to copy a table from an 8i oracle database to a > sqlserver 2000 database. A few options exist. If this is one-off, just use sqlldr to drop the data to a file and then bcp to get it into SQLServer. > Is it possible to use the command "COPY FROM ... TO ..." ? > So, what is the correct syntax ? Well, I'm sure SQLServer has connectivity to Oracle? If you want to go this route, use that and do this from SQLServer. -- Galen Boyer On 10 Aug 2004 07:15:16 -0700, jewelk@free.fr (Cyril) wrote: >Hello, > >I need to copy a table from an 8i oracle database to a sqlserver 2000 database. > >Is it possible to use the command "COPY FROM ... TO ..." ? >So, what is the correct syntax ? > > >Thanks for your help > >Cyril Read up on using the Heterogeneous Gateway to Sqlserver. -- Sybrand Bakker, Senior Oracle DBA "Cyril" <jewelk@free.fr> wrote in message news:cd38c3d6.0408100615.6371b40e@posting.google.com... > Hello, > > I need to copy a table from an 8i oracle database to a sqlserver 2000 database. > > Is it possible to use the command "...

Close another database from within a separate database.
Have to call up a 2nd database from within the first. Can open the 2nd database no problem, but when the user is done with the 2nd database and closes the form, or exits the 2nd database, how can I move the focus back to the 1st database, close the 2nd database, and have the form in the 1st database restored to it's original position? Take a look at the TSOON utility (Trigeminal Shut One, Open Next) at: http://www.trigeminal.com/lang/1033/utility.asp?ItemID=8#8 -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps.org. "J. Shrimp, Jr." <jumbo_shrimps@hotmail.com> wrote in message news:10tmerd5ikbqa01@corp.supernews.com... > Have to call up a 2nd database from within the first. > Can open the 2nd database no problem, but when > the user is done with the 2nd database and closes the form, > or exits the 2nd database, > how can I move the focus back to the 1st database, close > the 2nd database, and have the form in the 1st > database restored to it's original position? ...

Appending data to a master database from another database
How can I, without using Replication technology, append a table in my master database from data in another database? I have several field offices with sales data that I want, on demand, to append up to my home office Master database... any ideas? Thanks!!!! Dav On 17 Nov 2006 08:02:28 -0800, "Parasyke" <kress1963nov22@yahoo.com> wrote: Attach tables from the Child database to the Master, and run Append queries. Or forego the table attachments and use the IN clause to specify the Child database. Off the top of my head: insert into MyTable select * from MyTable IN 'c:\test\child.mdb' -Tom. >How can I, without using Replication technology, append a table in my >master database from data in another database? I have several field >offices with sales data that I want, on demand, to append up to my home >office Master database... any ideas? Thanks!!!! Dav ...

starting another Access-Database with database-password by Code
Hello! Since days I'm looking for a solution for the following problem for Access 2000: Can I starting by Code a database B.mdb (protected only with a simple database-passwort) from a database A.mdb by Code. The database-password must be a part in this Code. - Database: c:\ablage\test.mdb - Datapase password: 1234 Thank You very much! Greetings from Switzerland Thomas Ruf wrote: > Hello! > > Since days I'm looking for a solution for the following problem > for Access 2000: > > Can I starting by Code a database B.mdb (protected only with a > simple database-passwort) from a database A.mdb by Code. > The database-password must be a part in this Code. > > - Database: c:\ablage\test.mdb > - Datapase password: 1234 > > Thank You very much! > > Greetings from Switzerland I posted a reply to a similar request a while ago; http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=RFwWa.52076%249C6.3028794%40wards.force9.net Overall, in my opinion, it isn't worth doing - too flaky. ...

To retrive a table from one database to and another database(same table)
hi i have emp table in one database , how to retrieve same table another database through query analizer give code ,,, Hi, use the three part notation: SELECT * FROM database.owner.Objectname (replace owner by schema for SQL2k5) HTH, Jens Suessmeyer. --- http://www.sqlserver2005.de --- Hi surya While the first database is "Current" as would result from: Use FirstDatabaseName select * from OtherDatabaseName..Emp -- -Dick Christoph "surya" <suryaitha@gmail.com> wrote in message news:1142588469.061525.268810@u72g2000cwu.googlegr...

How do I a smallint SQL database value using the Database tools?
I'm using the Database Toolset with Labview 7. I'm building up a parameterized Query to a Stored Procedure in my SQL Database. It doesn't appear that smallint output types are supported because zero is always loaded into the variable. Is this correct? I'm I doing something wrong? Feedback welcome... thanks! It's probibly not an issue with datatypes since LV has far more datatypes than most databases. What exactly are you trying to do? Are you getting the 0 when running the stored procedure? Could you perhaps post a bit of code (LV and SQL) that demonstrates the issue? Mike... ...

Link form another database table into current database
I copy a form from another database into my database. I need help how to i link the table which is in another database with that form. Thank you. In the database with the copied form select File then Get Extrernal Data then Link Tables... When the Link window opens, find the database that contains the table to which you want to link and select it and then select the Link button. Voila. Your form should see the linked table. colleen1980@gmail.com wrote: >I copy a form from another database into my database. I need help how >to i link the table which is in another database with that form. > >Thank you. -- Message posted via http://www.accessmonster.com ...

Object-Oriented database model using relational database
Hi! I am working on developing web based database application using MySQL and PHP. Many complications have risen due to the nature of the database I am working on, what made me realize that the best solution is using Object-Oriented model. Does anyone tried to implement Object-Oriented model using relational database? Does anyone tried to implement that using MySQL and PHP? Regards, Russlan Russlan wrote: > I am working on developing web based database application using MySQL > and PHP. Many complications have risen due to the nature of the > database I am working o...

Need to Open Database from another Database and delete table within
I am trying to open Database #2 while in Database #1 and delete a table that is in #2 so that I can copy a table from #1 into #2 - all through a function. My Database #2, as part of the start up, opens a form for user sign in. It is not starting up with autoexec. I do not want the function to open the window and subsequently open the form in Database #2. Is there anyway to get around this? If I put the open form in the autoexec and not in the start up, can I work around it? And if so, can anyone offer any help or suggestions on the how to's. I have spent the day trying to find a way around it and have gotten nowhere, but confused. Thanks in advance for any help! > I am trying to open Database #2 while in Database #1 and delete a > table that is in #2 so that I can copy a table from #1 into #2 - all > through a function. My Database #2, as part of the start up, opens a > form for user sign in. It is not starting up with autoexec. I do not > want the function to open the window and subsequently open the form in > Database #2. Is there anyway to get around this? If I put the open > form in the autoexec and not in the start up, can I work around it? > And if so, can anyone offer any help or suggestions on the how to's. > I have spent the day trying to find a way around it and have gotten > nowhere, but confused. Have you considered simply exporting the table from the current db (#1) into db #2? Look up the "TransferDatabas...

How to keep update one Mysql database with another MySQL database?
I have two Mysql databases. One is the master and the other is slave. I need to keep update with slave database to keep some tables the same as master database. The first idea in my mind is to write a php script to read datas from these tables and write into slave database. But I still think it is a little complex to judge which code I need to write into slave databse. So, any good idea to do this job? Any tool I can use? -- Water Lin http://blog.waterlin.org Water Lin wrote: > I have two Mysql databases. One is the master and the other is slave. > > I need to keep update wi...

Web resources about - Trigger: To fill another Database with using Stored Procedures of the other Database - comp.databases.ms-sqlserver

Invasiveness of surgical procedures - Wikipedia, the free encyclopedia
There are three main categories which describe the invasiveness of surgical procedures . These are: non-invasive procedures , minimally invasive ...

Eye tattoos: Tattooist Luna Cobra defends practice following calls to ban procedure
IT SOUNDS like the really gross scene in a horror movie.

Survivors of female genital mutilation outraged by 'compromise' which could legalise procedure
Survivors of female genital mutilation are fighting back against a so-called compromise, which could let a modified form of the procedure continue. ...

Doctors Perform Medical Procedure On Wrong Newborn
The procedure was meant for another child.

Butt procedures, male breast reduction growing slices of plastic surgery
Every 30 min of 2015, a rump was remodeled. Men had 40% of all breast reductions.

"Gynecologists Kavita Shah Arora and Allan Jacobs said procedures that slightly changed the look of a ...
"... were comparable to male circumcision or cosmetic procedures in Western countries like labiaplasty. Laws against mild modifications were ...

Mix-up leads to surgical procedure on wrong baby
Tennessee mom says her newborn was mistakenly given treatment he didn't need

New Chipotle Food Safety Procedures Include Shutting Down Restaurant If Anyone Barfs
... what happened inside, but it’s pretty much exactly what you would expect: repetitive instructional videos about food safety and cleaning procedures, ...

New Video Series Shows The Reality Of Abortion Procedures
New Video Series Shows The Reality Of Abortion Procedures

Yay going in for kidney stone procedure soon!
There is a G-d i have been in the hospital with stone pain and bowel pain the past week. the bowel issue resolved by itself without surgery ...

Resources last updated: 3/22/2016 2:32:55 AM