|
I'd use the inbuilt .NET functionality to accomplish it. You can find info here[^].
|
|
|
|
|
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
|
|
|
|
|
Member 9283122 wrote: Sorry if this posted more than once.
That'd be accepted if it were accidental; however, you copied/pasted your complete question, bumping your request. That's not done - your question is not more important than the others.
Most of the examples on serializing come with an example on deserializing. And mostly, it is separated from the rest of the logic; meaning that you serialize/deserialize an object, without a reference to a database.
Can you please edit the question and include your serialization routine? Your deserialization-code will be based on that.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
This is the seralization code:
BinaryFormatter b = new BinaryFormatter();
b.Serialize(stream, data);
stream.Position = 0;
byte[] buffer = new byte[stream.Length];
stream.Read(buffer, 0, buffer.Length);
|
|
|
|
|
mp = null;
stream = File.Open("EmployeeInfo.osl", FileMode.Open);
bformatter = new BinaryFormatter();
Console.WriteLine("Reading Employee Information");
mp = (Employee)bformatter.Deserialize(stream);
stream.Close();
Console.WriteLine("Employee Id: {0}",mp.EmpId.ToString());
Console.WriteLine("Employee Name: {0}",mp.EmpName); Taken from this[^] article, your code would look something like below;
BinaryFormatter b = new BinaryFormatter();
using (Stream s = File.Open("EmployeeInfo.osl", FileMode.Open))
{
return (MyType)b.Deserialize(s);
}
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Thanks Eddy, I'll give that a try.
|
|
|
|
|
You're welcome.
I'd try it in a separate console-app, and move it to the "current" app that your working on once it works. It helps to keep the samples as small as possible, making sure that none of the other code interferes. Once you're used to that, it's a small step to writing (unit) tests.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Don't you see that the value you presented is just 0x followed by the hexadecimal representation of each of the numbersou listed followed by 0b?
|
|
|
|
|
Thanks for the response Bernhard. How does FF translate to 255?
|
|
|
|
|
Hexadecimal - you have "digits" from 0 to 15, 10 becomes "A".
So to translate back, "F" means 15, "FF" is just 15*16 + 15.
|
|
|
|
|
|
SNKishore
BKiranKumar
BGangadharan
MPavanKumar
SVijayakumar
MSreevani
KJayaprakash
RRavichandran
BKishore
PSathyanath
HVLakshmiPrasad
PSaravanaKumar
AMAmanullah
RHemalathaa
SAundy
SMohammedShafi
DDharnendraKumar
APrabhakar
TSivaKumar
CSasiKumar
VRameshKumar
PEmmanuel
RRaja
RJayaraj
MSrinivasan
MJanakiRaman
TSatyanarayana
ClementEmersonAntony
PBalaji
PSRKrishnaPrasad
APratheep
CBhaskaran
VTGowthamaVenkatesh
MPalaniKumar
PRajesh
PGVenkatesh
MVSChaithanyaKumar
PSVijaySrikanth
RVidhyagaran
BAnilKumarRaju
AChitraDevi
KRaviKumar
CJayaganesan
MYBKKishore
BChandrakanth
RPadmaPriya
SKumaraKoodam
DKShanmugasundaram
SMagesh
SKarthik
RGWinserChemy
JayaPrakashS
SasiKumarA
ShanmugamKannaPerumal
DSSSrinivasaReddy
VVijay
JLokesh
SHarishGupta
VAnand
MMuraliKrishna
DVenkateswarlu
SRajamarisamy
SArun
SDelight
SAshokkumar
MKalaivanan
JSSifayideen
MRamasamy
AVKiranmayi
TSuresh
PVSrinivasan
RNatarajan
BBaskaran
RajendranAeroda
TSSaminathan
GSureshKumar
NSureshKumar
GSengottuVelavan
JJayakumar
TArunn
MohammedRafiShaik
MSRatheeshKumar
DennyVAbraham
MManoranjan
MDMurali
JSrinivas
SRajagopalan
SubbarayaluPrithivirajan
MBalaji
PradeepKondipudi
MMohanReddyPaidimarla
RNarayanakumar
VinothKumar
KManogar
RSurendran
Arumugam
ALakshmirathan
MohamedKasimThaha
NUmanathan
KJanakiraman
SNithiyalakshmi
CeciliaDevaAnbu
VPMBaskaralal
SuryaJaiPrabhoo
KRavikumar
STKalyanaSundaram
AKrishnan
MPrabhakaran
PDhamodharan
PKarthikeyan
RChandrasekaran
MSathishKumar
DesaiSravanMahesh
KThanigaimalai
SKarthikeyan
RHeimnath
BSudhaRani
TRavikumar
SJNaveen
KRamaKrishna
SushantKumar
SamuelAnandaraj
JAnandhev
LRaghuram
VSrinivasan
TVenkataSandeep
ASMahesh
MJagadeesan
VDharuman
RKannan
SMSaravanaKumar
ReddySujani
KVenugopal
MVignesh
MArulRaj
BRamaRao
SRameezAhmed
SSivasubramanian
KGRajasekaran
SMurugan
SAnandKumar
VGokulNath
CSaranyaSri
Sujitha
SNandaKumar
DIreneHannahlilien
VGayathri
NSubramanian
KAnand
BBetsonChandra
KNavyaKrishna
AVenkatesan
TSelvaganesh
TSMahesh
SPrabakaran
PMagudeswaran
MSaravanan
BanuRekha
SPChitra
RubinTAbraham
JSenthilKumar
DhanakotyPrabu
CRamajayam
TAbilaashKumar
EDickson
|
|
|
|
|
Select all, press Ctrl-C , Ctrl-V and you're there.
It does not matter "which" names you try to import, strings are all alike. I suggest you search an article on exporting "data" to excel and give it a try - if you're stuck with adapting the code and have a specific question, we can help.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Do you want to do this by code or manually.
If you want to do it manually simply copy every thing by CTRL + C and Open and Excel and new Worksheet and past it there via CTRL + V. Simple.
Thanks
Soumen
Happy Coding
|
|
|
|
|
is there anyone here who can share the C# code to make a graphology application using sementation and backpropagation ANN as the learning method?
|
|
|
|
|
I'm pretty darned sure that people have written articles on this. You might want to search for them as it's unlikely that anyone here will give you what is usually commercial and proprietary code.
|
|
|
|
|
Here[^]'s a Code Project article that might help you get started.
|
|
|
|
|
thx, but i've read that. actually what i need is more like a graphology application instead of only recognize the pattern.
|
|
|
|
|
Hi all,
I try to send data to my workflow machine state asynchronously.
I have +- 15 states, and I want a listener who catch data at any time.
I try with this : Asynchronous and Event-Based Activities
But it doesn't work (I can catch data, but just one time )
Do you have any ideas to do that?
Thank you for your help!
|
|
|
|
|
Hello, I have a dude: How could I make a game similar to Solitaire?. I program in Visual C# 2010 but I'm limited to work with formularies ( for my knowledges ) . How I can make moving effects? for example, the drag effect when you catch a poker card?.Or for example, How could I make a MS Word ? only the appearance? Do you know some tutorial? Thanks Family ! I just hope that you understean my dude.
|
|
|
|
|
|
|
tsw1985 wrote: Are you crazy men ?
Yes, we are Legion
I fail to see how that's relevant to your question though. You requested an example on solitaire, and there's an article on site that shows how to create one. It was either that, or a link to MSDN on drag & drop. Seemed that the article was more appropriate.
Did I misunderstand your query?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Ok tanks, plasta mierda. 
|
|
|
|
|
tsw1985 wrote: Ok tanks, plasta mierda. Most of the other readers do not speak Spanish, and this will cause them to think that I solved your problem. All that they read is "Ok, thanks".
You can vote on any post; if mine was not good, then downvote it - you wouldn't be the first to do so. My answer will show up in a grey color, giving the other readers a hint that your question was not answered as should have been. Alternatively, you can try a repost within a few days, preferably with a backlink to this thread, explaining why it isn't satisfactory.
I honestly did not want to offend you, and others here will reply in a different tone and manner.
If I may be so bold, I would like to hear what I said/did wrong. Might prevent me from being a PITA again.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
Eau de Merlot, 2011
|
|
|
|