Friday, March 23, 2012
Error when importing XML to SQL-server using activX
http://www.perfectxml.com/articles/X...rtXMLSQL.asp#3
But i get an error when the import is finish:
Error Source: Microsoft Data Transformation Service (DTS) Package
Error Description: ActiveX Scripting encounted a Run Time Error during
the execution of the script.
The data is imported to the table as it should
What could be the problem?//Peter
"Peter" <dj-pnr@.get2net.dk> wrote in message
news:4073f900@.news.wineasy.se...
[snip]
> The data is imported to the table as it should
> What could be the problem?//Peter
If the data gets imported, then it is probably a problem with syntax at the
end of your script. Check to make sure it is correct.
Bryant
|||I have the following code:
'************************************************* *********************
' Visual Basic ActiveX Script
'************************************************* ***********************
Dim objXBulkLoad
Set objXBulkLoad = CreateObject("SQLXMLBulkLoad.SQLXMLBulkLoad.3.0")
objXBulkLoad.ConnectionString =
"PROVIDER=SQLOLEDB.1;SERVER=000.000.000.000;UID=ad m;PWD=password;DATABASE=No
rthWind;"
objXBulkLoad.KeepIdentity = False
'Optional Settings
objXBulkLoad.ErrorLogFile = "c:\NWError.LOG"
objXBulkLoad.TempFilePath = "c:\temp"
'Executing the bulk-load
objXBulkLoad.Execute "c:\books.xsd", "c:\books.xml"
Main = DTSTaskExecResult_Success
Can you see any errors?
"Bryant Likes" <bryant@.suespammers.org> skrev i en meddelelse
news:uekmKakHEHA.3476@.TK2MSFTNGP11.phx.gbl...
> "Peter" <dj-pnr@.get2net.dk> wrote in message
> news:4073f900@.news.wineasy.se...
> [snip]
> If the data gets imported, then it is probably a problem with syntax at
the
> end of your script. Check to make sure it is correct.
> --
> Bryant
>
|||"Peter" <dj-pnr@.get2net.dk> wrote in message
news:407bedf5$1@.news.wineasy.se...
[snip]
> Main = DTSTaskExecResult_Success
> Can you see any errors?
It doesn't look like you have a Function called main, so that last line
would cause the error. You should wrap everything in a function like:
Function Main()
''' Insert all your code here
Main = DTSTaskExecResult_Success
End Function
Bryant
|||Xref: TK2MSFTNGP08.phx.gbl microsoft.public.sqlserver.xml:23306
Tanks! That solved my problem
"Bryant Likes" <bryant@.suespammers.org> skrev i en meddelelse
news:%237pbt4dIEHA.3964@.TK2MSFTNGP10.phx.gbl...
> "Peter" <dj-pnr@.get2net.dk> wrote in message
> news:407bedf5$1@.news.wineasy.se...
> [snip]
> It doesn't look like you have a Function called main, so that last line
> would cause the error. You should wrap everything in a function like:
> Function Main()
> ''' Insert all your code here
> Main = DTSTaskExecResult_Success
> End Function
> --
> Bryant
>
Monday, March 12, 2012
error when changing published article at the subscriber
Hi
Using merge replication - the stored procs are published articles.
When trying to change the article at the subscriber (sql express) I get the following errors:
Msg 21531, Level 16, State 1, Procedure sp_MSmerge_alterschemaonly, Line 45
The DDL statement cannot be performed at the Subscriber or Republisher.
Msg 21530, Level 16, State 1, Procedure sp_MSmerge_ddldispatcher, Line 181
The DDL operation failed inside merge DDL replication manipulation.
Msg 3609, Level 16, State 2, Procedure usp_Anniversary_upd, Line 21
The transaction ended in the trigger. The batch has been aborted.
Does this mean it can only be changed at the publisher ?
Bruce
correct. If you want to make schema changes at the subscriber, you need to set @.replicate_ddl to false in sp_addmergepublication.|||Schema changes cannot be made at the subscriber. They have to come from the Publisher.
I believe Greg meant "publisher only" instead of "subscriber" in the above statement.
|||Hi
Just to clarify this.....
1. You cannot change it at the subscriber, irrespective of whether @.replicate_ddl is set to 0 or 1 ?
2. If @.replicate_ddl is set to 1, then changing the proc on the publisher will result in the proc being changed at the subscriber next time it is synchronised (if a published article)
Is this correct ?
I ask, because @.replicate_ddl is set to 1, but I get that error mentioned earlier if I try and change it at the subscriber.....
Thanks
Bruce
1. you're correct, i was wrong in my earlier post.
2. correct.