Click here to Skip to main content
15,313,039 members
Home / Discussions / C#
   

C#

 
GeneralRe: Tools for Setup Projects Pin
Bernhard Hiller26-Sep-12 4:01
MemberBernhard Hiller26-Sep-12 4:01 
AnswerRe: Tools for Setup Projects Pin
Ravi Bhavnani26-Sep-12 10:18
professionalRavi Bhavnani26-Sep-12 10:18 
GeneralRe: Tools for Setup Projects Pin
Bernhard Hiller28-Sep-12 4:31
MemberBernhard Hiller28-Sep-12 4:31 
Questionhow to find C# menu item Pin
anushikaroshan25-Sep-12 23:25
Memberanushikaroshan25-Sep-12 23:25 
AnswerRe: how to find C# menu item Pin
Ingo25-Sep-12 23:36
MemberIngo25-Sep-12 23:36 
QuestionEncryption of connection string Pin
SAURABH KATIYAR25-Sep-12 22:57
MemberSAURABH KATIYAR25-Sep-12 22:57 
AnswerRe: Encryption of connection string Pin
Pete O'Hanlon25-Sep-12 23:33
mvaPete O'Hanlon25-Sep-12 23:33 
QuestionDeserealize a binaryformtted string Pin
Member 928312225-Sep-12 2:11
MemberMember 928312225-Sep-12 2:11 
Sorry if this posted more than once.

I have a method that creates this value:
0x0001000000FFFFFFFF01000000000000000601000000036162630B
It is stored in the DB as <Binary Data>.

I use Select value from table where id = 1234.

This is the code that writes creates the value:
<pre>
public void SetSessionData(string token, object data)
{
DataService ds = null;
try
{
ds = new DataService();
using (MemoryStream stream = new MemoryStream())
{
DALArgs args = new DALArgs();
ds.SetRealmConnection(_realm);
Args.Add("sessionkey", _sessionkey);
args.Add("sessiontoken", token);
BinaryFormatter b = new BinaryFormatter();
b.Serialize(stream, data);
stream.Position = 0;
byte[] buffer = new byte[stream.Length];
stream.Read(buffer, 0, buffer.Length);
args.Add("sessionvalue", buffer);
ds.Execute("olb_SetSessionData", args);
</pre>

I'm trying to figure out how I can assign the results of the select statement to a variable and create this response:

0
1
0
0
0
255
255
255
255
1
0
0
0
0
0
0
0
6
1
0
0
0
3
97
98
99

That array comes from this:

<pre>
if (reader.Read())
{
byte[] data = (byte[])reader["SessionValue"];
<pre/>

I hope that is enough information, and that it can be done.

Any help is appreciated.

Sign In·View Thread·Permalink
AnswerRe: Deserealize a binaryformtted string Pin
Eddy Vluggen25-Sep-12 2:20
professionalEddy Vluggen25-Sep-12 2:20 
GeneralRe: Deserealize a binaryformtted string Pin
Member 928312225-Sep-12 2:26
MemberMember 928312225-Sep-12 2:26 
GeneralRe: Deserealize a binaryformtted string Pin
Eddy Vluggen25-Sep-12 2:44
professionalEddy Vluggen25-Sep-12 2:44 
GeneralRe: Deserealize a binaryformtted string Pin
Member 928312225-Sep-12 3:59
MemberMember 928312225-Sep-12 3:59 
GeneralRe: Deserealize a binaryformtted string Pin
Eddy Vluggen25-Sep-12 4:44
professionalEddy Vluggen25-Sep-12 4:44 
AnswerRe: Deserealize a binaryformtted string Pin
Bernhard Hiller25-Sep-12 3:09
MemberBernhard Hiller25-Sep-12 3:09 
GeneralRe: Deserealize a binaryformtted string Pin
Member 928312225-Sep-12 4:01
MemberMember 928312225-Sep-12 4:01 
GeneralRe: Deserealize a binaryformtted string Pin
Bernhard Hiller25-Sep-12 4:09
MemberBernhard Hiller25-Sep-12 4:09 
GeneralRe: Deserealize a binaryformtted string Pin
Member 928312225-Sep-12 4:34
MemberMember 928312225-Sep-12 4:34 
Questionhow to export these names as rows to excel Pin
ravi kumar talara25-Sep-12 1:10
Memberravi kumar talara25-Sep-12 1:10 
AnswerRe: how to export these names as rows to excel Pin
Eddy Vluggen25-Sep-12 1:19
professionalEddy Vluggen25-Sep-12 1:19 
AnswerRe: how to export these names as rows to excel Pin
Mazumder.Soumen25-Sep-12 2:34
MemberMazumder.Soumen25-Sep-12 2:34 
Questionhandwriting analysis to know human bhavior Pin
Schuner0325-Sep-12 0:18
MemberSchuner0325-Sep-12 0:18 
AnswerRe: handwriting analysis to know human bhavior Pin
Pete O'Hanlon25-Sep-12 0:40
mvaPete O'Hanlon25-Sep-12 0:40 
AnswerRe: handwriting analysis to know human bhavior Pin
Shameel25-Sep-12 1:50
professionalShameel25-Sep-12 1:50 
GeneralRe: handwriting analysis to know human bhavior Pin
Schuner0325-Sep-12 2:03
MemberSchuner0325-Sep-12 2:03 
QuestionSend data to Workflow Asynchronously Pin
Shuyuntake25-Sep-12 0:06
MemberShuyuntake25-Sep-12 0:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.