Question Sybase: DateTime Column Named Timestamp

VentureFree

Well-known member
Joined
Jan 9, 2008
Messages
54
Programming Experience
5-10
I'm trying to get data from a Sybase database for a DAL in VB.net via a DataSet object (.xsd file). This in and of itself isn't a problem, except that the tables that I am trying to access have a column named Timestamp, which is a DateTime type column. This means that when I attempt to select that column, it thinks I'm referring to the data type Timestamp rather than the name of the column, which of course causes an error. I've tried every possible way that I can think of to select that column, but to no avail. Brackets [Timestamp] don't work. Quotes "Timestamp" just select the literal string "Timestamp". I can't even give it an alias, because any attempt to tell the alias what to refer to runs into the exact same problem.

Please note that I only have read access to this database, so I am unable to create any views or copy the data to a temporary table with a new name for Timestamp (options I had considered, but which obviously didn't pan out).

There MUST be a way to be able to select that column within the DataSet object. Do I need a new type of connection (right now I'm connecting through a Microsoft ODBC Data Source)? Is there some other way of renaming that column so that I can select it? I've only ever worked through the designer, so is there something that I can do to the underlying code of the .xsd file directly to make it work? This is seriously killing me.:mad:
 
If you drag the table from the server explorer to the dataset, does the IDE not do it for you? At the very least you can see how it did it and copy it.

Note; you'll have to add a data connection to Server Explorer (in the same way you add one to the dataset, through the connection string wizard) to get started with this..
 
Back
Top