While testing an application that uses a Gridview control to connect to a SqlDataSource control using Visual Studio .NET 2005, I ran into a problem.
Incorrect Syntax near 'nvarchar'.
Quote:
Incorrect syntax near 'nvarchar'. Must declare the scalar variable @variablename
This can happen with both VB.NET and C#.NET.
After looking into a number of things all over the web. I solved the problem with a hint from one web site. My field names in the SQL server 2000 table had spaces in them. While you can do this in SQL server by putting square brackets around the table names in SQL queries. This seems to cause a problem for ASP.NET. So I had to make the table names one word. [Plan Name] became PlanName.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest (c) 2006 by Group29 Productions.
You can syndicate Group29 Productions news with an RSS Feeder using the file backend.php