clearing dropdownlist selected value

I have this problem when I try to assign selected value using codebehind, even though I already put the code:

or dropdownlist.selectedindex=-1
or dropdownlist.selectedindex=""

all throw error said it can’t have duplicate selected value.
now there are two way to clear the selected value, first by do it twice, like what is listed in bug section in Q327244 (;en-us;327244), like this:

dropdownlist.selectedvalue=-1 ‘this will change the selected value index to index number 0
dropdownlist.selectedvalue=-1 ‘this will clear all selected item

or add this code:


setting crystal report using sqldatasource in visual studio 2008

It’s been several days I looking for connecting crystal report express for visual studio 2008 using sqldatasource, so i can edit the sql query using code behind on runtime. All I found on the net are using dataset or xsd, so more coding required 🙂
But finally I found it in microsoft site, with a few simple steps:
– Create crystal report file.
– Connect to database and add fields on the report, customize it as you like.
Continue reading


OK this is oracle sql error. the first step to trouble shoot it is by spotting what the error said: looks for missing right parenthesis.
But unfortunately, this is not the only case for this error thrown out. Even when we match the count of left and right parenthesis, error ORA-00907 still can be thrown out. some of the cases are:
1. In program, for multi lines sql query, if you put comment it will throw error. ex.
sql = ” select a,round(b,2 –comment ”
sql &= ” ) from table ”

Continue reading


just find out today, another limitation of the visual studio 2008
beside it somehow not 100% compatible with early days oracle query (I use oracle 8.1.7 database with 2.0/vs2008, ans some queries just cannot work without “simplifying” it).

anyway, back to the tittle, it seems that every time i make it over 127 columns when i save it, the visual studio crashed (actually i can save it at 127 columns, but when i add 13 more bound fields, it crashed). the strange thing is that it is ok if you use automatic generating field option, but not ok if you manually add the field yourself…

but don’t worry there is a work around to that, but this is with a consequence,
Continue reading