Geeks With Blogs

News My Blog has been MOVED to
Michael Freidgeim's OLD Blog My Blog has been MOVED to September 2006 Entries
Link Child/Master fields in ADP do not work for Numeric key
A long time ago I reported the problem with MS Access ADP Reports/Forms with subforms/subreports where LinkMaster/Child fields are numeric but not integer (i.e scale greater than zero). I had the join field defined as numeric(28.2).However Access doesn't recognize scale and generate incorrect SQLstatements, egexec sp_executesql N'SELECT * FROM "dbo"."PickSlipOverdues" WHERE((@P1 = "PatronID"))', N'@P1 numeric(28)', 7instead of correct , N'@P1 numeric(28.2)', 7.01 As a result join doesn't work and ......

Posted On Wednesday, September 27, 2006 4:08 PM

Unreliable in ASP.NET 2.0 Cache usage in MetaBuilders.DialogWindow
I am using MetaBuilders.DialogWindow[^] and recently got System.NullReferenceException: Object reference not set to an instance of an MetaBuilders.WebControls.Di... . Investigation of the code showed that the problem related to the changed in ASP.NET 2.0 Cashe behavior - asyncronous Insert. if ( context.Cache[cacheKey] == null ) { context.Cache.Insert(cacheKey, DetermineIsRegistered()); } return (Boolean)context.Cache[cach... similar problem was known ......

Posted On Wednesday, September 20, 2006 7:55 AM

Nested Data Bound UserControl
I needed to have ASP.NET report with DataRepeater and nested data bound user control.The similar approach is used in ASP.NET Reports Starter Kit with datagrid nested in datalist itemtemplate. <asp:datalist id="CategoriesList" runat="server" > <itemtemplate> <asp:datagrid id=Datagrid1 runat="server" DataSource=''<%# GetDetails(DataBinder.Eval(... "CategoryID")) %>' </< FONT>asp:datagrid> </< FONT>itemtemplate> <headerstyle cssclass="ReportTitle">&... ......

Posted On Saturday, September 16, 2006 12:41 PM

DataSetHelper.SelectDistinct method for multiple columns
UPDATE: In .Net 2.0 there is DataView.ToTable Method (String, Boolean, String[]) that does, what my function (and MS KB article 326176) was created to address. The article is now obsolete. UPDATE: there is also optimized for performance class in CodeProject DataTable with SelectDistinct in VB . I was using a DataSetHelper class based on MS kb article 326176 HOW TO: Implement a DataSet SELECT DISTINCT Helper Class. However SelectDistinct function from the article works only if you select distinct ......

Posted On Friday, September 15, 2006 12:19 PM

Batch to Logging Worker Process Recycling Events in IIS 6.
I want to log Worker Process Recycling Events in IIS 6.0 (IIS 6.0) , but ther is no UI for this. I've created batch file and decided to post it here, because current instructions have a few typos.You should modify value of AppPoolName as appropriate. :rem IISLoggingWorkerProcessRecy... from EnableEvent=trueset AppPoolName=ASP.NET v2.0%systemDRIVE%cd %systemDRIVE%\inetpub\admin... ......

Posted On Friday, September 15, 2006 8:27 AM

Call Web Services through SQuid proxy server with authentication requested
My ASP.NET application calls web services( including Google Web API) and it is a requirement to access it through Proxy Server that requires Authentication. It works correctly with Microsoft ISA server (see my post Set defaultProxy configuration Element for Proxy Server) . But it didn't work with Squid proxy server Authentication. When I specified useDefaultCredentials=true, the WebException returned : “HTTP status 417: Unknown“.After some investigation I found that 417 is actually Expectation failed ......

Posted On Wednesday, September 13, 2006 11:06 AM

Handling missing source columns in DataSetHelper.InsertInto method
I am using a DataSetHelper class from MS kb article 326009 HOW TO: Implement a DataSet SELECT INTO Helper Class in Visual C# .NET Recetly I've noticed that InsertInto method throws exception if the source table doesn't have some columns from the target. It will be better to set columns to null or default. The changed code is the following: /// /// Sample of call /// dsHelper.InsertInto(ds.Tabl... ds.Tables["Employees"], "FirstName FName,LastName LName,BirthDate", "EmployeeID<5", "BirthDate") ......

Posted On Monday, September 11, 2006 8:33 AM

Retry to call Web Service in case of "The remote name could not be resolved" error.
I found that sometimes, if I have an error "The remote name could not be resolved" to access remote web services, I should re-try the call and it helps.I've considered to increase timeout for WebServices method call, but some methods,e.g. DataSet.ReadXml (String) doesn't have the option. So I've created a static method that will retry remote call a few times. The actual function to call can be passed as delegate: public class WSClientHelper { public delegate void CallWebServiceDelegate (); public ......

Posted On Thursday, September 7, 2006 12:52 PM

GridView with inline inserts -different implementations.
I wanted to use GridView with inline inserts capability. Unfortunately it is not available out-of-the-box. I found Code Project's “ASP.NET GridView - Add a new record“ , but I don't like an idea to create dummy empty row as the first line in the DataSource. Another Code Project's GridView Redux article seems uses the same approach. I've tried “Real World GridView” , but it doesn't populate DropDownField with the List Values for Insert rows. The most promising looks Fredrik Normén's Use the GridView ......

Posted On Saturday, September 2, 2006 11:05 AM

Editable GridView with ObjectDatasource and Update method parameters.
Recently I posted Some workaround for ObjectDataSource: could not find a non-generic method '...' . Sinse that I done some investigation to understand better the reason of the problem and possible workarounds. Most of them are posted in thread “Dataset + ObjectDatasource + GridView + ASP.NET 2” .The problem perfectly described here. And it is reported to MS, but they don't want to address it. Actually Update code trying to executeby ASP.NET from ObjectDataSource very depends on fields and field properties, ......

Posted On Friday, September 1, 2006 10:32 AM

Copyright © Michael Freidgeim | Powered by: