![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm trying to import a Xml file in a table. It's working find, but when the data are inserted, my trigger on this table doesn't work ? ... Vbs file: Set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkLoad") objBL.ConnectionString = "provider=SQLOLEDB.1;data source=*****;database=*****;uid=*****;pwd=*****" objBL.ErrorLogFile = "C:\Temp\error.xml" objBL.SchemaGen = True objBL.CheckConstraints = True objBL.KeepIdentity = False objBL.BulkLoad = true objBL.Execute "C:\Temp\9219142_MAPPING.xsd", "C:\Temp\9219142.xml" Set objBL = Nothing |
#3
| |||
| |||
|
|
By default triggers don't fire when you bulk load. At least not regular bulk load. I don't know if XML bulk load is any different. Regular bulk load has an option to fire triggers. You may want to explorer whether XML bulk load offers this too. -- Erland Sommarskog, SQL Server MVP, esq... (AT) sommarskog (DOT) se Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books... Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx- Masquer le texte des messages précédents - - Afficher le texte des messages précédents - |
#4
| |||
| |||
|
|
Thank you, but i don't find any information about an option to fire triggers. I will continue to looking for more informations about XML bulk load options. |
|
An other question, to circumvent my problem; Can i make an operation in the Xsd file ? I want to add an constant character to an column. Can i modify the Xsd file to look like the following: |
#5
| |||
| |||
|
|
M6C (roca.da... (AT) gmail (DOT) com) writes: Thank you, but i don't find any information about an option to fire triggers. I will continue to looking for more informations about XML bulk load options. I looked in MSDN Library, and according to the topic "SQL Server XML Bulk Load Object Model", there is indeed aFireTriggersproperty. This is forSQLXML4.0. I don't have much experience ofSQLXML, butFireTriggersis not listed under "What's New in SQL 4.0", so I guess it was there in 3.0 as well. |
![]() |
| Thread Tools | |
| Display Modes | |
| |