Hi!
I got (in my software) a large DataSet object via a WebService. The DataSet contains many DataTables, and it is well structured with primary - and foreign keys and relations. It is like a virtual database (I think, this is the main idea of DataSet!).
But how can I retreive data from it...
Hi, again!
I solved the problem by myself. The SqlDataReader object has to be closed before executing commit() -command. So, I made a wrapper class, to where the data from SqlDataReader object is copied. Then I close SqlDataReader object, then commit the database and then the wrapper class...
Hi!
I have done a database handler class (named MyDBConnection). My base idea was, that via this class I could execute all my database jobs (INSERT, SELECT and UPDATE prosedures). (see code, this is very stripped version, but here should be all essential parts.)
class MyDBConnection
{...
Hi!
I found one solution for this problem by myself...I'm not sure is it the rigth (and only) one....
This is an example...please send yuor comments, if here is fatal errors.
The wrapper class
The header.
// StringConverter.h
#pragma once
#include "Converter.h"
using namespace System...
Hi!
Now I have a need to pass byte array (byte[]) parameter from C# component to C++ component (and vice versa). So, I have an old C++ component, which have a function like unsigned char* encode(unsigned char* arrBytes). I thought, that I will do a wrapper class for it, but how...
JuhaKa
Hi!
I'm just writing a very simple XML editor. I have a TextBox instance as a editing panel. How can I change the color of tags? My goal is, that when I press '<' -key (in TextBox), this and the next characters would be blue, and when I press '>' -key, the next characters would be black again...
Hip hey hurrah!
I found a one way to indent the data of XmlDocument -object! I don't is there any risks to do so, but it seems to work.
XmlDocument doc = new XmlDocument();
doc.LoadXml("<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" +...
Thanks, Chip
There is no need to read XML data 'manually', but only for debugging purpose. Maybe, I will write the indenting code myself later, maybe...
But now, I can (have to) live with this XmlDocument -object ;O)!
Thanks again!
br. Juha Ka
Hi!
Is there any way to indent xml in XmlDocument object?
I have a xml document in XmlDocument object, and there is no whitespaces. When I print it (to console), it is hard to read. I think, indenting the document makes it much more readable.
XmlTextWriter class has a property called...
I never resolved this error. I gave up with structs and did it with classes.
public class MSettings_def
{
public byte MFormat = 0;
public byte[] MObjects = new byte[4];
public byte[] ONumber = new byte[4];
public byte Brightness = 0;
}
public class Rparam_def
{
public byte UpperPoint = 0...
Hi!
My program gets a timestamp (4 byte integer), which is seconds since 1.1.1970 00:00 UTC. What is the easiest way to convert the timestamp to DateTime -object? There must be some ready method for it!? But I haven't found any :O(...
Or must I do a DateTime -object for base time (1.1.1970) and...
Hi, again!
How can I make a new structure, which contains others structures?
I have two structures, which contains only native types (byte, uint) and I have a need for a new structure, which contains these my own datatypes (structures).
[ StructLayout( LayoutKind.Sequential )]
public struct...
Hi!
I'm running my program (actually Windows service) made by C#. I trace it with Task Manager, and I noticed an odd thing. Mem Usage, VM Size, Handles and Threads are static (without 'normal' raising and shrinking), but number of Page Faults is raising all the time. When I started the service...
Hi!
How can I add a single node to the end of an existing file? I have a log writing component, where a new log event(XmlNode) is added to the log(XmlDocument) and then the log is written to the file. But this is too heavy way, because the size of the log can raise up to MBs and new log events...
Thanks, Alex.
If I understood right your message, I have no errors in my code and this is further a recourse problem, isn't it. Or is there still a bug somewhere, like WebRequest -object? (I have installed ServicePack 2)
I have watch the process with netstat and Task manager. Task Manager...
Hi again!
One problem solved, a new one occurs...
I have an application, which reads and writes to a website periodly every 5 seconds. I'm using (Http)WebRequest object. The application makes about 1200 successful read and write -process, but after that an error occurs. There were not enough...
Thanks to all, now I know two ways to do that dynamically! But using reflection is easier way, I think.
(Add two namespaces:
using System.Reflection;
using System.Runtime.Remoting;
and, of course, the namespace of CFoo...
....
(in the code)
ObjectHandle objHand =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.