|
|
|
|
Google Adsense |
|
|
|
Modules |
|
|
|
New at Group29 |
|
|
|
TheForce.Net |
|
|
|
Hot trends |
|
|
|
|
Incorrect Syntax near nvarchar SQL Server VB.NET
|
|
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.
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.
Originally posted in the Group29 Forums:
Incorrect Syntax near nvarchar SQL Server VB.NET
|
|
|
|
Posted on Monday, August 04, 2008 @ 07:59:00 UTC by BB
|
|
|
|
"Incorrect Syntax near nvarchar SQL Server VB.NET" | Login/Create an Account | 0 comments |
| The comments are owned by the poster. We aren't responsible for their content. |
|
|
|
|
|
No Comments Allowed for Anonymous, please register |
|
|
|
|
|
:: HeliusGray phpbb2 style by CyberAlien :: PHP-Nuke theme by www.nukemods.com ::
| |