Click here to Skip to main content
15,888,401 members
Home / Discussions / C#
   

C#

 
GeneralRe: Puzzle 8 Solving with bfs Pin
mohammadkaab26-Sep-12 4:41
mohammadkaab26-Sep-12 4:41 
AnswerRe: Puzzle 8 Solving with bfs Pin
Ingo26-Sep-12 5:00
Ingo26-Sep-12 5:00 
AnswerRe: Puzzle 8 Solving with bfs - question etiquette. Pin
Pete O'Hanlon26-Sep-12 5:15
mvePete O'Hanlon26-Sep-12 5:15 
QuestionMonitor database changes of 3rd party SQL DB Pin
Adam_Dev26-Sep-12 1:50
Adam_Dev26-Sep-12 1:50 
AnswerRe: Monitor database changes of 3rd party SQL DB Pin
Ingo26-Sep-12 2:30
Ingo26-Sep-12 2:30 
GeneralRe: Monitor database changes of 3rd party SQL DB Pin
Adam_Dev26-Sep-12 22:14
Adam_Dev26-Sep-12 22:14 
AnswerRe: Monitor database changes of 3rd party SQL DB Pin
Ingo26-Sep-12 22:23
Ingo26-Sep-12 22:23 
AnswerRe: Monitor database changes of 3rd party SQL DB Pin
Pete O'Hanlon26-Sep-12 2:36
mvePete O'Hanlon26-Sep-12 2:36 
GeneralRe: Monitor database changes of 3rd party SQL DB Pin
Adam_Dev26-Sep-12 22:17
Adam_Dev26-Sep-12 22:17 
GeneralRe: Monitor database changes of 3rd party SQL DB Pin
Pete O'Hanlon26-Sep-12 22:28
mvePete O'Hanlon26-Sep-12 22:28 
AnswerRe: Monitor database changes of 3rd party SQL DB Pin
Shameel26-Sep-12 4:02
professionalShameel26-Sep-12 4:02 
QuestionTools for Setup Projects Pin
Bernhard Hiller25-Sep-12 23:37
Bernhard Hiller25-Sep-12 23:37 
AnswerRe: Tools for Setup Projects Pin
Abhinav S25-Sep-12 23:50
Abhinav S25-Sep-12 23:50 
AnswerRe: Tools for Setup Projects Pin
Smart Arab26-Sep-12 0:17
Smart Arab26-Sep-12 0:17 
GeneralRe: Tools for Setup Projects Pin
Pete O'Hanlon26-Sep-12 2:40
mvePete O'Hanlon26-Sep-12 2:40 
GeneralRe: Tools for Setup Projects Pin
Smart Arab26-Sep-12 3:04
Smart Arab26-Sep-12 3:04 
GeneralRe: Tools for Setup Projects Pin
Bernhard Hiller26-Sep-12 4:01
Bernhard 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
Bernhard Hiller28-Sep-12 4:31 
Questionhow to find C# menu item Pin
anushikaroshan25-Sep-12 23:25
anushikaroshan25-Sep-12 23:25 
AnswerRe: how to find C# menu item Pin
Ingo25-Sep-12 23:36
Ingo25-Sep-12 23:36 
QuestionEncryption of connection string Pin
SAURABH KATIYAR25-Sep-12 22:57
SAURABH KATIYAR25-Sep-12 22:57 
AnswerRe: Encryption of connection string Pin
Pete O'Hanlon25-Sep-12 23:33
mvePete O'Hanlon25-Sep-12 23:33 
QuestionDeserealize a binaryformtted string Pin
Member 928312225-Sep-12 2:11
Member 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 

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.