Click here to Skip to main content
15,305,375 members
Home / Discussions / C#
   

C#

 
GeneralRe: VB To C# ( _value = Asc(Mid(LStr, IValue, 1))) Pin
blackchaosv224-Sep-12 23:15
Memberblackchaosv224-Sep-12 23:15 
GeneralRe: VB To C# ( _value = Asc(Mid(LStr, IValue, 1))) Pin
Pete O'Hanlon24-Sep-12 23:29
mvaPete O'Hanlon24-Sep-12 23:29 
AnswerRe: VB To C# ( _value = Asc(Mid(LStr, IValue, 1))) Pin
BobJanova24-Sep-12 23:53
MemberBobJanova24-Sep-12 23:53 
AnswerRe: VB To C# ( _value = Asc(Mid(LStr, IValue, 1))) Pin
Dave Doknjas25-Sep-12 14:13
MemberDave Doknjas25-Sep-12 14:13 
GeneralRe: VB To C# ( _value = Asc(Mid(LStr, IValue, 1))) Pin
Pete O'Hanlon25-Sep-12 20:57
mvaPete O'Hanlon25-Sep-12 20:57 
QuestionReading data from mobilephone througe usb port Pin
sreejeshn24-Sep-12 21:59
Membersreejeshn24-Sep-12 21:59 
AnswerRe: Reading data from mobilephone througe usb port Pin
Eddy Vluggen25-Sep-12 0:19
professionalEddy Vluggen25-Sep-12 0:19 
QuestionDeserialize Pin
Member 928312224-Sep-12 17:44
MemberMember 928312224-Sep-12 17:44 
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:
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:

if (reader.Read())
{
byte[] data = (byte[])reader["SessionValue"];


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

Any help is appreciated.
QuestionC# can not locate file Pin
rachel_m24-Sep-12 17:42
Memberrachel_m24-Sep-12 17:42 
AnswerRe: C# can not locate file Pin
Abhinav S24-Sep-12 21:04
MemberAbhinav S24-Sep-12 21:04 
AnswerRe: C# can not locate file Pin
Richard MacCutchan24-Sep-12 22:01
mveRichard MacCutchan24-Sep-12 22:01 
GeneralRe: C# can not locate file Pin
Alan N25-Sep-12 0:42
MemberAlan N25-Sep-12 0:42 
GeneralRe: C# can not locate file Pin
Richard MacCutchan25-Sep-12 5:43
mveRichard MacCutchan25-Sep-12 5:43 
AnswerRe: C# can not locate file Pin
jschell25-Sep-12 8:34
Memberjschell25-Sep-12 8:34 
QuestionShould i use my DAL in my acceptance tests? Pin
Member 867449224-Sep-12 12:34
MemberMember 867449224-Sep-12 12:34 
AnswerRe: Should i use my DAL in my acceptance tests? Pin
jschell24-Sep-12 12:42
Memberjschell24-Sep-12 12:42 
AnswerRe: Should i use my DAL in my acceptance tests? Pin
V.24-Sep-12 20:16
professionalV.24-Sep-12 20:16 
AnswerRe: Should i use my DAL in my acceptance tests? Pin
BobJanova24-Sep-12 23:54
MemberBobJanova24-Sep-12 23:54 
AnswerRe: Should i use my DAL in my acceptance tests? Pin
Pete O'Hanlon25-Sep-12 0:42
mvaPete O'Hanlon25-Sep-12 0:42 
Questionftp download Pin
Member 945456324-Sep-12 5:04
MemberMember 945456324-Sep-12 5:04 
AnswerRe: ftp download Pin
Pete O'Hanlon24-Sep-12 5:09
mvaPete O'Hanlon24-Sep-12 5:09 
AnswerRe: ftp download Pin
Eddy Vluggen24-Sep-12 5:16
professionalEddy Vluggen24-Sep-12 5:16 
QuestionASAP Pin
rikah23-Sep-12 21:15
Memberrikah23-Sep-12 21:15 
AnswerRe: ASAP Pin
Ingo23-Sep-12 21:53
MemberIngo23-Sep-12 21:53 
AnswerRe: ASAP Pin
Ravi Bhavnani24-Sep-12 4:17
professionalRavi Bhavnani24-Sep-12 4:17 

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.