PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET what to do with a table called 'EVENT' ?

Reply

what to do with a table called 'EVENT' ?

 
Thread Tools Rate Thread
Old 06-04-2006, 09:28 PM   #1
gordonjones@iname.com
Guest
 
Posts: n/a
Default what to do with a table called 'EVENT' ?


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?

  Reply With Quote
Old 07-04-2006, 01:32 AM   #2
Matt Noonan
Guest
 
Posts: n/a
Default Re: what to do with a table called 'EVENT' ?

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


<gordonjones@iname.com> wrote in message
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?
>



  Reply With Quote
Old 07-04-2006, 02:45 PM   #3
gordonjones@iname.com
Guest
 
Posts: n/a
Default Re: what to do with a table called 'EVENT' ?

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?

  Reply With Quote
Old 07-04-2006, 11:42 PM   #4
Matt Noonan
Guest
 
Posts: n/a
Default Re: what to do with a table called 'EVENT' ?

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


<gordonjones@iname.com> wrote in message
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?
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off