Home All Groups Group Topic Archive Search About

what to do with a table called 'EVENT' ?

Author
6 Apr 2006 8:28 PM
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?

Author
7 Apr 2006 12:32 AM
Matt Noonan
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.

--
Matt Noonan
EasyObjects.NET: The O/RM for the Enterprise Library
http://www.easyobjects.net


<gordonjo***@iname.com> wrote in message
Show quote
news:1144355328.947889.56020@z34g2000cwc.googlegroups.com...
> 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?
>
Author
7 Apr 2006 1:45 PM
gordonjones
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?
Author
7 Apr 2006 10:42 PM
Matt Noonan
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?


--
Matt Noonan
EasyObjects.NET: The O/RM for the Enterprise Library
http://www.easyobjects.net


<gordonjo***@iname.com> wrote in message
Show quote
news:1144417508.576288.231500@v46g2000cwv.googlegroups.com...
> 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?
>

AddThis Social Bookmark Button