Thursday, November 27, 2008

Key column information is insufficient or incorrect. Too many rows were affected by update.

In MS SQL 2000, in a table with no primary key/index/constraint, whenever there is duplicate record, we cannot delete any of the duplicate record, it will give this error:
"Key column information is insufficient or incorrect. Too many rows were
affected by update."

So how is the trick to remove this duplication?
I was searching and finally found something.

here's what we can do:
1. find out which are the duplicate records
SELECT col1, col2, count(*)
FROM t1
GROUP BY col1, col2
HAVING count(*) > 1

2. delete the duplicate by using this sql
set rowcount 1
delete from t1
where col1=1 and col2=1

it works!

Reference: here

Wednesday, November 26, 2008

Access violation at address 10002593 in module ‘LIBMYSQL.dll’ read at address 00000000.

Yeah I continuously got this error after installing xampp.
Maybe u got this too?
Here's how to solve the problem:
1. Choose Start > All Programs > Startup > WinMySQLadmin
2. Click on the my.ini Setup tab in the WinMySQLadmin window. This can be tricky because the error message windows keep popping up on top the WinMySQLadmin window.
3. In the my.ini Setup tab, there’s a big text box and at the bottom, you’ll see
user=root
password=password
4. Delete the second ‘password’ so that those two lines look like this:
user=root
password=
5. Click the ‘Save Modification’ button in the left area of the window, and confirm that you want to save your changes.
6. The error messages should stop now.

Reference: here

Wednesday, November 19, 2008

Unable to read the project file 'something.vbproj'. The system cannot find the path specified

I have encountered this error and tried to debug it for quite sometime.
It's kinda annoying as I cannot open the web application.

My solution has reference to this vbproj file as etp file.
I have checked that the reference path to this vbproj file is correct in the etp file (http://localhost/something).
I have tried adding the virtual directory 'something' manually on IIS, but yet it didn't work.

How to work around this problem?
There is a file that contains the visual studio settings for the solution. Not sure what it holds. Things like startup project, page.

If the solution is called mysolution.sln then the file is mysolution.suo. It is a hidden file so you will need to turn on the display of hidden files in windows explorer or use dos.

Delete it and all will be fine. VS will create a new one.
Make a backup of the whole directory if it makes you more comfortable.

Reference: here

And I tried that.. and wala... I can open successfully.

Tuesday, November 11, 2008

Autocomplete control with dropdown

Besides extjs, here's what I found to be useful as dropdown.

Featuring auto-complete dropdown, or auto-complete textarea like Gmail's one, also country listing (PHP)

Reference: here

Resources for date picker: here

Download the code here.