T thought of that, so for a test I created a Column named "FROM'. This did
not cause a column named "_FROM" to be created. And referencing
"tablenameRow.From" caused no build errors. Furthermore, Intellisense showed
the column "From" in the list of properties/columns for the DataTable Row.
(Although it didn't show up as all capitals in Intellisense and when I put
"tablenameRow.FROM" in my code, Visual Studio changed it to
"tablenameRow.From".
So why does the system treat "FROM" different from "IN"? They're both SQL
reserverd words.
--
Robert Scarborough
Integrated Visual Systems
[quoted text, click to view] "Miha Markic" wrote:
> IN is a sql keyword....
>
> --
> Miha Markic [MVP C#, INETA Country Leader for Slovenia]
> RightHand .NET consulting & development
www.rthand.com > Blog:
http://cs.rthand.com/blogs/blog_with_righthand/ >
> "r0bb1e" <r0bb1e@discussions.microsoft.com> wrote in message
> news:24472FF6-51B5-4B72-A447-3B8ADFFBA103@microsoft.com...
> >I manually created a DataTable in a Typed DataSet using the DataSet
> >designer
> > in VS 2008 Pro. One of the Column names is "IN". When referencing this
> > table in VB.Net 2008, the IntelliSense did not show the column "IN" but it
> > did show a column "_IN'. If I tried to reference this column in code
> > using
> > "tablenameRow.IN" I got the build error: "'IN' is not a member of
> > 'app.DataSet.tableRow". If I reference it with "tablenameRow._IN" then I
> > don't get the build error. I have several other 2-letter-capitalized
> > column
> > names in this table such as: "'LT', 'PI' and 'MA'". These other column
> > names
> > show up in intellisense and can be referenced without the "_" prefix.
> >
> > Can someone tell me what's going on?
> >
> > Thanks
> > --
> > Robert Scarborough
> > Integrated Visual Systems
>