March 2007 Entries

DataHelper.ExecuteDataset for different database providers

I have a small utility .Net that was used to transform data from one database to another. Initially it was written using SQLHelper DAAB class. Then it was extended to work with OledbHelper , that was created based on SqlHelper. Now it was requested to work with ODBC provider as well.I know, that I can use Enterprise library DAAB(e.g see here) , but I decided not involve additional DLLs and extra settings in config file for this simple application.The static finction to return dataset for specified ......

CQL to RPN mapping file pqf.properties changes to support different servers

I have a z39.50 client, that uses CQL language and YAZ to communicate to Z39.50 server. Yaz distribution includes etc/pqf.properties CQL to RPN mapping file, that I've used satisfactory without changes. However one of the servers, that I wanted to search, returned 0 to any query in CQL.Some debugging showed that the server doesn't support BIB-1 COMPLETENESS ATTRIBUTES (TYPE = 6) and any query, that included @attr 6, retuned 0. Additionally they didn't understand support attribute 1=1016 (any). I ......

In ASP.Net Application_Error avoid call to web service on the same web application.

In my ASP.NET application I had global event handler Application_Error, that called Web Service(via WS client proxy class) to log the error. The actual web service ASMX file belongs to the same application.I knew that it is better to call method directly, without extra layers, but function to call Web Service were located in Business Layer DLL, that also was used by Desktop Client, so I considered that it is acceptable overhead. However, when an error occured on an early stage, when ASP.NET application ......

Possible errors when using Web Setup project to upgrade version, that was XCopied

I am using Web Setup project to install Web Site Project(customized version of DotNetNuke). It installs a lot of DLL with meaningless names(like App_Web_42q_drww.dll) into BIN directory.If user upgrades later to the new version of the project MSI installer seems smart enough to delete old DLLs and install another set of DLLs with different unfriendly names.The problem happens if site to upgrade wasn't installed using Web Setup MSI, but was XCopied.The sample scenario is the following:An administrator ......

Notes about Visual Studio solution structure.

I've researched recommendations about best structure of solutions in Visual Studio, when you have multple projects. I found the best article "SSW Rules to Better Large Builds in Visual Studio.NET". See also: Structuring Solutions and Projects and Managing Dependencies from Microsoft patterns & practices Team Development with Visual Studio® .NET and Visual SourceSafe™ guide. "Project structure best practices" from searchwebservices.techtarge... Use a Consistent Folder Structure for Solutions ......

Explicitely specify Default user credentials for Proxy Server.

Some time ago I wrote post "Call Web Services through SQuid proxy server with authentication requested" and hoped, that I will not have more problems with Squid web proxy server. However the solution wasn't sufficient for other site. I've tried a lot of things, started thread "Unable to access external web sites through Squid proxy server with required authentication." and posted suggestion to Microsoft "Add ability to specify credentials to defaultProxy configuration element". But the best solution, ......

Web Browser control in MS Access form craches when Internet Explorer 7 is installed.

We have MS Access XP application that has form with embedded Web Browser control, that is used to show links.The application was build on development machine with IE 6 installed. It was found that if Internet Explorer 7 is installed on a client machine, attempt to open URL in embedded Web Browser control causes Access to crach with C0000005 error.We came out with the simplest solution( may be not acceptable for others) to completely exclude Access form with embedded control and open links in the ......

Search Access database source code

If you have MS Access database(or project ADP) and it is used SourceSafe for version control, the simplest way to search VBA source code is to use Visual Studio “Search in Files” function pointed to <path>\YourDatabase.scc folder. Note that it will also search form and reports properties and controls declarations, which can be quite handy.I am using it with Access XP. May be, latest virsions of Access have integrated search, similar to VS ......

legacyUnhandledExceptionPolicy enabled="true" doesn't prevent ASP.NET application restarting

We have an ASP.NET application in production(running IIS6 on Windows 2003 server) that sometimes has ".NET Runtime 2.0 Error Reporting" due to exceptions in background threads. We wanted to ignore the errors(while we will fix the cause) and specified <runtime> <legacyUnhandledExceptio... enabled="true" /> </runtime> in application web.config(as it is suggested in MSDN). Unfortunately it didn't help- ASP.NET application still keep restarting, which causes "session expired" behavior.I ......

If DefaultProxy address is not specified in config file, GetProxy returns unchanged URL

