|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Return Value from SQLXMLBULKLOADLib.SQLXMLBulkLoad3Class.ExecuteI am l trying to return a value of success or failure from the execute method
can anybody help? I am not sure if I understand what you want exactly. If you want to see if
Bulkload.Execute succedded, you need to try to catch the exception that might be thrown by the execute. If there is exception, it means a failure.. Note that in .Net, preferred error reporting mechanism is using exceptions rather than return codes. -- Show quoteHide quoteBertan ARI This posting is provided "AS IS" with no warranties, and confers no rights. "LvBohemian" <LvBohem***@discussions.microsoft.com> wrote in message news:71CD4B7A-80D5-4E9F-B8F9-FF59BF64E2BD@microsoft.com... >I am l trying to return a value of success or failure from the execute >method > can anybody help? Return Value from SQLXMLBULKLOADLib.SQLXMLBulkLoad3Class.Execute
In ado.net I am used to getting the number of records affected by the insert, update etc... I already have verbose catches for the errors, but it would be nice to know if it succeded or not even if there was not an error, I have found a number of conditions where no error was raised and no bulk insert was performed... thanks in advance. Iv found the same it executed didnt hit the catch ex and didnt put any
rowsinto the db in my case it was down to the autogenerated xml from dataset.writexml.ignoreschema having a namespace attritute in the root element Which ia am still struggling to remove ? ie <dsData xmlns = "....."> .... </dsData> Colin Show quoteHide quote "LvBohemian" <LvBohem***@discussions.microsoft.com> wrote in message news:E61C3FC8-3F7D-4672-B46A-399B0B541E32@microsoft.com... > Return Value from SQLXMLBULKLOADLib.SQLXMLBulkLoad3Class.Execute > > In ado.net I am used to getting the number of records affected by the > insert, update etc... > > I already have verbose catches for the errors, but it would be nice to > know > if it succeded or not even if there was not an error, I have found a > number > of conditions where no error was raised and no bulk insert was > performed... > > thanks in advance. here is the functioning format I am using, that uses the northwind db...
<Schema xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes" xmlns:sql="urn:schemas-microsoft-com:xml-sql"> <ElementType name="Shipper" sql:relation="Shippers"> <AttributeType name="ShipperID" required="yes" dt:type="int"/> <AttributeType name="CompanyName" required="yes" dt:type="string"/> <AttributeType name="Phone" required="no" dt:type="string"/> <attribute type="ShipperID"/> <attribute type="CompanyName"/> <attribute type="Phone"/> </ElementType> </Schema> Looks like the prob is the block:
<Schema xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes" xmlns:sql="urn:schemas-microsoft-com:xml-sql"> Anyone care to explain this ? my xsd is actually being generated from visual studio 2005 dataset.writeschema ! is this compatible with sqlxml3.0BulkLoad com object ?
Other interesting topics
SQL server 2000 fragmentation
URLEncode with FOR XML Explicit trouble with annotated xsd mapping schemas Tree structure data in xml .. float and money Data conversion between ado com and ado dotnet not the same with sqlserver?? OPENXML, UPDATES, and SET Criteria Query Notification XML Comparsion grammer Retrieve data from text field containing XML data xml web service as a datasource ? |
|||||||||||||||||||||||