Re: Access Database Field called E
- From: "Brendan Reynolds" <brenreyn@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 13 Oct 2005 19:37:43 +0100
ADO doesn't have any problem with 'e' as a field name. It is not a JET SQL
reserved word. It's possible that in VB.NET or C# code there may be some
confusion between the field name and the name of the EventArgs argument. For
example ...
.... in VB.NET ...
Private Sub Button2_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button2.Click
.... in C# ...
private void Page_Load(object sender, System.EventArgs e)
I can't off-hand see how this would be a problem, as usually the two uses
would not be incompatible, but if it's a problem you can ...
a) Change the name of the EventArgs argument. There's nothing sacred about
the use of the name 'e' in that context, it's just a convention.
b) Change the name of the field. It's not exactly a very descriptive name
anyway! :-)
c) Alias the name in a query ("SELECT e AS MyDescriptiveFieldName ...") and
use the alias in your code.
--
Brendan Reynolds
"Paul Faulkner" <PaulFaulkner@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B6481B21-F898-49DB-AB97-76B71FDF13B4@xxxxxxxxxxxxxxxx
> Hope this is the right newsgroup, I'm trying to build a vb .net front end
> for an access database, and using ado.net to make the connection.
>
> One of the fileds within the database is called 'E', when I complie the
> code
> for a test the code fails on this line, when I look at the code it seems
> to
> me that the letter e is used by the system as it is used throughout the
> code
> for each field I'm retrieving.
>
> Am I right in thinking I cannot use the letter E as a field name?
>
> thanks,
> Paul
.
- Follow-Ups:
- Re: Access Database Field called E
- From: Paul Faulkner
- Re: Access Database Field called E
- Prev by Date: Re: Access Database Field called E
- Next by Date: Re: Access Database Field called E
- Previous by thread: Re: Access Database Field called E
- Next by thread: Re: Access Database Field called E
- Index(es):