what to do with a table called 'EVENT' ?

  • Thread starter Thread starter gordonjones
  • Start date Start date
G

gordonjones

I'm writing a VB.NET 2005 app to display some data from an Oracle 10g
database that has a table called EVENT. When I generate a DataSet using
the Wizard and Designer nothing was working as expected. Then I noticed
that on the intellisense menu the table was actually called "_EVENT" !
What do I need to do?
 
Event is a reserved word in VB, so the generated DataSet recognized this and
put the underscore in front of the name. You can change the name of the
table to something that is not reserved, like "EVENTTABLE" or something.
 
The database is for a 3rd party software package... I can't change the
table name. I also can't add/change the schema (to create a synonym)

If I view the raw .xsd file I see this line:

<xs:element name="EVENT" msprop:Generator_UserTableName="EVENT"
msprop:Generator_RowDeletedName="EVENTRowDeleted"
msprop:Generator_TableClassName="EVENTDataTable"
msprop:Generator_RowChangedName="EVENTRowChanged"
msprop:Generator_RowClassName="EVENTRow"
msprop:Generator_RowChangingName="EVENTRowChanging"
msprop:Generator_RowEvArgName="EVENTRowChangeEvent"
msprop:Generator_RowEvHandlerName="EVENTRowChangeEventHandler"
msprop:Generator_TablePropName="_EVENT"
msprop:Generator_TableVarName="tableEVENT"
msprop:Generator_RowDeletingName="EVENTRowDeleting">

I guess I'll have to create my Datasets manually?
 
Well, somebody else may have to chime in here. I use an O/RM and code
generation, so all I would do is add an alias to the table and it would be
taken care of. I don't use Visual Studio to generate DataSets.

But taking a look at your XML, can you change the element name to something
else besides EVENT?
 
Back
Top