ROW_NUMBER is not a recognized function name

I received this error while using ROW_NUMBER function for Paging in my project.
The root cause for the issue is
ROW_NUMBER function is not compatible with SQL 2000.
Though I was working on SQL 2005 but I was getting the same error.
After struggling a lot on the web, I realized that though I was using SQL 2005 interface, but it was actually accessing the SQL 2000 instance.
I came to know this by using below query
select @@version ( which gaves me MS SQL 2000 )
To solve this issue, I tried one solution
I went in SQL 2005 Server,
right click on SQL Database >> Select Option >> Select Compatibility Level from the dropdown to SQL 2005.
Unfortunalty I was not getting SQL 2005 name in the dropdown.
My brother gave me sugession to reinstall SQL 2005 and give a new instance name while installing it.

NOTE : When u install SQL Server 2005, by default it select to DEFAULT INSTANCE. Instead of proceeding with the existing default instance, Choose NEW INSTANCE by entering new instance name. Proceed the installation.
One installation is done, I selected the instance name from the dropdown of Connect SQL Server Page and entered in SQL 2005.
Alas… the error got solved….
I was able to work on my project happily…
Thanks to my brother, he is well sound programmer…
Hope this helps u too…
To learn about ROW_NUMBER() click below links
http://blogs.conchango.com/jamiethomson/archive/2005/02/16/1025.aspx

Create your own fonts

Do you know you can create your own font without installing any font software.
It is built in your system !!

Just try it..
1. Click “Start”
2. Click “Run”
3. Type in “eudcedit”
4. The program that pops up is a hidden font editor that lets you create your own fonts and characters to use in other programs like MS Word.
Amazing !!!!!
Enjoy !!!!!!!!!!!!!!

The name does not exist in the current context

was working on the project, i received the error

The name <> does not exist in the current context

I tried my best to find the core issue, but was unable to locate it.

After struggling thru internet, i found the reason behind the issue.

How Issue Occured ?

What i did was, I was in no mood of creating the 2nd page that is similar to my 1st page. I copied the 1st page (say page1.aspx) and pasted it and renamed it to page2.aspx.

I did some changes on the page2.aspx, adding and removing controls.

When i started debugging, i received the error

“The name txtUsername.text does not exist in the current context.”

What is the Solution ?

The solution is,

You have to confirm the aspx page and its codebehind page ( eg : for page1.aspx it should be page2.aspx.cs, for page2.aspx it should be page2.aspx.cs )

similarly

You have to confirm the class name of the aspx page and codebehind page.
( eg :
1. In page1.aspx file, class name is define by Inherits=”page1″ ,
2. In code behind file page1.aspx.cs it should mention as
public partial class page1 : System.Web.UI.Page
)

What i found was, i was using the page1 classname in page2.
Changing this, solved my issue.

Hope this helps you too….

If YES, please share your happiness by give us your reply.

« Older Entries   Newer Entries »