If you want to download to your computer for offline,but you can't because when you clicked link a third party e.g. windows media player,quickteim autorun. You should use download software e.g. flashget or you just right click onlink then click save target as.

Because exception is expensive, we should avoid in a case we can handle it

5.When you application design for contact with another layer (some dll ,e.g. BC layer, DAC layer) you may not throw exception, but should keep exception for client to handle it.

e.g

This is a DAC.

Namespace DAC

Public Class Customer

Dim currentException as ApplicationException

Public Sub AddData()

Try

‘’’ Statement

Catch Ex as Exception

Me.CurrentException = Ex

End Try

End Sub

End Class

End NameSpace

And this is a client code.

Dim cCustomer as New DAC.Customer

cCustomer.AddData

if(Not isnothing(cCustomer.currentException ))

‘code for handler exception of dac

‘e.g.

‘MessageBox.Show(ex.Tostring) ‘ for winform

‘Me.lblShowError.InnerText = ex.ToString ‘for web form

‘code for write log error

End if

6. In development phase you should display detail about exception instead hardcode wording for user

e.g.

Try

‘Code for Add data

Catch Ex as Exception

MessageBox.show(ex.toString)

Instead

MessageBox.show(“Error:Please enter againg”)

End Try

This will help you easy to find the problem, and then you pass development phase you may change wording to friendly word for user. Or you may send both error message and friendly word to user , but you should care about security issue.

7. Desing your own exception

If you wish to design you exception. It is easy to do, you just create a new class and inherit from ApplicationException

Aug 9, 2007

Aug 7, 2007

This is third adventure of rockman on nes platform.In america this game call "megaman 3"This adventure we must fight with DR.Willy as previous, and we got rush a dog robot for assistant you for beat with your enemy.

In my project i must use YUI Calendar control for build static calendar show to user.but I can't find the solution to hide left navigate and right navigate.after i search yahoo api , I don't found any thing.

but now,after i try to hack calendar.jsI know the solution for hide left navigator and right navigator

First solution1.Open calendar.js this file is in yui2.3.0\yui\build\calendar\2.you just go to line 2321 and you will see javascript code for about render left and right navigatorthen you just comment this codeyou must separate comment to two group because you should not comment code for display month name

I use setTimeout because I want to object calendar loaded.when first excute function HideNav if element ALeft or ARight dosen't loaded.it will setTimeout again and again until ALeft and ARigh loaded and hide it.

Now.I think this solution work for me.But you may have a problem.e.g. When your page have more than one calendar and you want to hide navigate button of some calendar.and now each navigator button have same id (ALeft and ARight)

Q:What is dataset ?A:Dataset is a database on ram.dataset contain number of datatable.datatable contain number datacolumns and datarow collection.Each datatable may have a primary key and foreign key and have a data relation to other datatable.Each datacolumn have datatype.Each datarow contain record of datatable.dataset itself not know about source of data.data to fill in dataset may from many kind of RDBMS,textfile,XML file, of just create data in memory from code.

Q:How i add new row to datatable ?A: You just simple create new row a reference to a NewRow() method of datable.new row is a depend from datatable while you not add it.When you add It.It will add to last row of datatable. 'sample code dim DR as DataRow = DS.tables("Customer").NewRow()

Q:How DS.Tables("Mytable").Clear different from DS.Tables.Remove("MyTable")A: Clear() method of datatable make datable delete all row.but structure of datatable is not delete too.in this case DS will contain datatable Mytable and Mytable will contain each datacolumns.It is similar Delete MyTable in T-SQL.

But Method Remove() of Dataset.Tables is remove datatable exctracly.It is similar DROP statement in T-SQL

Q:I have a datarow ,and i want to add to two datable.How i do that ?A: you must use method ImportRow() of datatable instead .Rows.Add().

Q:How i retrive data from database to dataset ?A:ADO.Net have many method to retrive data from databasebut this is one of easiest method.

'you just create new DataAdapter and set SQL statement for retrive data do you want'and set Connection object'behind the scence DataAdapter will retrive data from SQL statement throught Connection object'and then you just use Fill method ,first parameter is dataset object, second is table name do you wantdim DA as New Oledb.OledbDataAdapter("Select * from Customer",conObj)DA.Fill(DS,"Customer")

Q:How i update data from dataset to database ?A:This solution similar when you want to retrive data from databasedim DA as New Oledb.OledbDataAdapter("Select * from Customer",conObj)dim CB as New Oledb.OledbCommandBuilder(A)' you just add this line for create Command builder and reference to DataAdapterDA.Update (DS,"Customer") ' and then update dataset table Customer throught Update method

Behind the scence CB object will create Insert,Update,Delete SQL statement from schemaif you serious performance issue you should create SQL statement by manualThis example just show you how to update by simplest way.

Q:Are datatable must retrive data from database ?A:NO. Datatable can create datafrom void.you can create new datatable and create new datacolumn.and then you use it with out database.'e.g.dim DT as new Datable

Q:How i use Dataset read XML file ?A:Yes. You just use ReadXML() Method from Dataset and you can Save XML data from dataset to XML file,just use WriteXML() Method.

Q:Why i can retrive data from database to dataset and i can insert new data too.But I can't Update or delete data ?A:May your table in database don't set Primary key.When you use dataadapter for update.It must you Primary Key for generate SQL statement.In case of select or insert ,it not have problem but in case of update or delete it will crash.