tags:

views:

712

answers:

2

Hi, I try to read a binary field in database ( Project Server 2007; dbo.MSP_CALENDAR ). MS don't implemante any fonction into PSI.

Everybody have a suggestion?

Thanks in advance

SPo

In Database Piblished, in table dbo.MSP_CALENDAR, i found a field named CAL_DATA, this field is BINARY. I try to CAST or CONVERT this field into string or DateTime....... Microsoft use this field to save the ressource personal calendar but i can't retreived the data only in Microsoft Office Project Pro 2007. In earlier version, the calendar was in datetime. Now with the new version of Project 2007 Ms put the information in Binary field. I try to find any solution to read this information.

A: 

Hi, I have exactly the same question! Did you manage to find a solution? Thanks for your help jpa

+1  A: 

Just use the CAST statement

For example:

CREATE TABLE [dbo].[Table_1]([ID] INTEGER NOT NULL, [BIN] [binary](20) NULL);
INSERT INTO table_1 values (1, cast('I am a binary field' as BINARY));
SELECT ID, BIN, CAST(BIN AS VARCHAR(20)) AS BINTEXT FROM TABLE_1;

ID          BIN                                        BINTEXT
----------- ------------------------------------------ --------------------
1           0x4920616D20612062696E617279206669656C6400 I am a binary field
Noah
-1 This is the opposite of what he wants to do.
magnifico
No, it is not. He states that the "field is Binary" I was just showing a complete solution showing how you can put data into and retrieve it from a Binary field.
Noah