I found in debugger that when I am using static WebRequest.DefaultWebProxy and there is no proxy address specified in the config file, IWebProxy.GetProxy returns the same address, as it was passed. IWebProxy iDefaultWebProxy = WebRequest.DefaultWebProxy; Uri uriProxy = iDefaultWebProxy.GetProxy( I haven't seen this in documentation, but the thread confirms the behavior. new Uri(ws.Url)); if (sProxyUrl == ws.Url) {//no proxy specified } ......

Always use UrlEncode, when passing parameters to Url string

I had a function, that took the field BARCODE from the database and created URL string for Redirect with parameter ?barcode=BarcodeValue. It worked fine for a while, because most of values were numeric or alpha-numeric. However when barcode has 'plus' sign in front, e.g '+2134214', on the target page Request.QueryString("Barcode") replaces the 'plus' sign with space and returns ' 2134214' ,which is obviously not expected So the correct way to code is to use HttpUtility.UrlEncode , if characters such ......

QuickCode commands file location

I was using QuickCode on one machine and wanted to move my commands to another machine. I didn't find it in documentation, but I was able to find setiings file as C:\Documents and Settings\MyUSERNAME\Applica... Data\QuickCode\QuickCode.xml. I've copied the file to the different machine to the same directory and it works. UPDATE: a new free 2008 version is available. See also my post "QuickCode.Net new TAB shortcut key" ......

Ability to request e-mail updates for Google Groups thread.

When I am posting question to one of news groups, it always desireable to get notification if anyone replied to the thread.Recently I've noticed, that Google Groups have this facility. As it is described in the Google Groups Tip:At the top of the thread of interest, to the right of the thread title (what you or the author named the thread), click "more options". Then choose "email updates to me". You will now receive an email for any postings to that thread. A small mail icon will appear, next to ......

Gmail Labels do not support hierarchy,as Folders could.

I've started to use GMail. They have Labels instead of folders to organize e-mails. There are certainly benefits in ability to have many labels for one item. However I feel folders are more familiar for me (and other people ). In particular, I am missing ability to organize hierarchy-i.e. sub-folders within folders.I've posted the suggestion to Gmail discussion group. Update Note: I found a special Google Feature requests group. It looks that it is a good place to post suggesetions to Google.But ......

Error in WEBCA_SetTARGETSITE during installation of Web Setup Project on Vista.

I have a MSI package created using Visual Studio 2005 Web Setup Project on Windows 2003 Server. When I tried to install it on Vista(home premium) with IIS7 installed, the setup failed with Action ended: WEBCA_SetTARGETSITE. Return value 3. Fortunately, when I've installed the optional "IIS 6 Management Compatibility" option within IIS7, the installation succeeded ......

"VB Master-Details Insert" QuickStart sample should work for empty table.

I've used VB Master-Details Insert QuickStart sample in my application.It works relatively good(if ignore System.InvalidOperationExce... ObjectDataSource '...' could not find a non-generic method 'Update' that has parameters error).However to create a new record,you need to have DetailsView visible. However if the GridView is empty, DetailsView is not visible and user is uable to create the first record. I've added code to show DetailsView in DefaultMode="Insert" if no data was selected in the ......

Why we are getting ObjectDataSource: could not find a non-generic method 'Update'.

I've hit the same problem again. I've already wrote 2 posts about the error "Exception Details: System.InvalidOperationExce... ObjectDataSource 'ods' could not find a non-generic method 'Update' that has parameters: ...." ( Editable GridView with ObjectDatasource and Update method parameters. and Some workaround for ObjectDataSource: could not find a non-generic method '...' .) And these posts are the most popular in my blog according to views statistics. Not because they are very useful - just ......

Overflow error when opening form with MSCal.ocx in Access 2002

Our Access XP application uses calendar control(MSCAL.OCX).It works fine on most machines, however some sites reported "Overflow" error(6) when they tried to open a form with a calendar.It's possibly related to problems, described in the articles http://support.microsoft.co... or http://support.microsoft.co... Our support team managed to workaround the problem by manually copy expected version of mscal.ocx instead of wrong one ......

Compile DVR-MS Editor in .Net 2.0

I've downloaded (from Fun with DVR-MS article on MSDN) and rebuild DVR-MS Editor in VS 2005. It works great.The only issue in migrating is to resolve ambiguous references and explicitely specify namespace for ProgressChangedEventArgs and ProgressChangedEventHandler as Toub.MediaCenter.Dvrms.Conv... and Toub.MediaCenter.Dvrms.Conv... I also noticed that a link to extended version of tools is available from DVR-MS: Adventures in Closed Captioning ......

«March»
SunMonTueWedThuFriSat
25262728123
45678910
11121314151617
18192021222324
25262728293031
1234567