Re: Access Database Field called E



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


.