Re: Access Database Field called E



I understand - you should see some of the databases I inherited! :-(

--
Brendan Reynolds

"Paul Faulkner" <PaulFaulkner@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:13E6455D-DDFF-48B9-93B5-021D61267C59@xxxxxxxxxxxxxxxx
> Hi,
>
> Thanks for those ideas :-) I had the same ideas regarding aliasing the
> field, unfortunately I can't change the field name, and no I didn't call
> the
> field that I inherited it,
>
> cheers,
> Paul
>
> "Brendan Reynolds" wrote:
>
>> 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
>>
>>
>>


.