Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 18th, 2006, 01:44 PM
Registered User
 
Join Date: Mar 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default column name starts with a number. c# throws error.

I have a table in sql server 2000 which has a column whose name starts with a number("2ndName").

I have a c# code which updates the table by filling a Dataset.
When I issue an update, it throws the following error:-
"Incorrect Syntax near 2"

Query I use to build the adapter is "SELECT id, Name, [2ndName] FROM MyTBL WHERE 1 = 3" and the statement issued to update is "objAdapter.Update(objDSDB, "MyTBL")" when it throws the error "Incorrect Syntax near 2".
Any help to resolve this is appreciated.

Thanks in advance.
Jai






Similar Threads
Thread Thread Starter Forum Replies Last Post
Vista: Getfiles throws security error sigilaea Visual Basic 2008 Professionals 2 February 9th, 2009 06:00 PM
How to reorder the auto number column? al-hijjawi SQL Server 2000 3 April 28th, 2006 07:37 PM
UPDATE query throws error in selective MSI tables eelisMX General .NET 0 July 14th, 2005 06:29 AM
Transformer.transform throws DOM006 error saladin XML 0 October 13th, 2004 08:53 AM
get error when SELECT search starts with "@" abbylee26 Classic ASP Databases 1 March 15th, 2004 03:37 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.