This link saved at least couple of hours of my life. I was ready to reinstall MS SQL Server 2008 instance but trick described above did the job in much faster and elegant way. I'm sharing it in hope that it can help somebody else. Cheers.
My road to Prague
вторник, 4 сентября 2012 г.
вторник, 24 января 2012 г.
On your marks!
Today is my last working day at Stella Systems. I spent almost 7 years of my life here. It was really amazing years. I started my journey in the .NET world here. I met several very strong specialists who influenced me in a very positive way. It was a lot of different interesting challenges which I faced with. But now is the time to say good bye.
On the next weekend I'm moving to Prague to join NCR development office there. I am looking forward to meeting new people, new cultural and technical experience. It is the new blank page in my life and I hope that it is the place for a good story.
Next several months will be quite hard. I already miss my wife and my kid and I hardly imagine how I will manage to spend all of this time without them. But I am absolutely sure in correctness of our decision and I believe that my assurance will help us during the time of separation. I love you, Lena, I love you, Gleb, now I am realizing real value of every second with you and I will do all that I can to have you beside me very, very soon.
On the next weekend I'm moving to Prague to join NCR development office there. I am looking forward to meeting new people, new cultural and technical experience. It is the new blank page in my life and I hope that it is the place for a good story.
Next several months will be quite hard. I already miss my wife and my kid and I hardly imagine how I will manage to spend all of this time without them. But I am absolutely sure in correctness of our decision and I believe that my assurance will help us during the time of separation. I love you, Lena, I love you, Gleb, now I am realizing real value of every second with you and I will do all that I can to have you beside me very, very soon.
понедельник, 3 октября 2011 г.
Visual Studio 2005: how to create Web Reference from the offline WSDL file?
One of my clients asked me to create small integration solution for him, but did not provide me with access to his Web service. Instead of it, these guys sent offline WSDL file for me, so I had to integrate it into my project created using Visual Studio 2005. Firstly it was not obvious for me how to do it, but finally I found that developers are free to paste the path to local WSDL file (for example,
C:\MyWebService.wsdl
) into the URL field of standard "Add Web Reference" dialog box to create valid Web reference.понедельник, 8 ноября 2010 г.
QBFC: UTFDataFormatException exception workaround.
Steps to reproduce: application tries to perform simple QBFC query to QuickBooks 2010 on purpose of all customers retrieval using next code (creation of connection to QuickBooks is omitted for the sake of simplicity):
ICustomerQuery customerQuery = _requests.AppendCustomerQueryRq();
String requestsXml = _requests.ToXMLString();
String responsesXml = RequestProcessor.ProcessRequest(Ticket, requestsXml);
_responses = ConversionHelper.ToMsgSetResponse(responsesXml, Session);
This code worked absolutely correctly for ages, but particular client faced with exception System.Runtime.InteropServices.COMException (0x80040301): An exception occurred! Type:UTFDataFormatException, Message:invalid byte 2 (M) of a 2-byte sequence.SAXParseException: error at line 82732, column 4 in XML data. which was thrown in the last line of the code snippet above. Firstly I thought that such exception can be related with QuickBooks company data corruption, but its verification and rebuilding neither revealed any inconsistencies nor eliminated mentioned issue. I tried to investigate content of responsesXml string, but it contained absolutely valid data. I tried to delete customer related with XML document line mentioned in the exception, but exception started to raise in other absolutely correct places. But finally I found workaround which didn't explain reasons of this issue, but at least helped to eliminate given exception. This workaround consists in addition of fake filter to the customer request before its performing. I used next variant:
customerQuery.ORCustomerListQuery.CustomerListFilter.FromModifiedDate.SetValue(DateTime.Parse("1/1/1971"), true);
As you probably know, TimeModified element of QuickBooks entity can't be less than 1/1/1971, so any data can't be filtered out using this expression. Final version of the code snippet looks like:
ICustomerQuery customerQuery = _requests.AppendCustomerQueryRq();
customerQuery.ORCustomerListQuery.CustomerListFilter.FromModifiedDate.SetValue(DateTime.Parse("1/1/1971"), true);
String requestsXml = _requests.ToXMLString();
String responsesXml = RequestProcessor.ProcessRequest(Ticket, requestsXml);
_responses = ConversionHelper.ToMsgSetResponse(responsesXml, Session);
This code works absolutely correctly and returns all customers from the mentioned client's QuickBooks company.
protected IMsgSetRequest _requests = _session.CreateMsgSetRequest("US", 7, 0);
...
_requests.ClearRequests();ICustomerQuery customerQuery = _requests.AppendCustomerQueryRq();
String requestsXml = _requests.ToXMLString();
String responsesXml = RequestProcessor.ProcessRequest(Ticket, requestsXml);
_responses = ConversionHelper.ToMsgSetResponse(responsesXml, Session);
This code worked absolutely correctly for ages, but particular client faced with exception System.Runtime.InteropServices.COMException (0x80040301): An exception occurred! Type:UTFDataFormatException, Message:invalid byte 2 (M) of a 2-byte sequence.SAXParseException: error at line 82732, column 4 in XML data. which was thrown in the last line of the code snippet above. Firstly I thought that such exception can be related with QuickBooks company data corruption, but its verification and rebuilding neither revealed any inconsistencies nor eliminated mentioned issue. I tried to investigate content of responsesXml string, but it contained absolutely valid data. I tried to delete customer related with XML document line mentioned in the exception, but exception started to raise in other absolutely correct places. But finally I found workaround which didn't explain reasons of this issue, but at least helped to eliminate given exception. This workaround consists in addition of fake filter to the customer request before its performing. I used next variant:
customerQuery.ORCustomerListQuery.CustomerListFilter.FromModifiedDate.SetValue(DateTime.Parse("1/1/1971"), true);
As you probably know, TimeModified element of QuickBooks entity can't be less than 1/1/1971, so any data can't be filtered out using this expression. Final version of the code snippet looks like:
protected IMsgSetRequest _requests = _session.CreateMsgSetRequest("US", 7, 0);
...
_requests.ClearRequests();ICustomerQuery customerQuery = _requests.AppendCustomerQueryRq();
customerQuery.ORCustomerListQuery.CustomerListFilter.FromModifiedDate.SetValue(DateTime.Parse("1/1/1971"), true);
String requestsXml = _requests.ToXMLString();
String responsesXml = RequestProcessor.ProcessRequest(Ticket, requestsXml);
_responses = ConversionHelper.ToMsgSetResponse(responsesXml, Session);
This code works absolutely correctly and returns all customers from the mentioned client's QuickBooks company.
четверг, 21 октября 2010 г.
.NET 2.0: Query to MS Access database throws "The provider could not determine the Object value" exception.
Recently I faced with the weird issue. My .NET 2.0 application tried to perform very simple query to table located in MS Access 2007 database, but call of ICriteria.List() method was throwing exception "could not execute query {QUERY_TEXT}". Inner exception looked like this: "The provider could not determine the Object value. For example, the row was just created, the default for the Object column was not available, and the consumer had not yet set a new Object value.". I want to pay your attention on the fact that given table contained field of Memo data type.
I spent I lot of time on investigation of this issue and finally found cause of the problem. The fact is one of values in Memo field was corrupted somehow. Exception was eliminated after Access utility Compact and Repair Database/Project launching (you can find it on the Tools menu) on my database.
Hopefully, this post will save some time for somebody :)
P.S. Value of corrupted field, of course, wasn't restored and was replaced with line of '#' characters. Some time later I faced with it when my application threw new exception during attempt of deserialization of binary value stored there.
I spent I lot of time on investigation of this issue and finally found cause of the problem. The fact is one of values in Memo field was corrupted somehow. Exception was eliminated after Access utility Compact and Repair Database/Project launching (you can find it on the Tools menu) on my database.
Hopefully, this post will save some time for somebody :)
P.S. Value of corrupted field, of course, wasn't restored and was replaced with line of '#' characters. Some time later I faced with it when my application threw new exception during attempt of deserialization of binary value stored there.
Подписаться на:
Сообщения (Atom)