Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
K

Ken Mazaika

@Ken Mazaika
About
Posts
122
Topics
40
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • New Record in New Form problem.
    K Ken Mazaika

    If I understand your question correctly, I believe what you are trying to accomplish is something like: -Pull data down from the database -Make local changes to the data -Update again from the database*** -Push your changes up to the server And the problem you are having is merging the datasets together. If this is what you are trying to do there are two routes of action I would consider: 1- is there any way around this, so you could avoid the problem completely? I suggest you take a step back, look through your code, and see if there is a different design strategy you could follow. If you could somehow remove the step where you update from that database again, the problem would probably be straight forward. 2- if you really do need to do something like this, I suggest checking out the Microsoft Sync Framework. It is designed to sync between multiple data connections, and in addition to making the updating easy, if conflicts happen it will detect those too. Take Data Offline Using Microsoft Synchronization Services for ADO.NET[^] that is a link that looks like a pretty good introduction to Harmonica. I honestly haven't read the entire article, but it looks like a good starting ground. Let me know if I misunderstood your question. -Ken

    C# help database question announcement

  • Multiple database connections
    K Ken Mazaika

    If you choose to use jdbc you'll have to download drivers for each specific database. I just wrote a post on how to dynamically load the database driver jar you need and connect to jdbc through it here[^].

    Java database java mysql sql-server oracle

  • reading audio file properties like artist,genre,album etc using VC++ 6
    K Ken Mazaika

    I'm pretty sure most audio files store properties like this in id3 tags.... I think id3lib [^] is an opensource C++ api.

    C / C++ / MFC c++ tutorial

  • Creating sql database by using Link????
    K Ken Mazaika

    Kemel, I think this might help you out. http://www.codeproject.com/KB/tips/CreateSQLDV.aspx[^] -Ken

    C# database question

  • we are lossing the Impression
    K Ken Mazaika

    Hi Raaj, I'm not sure what your question is, otherwise I would try to help. I'm not sure what this means: ..here problem is whenever user registering Impression that we are loss the 40% impression and here we doing geolocation also. -Ken

    C# design help

  • How to generate XML File using XSD and Excel(XSL) File in C#
    K Ken Mazaika

    Hi abm, You might want to look at http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/b6e8a28c-6760-4e86-a1aa-e2ce9ec36380/[^] After you read in the file you can validate the XML http://www.codeguru.com/csharp/csharp/cs_data/xml/article.php/c6737[^]. If you can export the XSL file to a CSV file, you probably could built an XSLT transformation easier than using the Jet DB provider, depending on your situation. Hope that helped. -Ken

    C# xml csharp tutorial question

  • Using an ASP.NET User Web Control on a WSS WebPart
    K Ken Mazaika

    I've spent an hour trying to do this and I can't figure out what's going on. I have a class that I derived from Microsoft.SharePoint.WebPartPages.WebPart. I built the program, and copied the dll's to C:\inetpub\wwwroot\wss\VirtualDirectories\3141\bin. I registered the WebPart through a dwp file. The webpart works great (queries a database and outputs text). I'm trying to build a User Control and include it in the webpart. To do this I put this in the Web Part's Render method: System.Web.UI.Control control = this.TemplateControl.LoadControl(@"WebUserControl.ascx"); Controls.Add(control); because of various examples online. Program compiles fine. I copied the WebUserControl.ascx all over the place to over all the tutorials I found that had it different places. Before I copied it to a lot of places I was getting WebUserControl.ascx file not found. Now I'm getting the exception: Request Failed Anyone have any ideas about what I'm not doing right? I'm not installing the dll to the GAC, I'm not sure if that has anything to do with it. Thanks, -Ken

    ASP.NET csharp asp-net sharepoint database dotnet

  • Generate C# Symbols from IDE
    K Ken Mazaika

    Does anyone know how to do this? I looked on google, and I can only see how to do it with the command line compiler. Any help is appreciated, thanks, -Kenmaz

    C# csharp visual-studio help tutorial question

  • Communicating between windows
    K Ken Mazaika

    I think you have a few options. If the scenario is that the main form creates the sub form and displays it modally the easiest solution would be to just put it in a public variable, so once it closes the variable can be accessed. If its modeless it gets a little bit more tricky. I would make a class containing the string and an object. The main form constructor would initialize the class to some good default value, then you could make the form's constructor accept this new class. When the subclass wants to change the value, use one item in the class to lock the item (for threadsafeness) and then set the string value. The main class could then lock the string, and read it. Hope this helped, -Kenmaz

    C# question

  • XML Serialization with subclass
    K Ken Mazaika

    Hi, I'm trying to serialize a simple configuration class that contains a few methods and primitive types. It also contains one very simple class:

    [XmlRootAttribute(ElementName = "WildAnimal", IsNullable = false)]
    class Config
    {
    public int a;
    public int b;
    public SimpleClass classinst;

    public Config()
    }
    

    class SimpleClass
    {
    public int c;
    public int d;

    public SimpleClass()
    }
    

    Along with Serialize/Deseriailze functions inside the Config class:

        public void SerializeObject(Object pObject)
        {
            try
            {
                FileStream fileStream = new FileStream(s\_strBaseThemeDirectory +
                    @"\\" +m\_strName+".xml", FileMode.CreateNew, FileAccess.ReadWrite);
                XmlSerializer xs = new XmlSerializer(typeof(Config));
                XmlTextWriter xmlTextWriter = new XmlTextWriter(fileStream, Encoding.UTF8);
    
                xs.Serialize(xmlTextWriter, pObject);
                fileStream = (FileStream)xmlTextWriter.BaseStream;
                fileStream.Close();
            }
            catch (Exception e)
            {
                Utilities.Trace("Error Serializing the XML: " + e.ToString());
            }
        }
    
        public Configuration DeserializeObject(string strName)
        {
    
            FileStream fileStream = new FileStream("filename.xml", FileMode.Open, FileAccess.ReadWrite);
    
            XmlSerializer xs = new XmlSerializer(typeof(Config));
            XmlTextWriter xmlTextWriter = new XmlTextWriter(fileStream, Encoding.UTF8);
            return (Configuration)xs.Deserialize(fileStream);
    

    }

    Everything works fine without the SimpleClass, but when that gets thrown into the mix I've been running into exceptions being thrown (the SimpleClass is actually in an Arraylist). Any idea how I should get around this issue? Thanks! -Ken

    C# help debugging xml json question

  • Wireless PC to HDTV?
    K Ken Mazaika

    I haven't used that, but I saw a presentation on Windows Media center, which looks pretty cool. I'm pretty sure the same functionality can be had with an xbox 360, if you don't mind it being wired, and I think it would cost about the same.

    The Lounge sysadmin question

  • Beginner's C# Book
    K Ken Mazaika

    Hi, I'm trying to convince a friend of mine to learn C#, and he's looking for a good book to start with. He has experience with VB 6, but isn't very familiar with oop. Any suggestions? Thanks, -Ken

    C# learning csharp question

  • Creating a new Template Item
    K Ken Mazaika

    Thanks for your response. That solved the problem completely. I created a LList.cpp file, which I didn't treat as a header, I added the template definitions to the header and it worked perfectly. Thanks again for your response! -Ken

    C / C++ / MFC c++ wpf data-structures json

  • Creating a new Template Item
    K Ken Mazaika

    Hi, I made a Stack implementation, and now I'm looking to make the implementation be more generic. I know that the way to do this is probably to use template. I have a cons list of items which is template class ConsList : public LList { .... ConsList(T first, LList* rest); //constructor } as of now. When I try to make an instance of the ConsList with the new keyword, I get a lot of errors g++ -o Main LList.o Stack.o Exception.o main.o Stack.o: In function `Stack::push(int)': Stack.cpp:(.text+0xaa): undefined reference to `ConsList::ConsList(int, LList*)' Stack.o: In function `Stack::Stack()': Stack.cpp:(.text+0xe5): undefined reference to `EmptyList::EmptyList()' Stack.o: In function `Stack::Stack()': Stack.cpp:(.text+0x123): undefined reference to `EmptyList::EmptyList()' collect2: ld returned 1 exit status I've googled templates, and it looks like nobody makes a new item that is a template. If there a reason why people don't use this, or how would I go about creating an instance of ConsList(.., ..). Thanks, -Ken

    C / C++ / MFC c++ wpf data-structures json

  • Setting this to something else
    K Ken Mazaika

    Haha, that explains why my attempts to do it all failed. Thanks, -Ken

    C / C++ / MFC data-structures question

  • Setting this to something else
    K Ken Mazaika

    Hi, I'm looking for a way to change what this points to. I want to make a function that essentially does this = new InstanceOfAClass(value, this), for a linked list, but but I can't figure out how. I feel like this is a pretty basic question, but I can't find the answer. Thanks, -Ken

    C / C++ / MFC data-structures question

  • User Accounts
    K Ken Mazaika

    thanks christian. the word 'session' was what i was looking for. I appreciate it...thanks a lot man, -ken

    ASP.NET question csharp asp-net

  • Create ASPX pages on the fly
    K Ken Mazaika

    I actually solved this problem earlier. My solution worked because I used the same C# code file on each of the aspx pages. I'm sure it could be done otherwise, but it was easy to do that way. What I did was create a base aspx file that had all the things the aspx file would need with a specific comment where the changing data would be. I then used a streamreader and streamwriter to go through the two files. When the file got to the comment it would then use a different stream reader for that sections contents, and then continue to read the rest of the base ifle. There might be an easier solution, but this worked fine for me. -ken

    ASP.NET question sysadmin

  • User Accounts
    K Ken Mazaika

    Hi, I'm making a website in ASP.NET (C#) that handles users. How do I store data specific to the user's connection. I got it working using static variables, but it turns out that all users have the same values for static variables (which makes sense now that I think about it). How can I "remember" the user id of someone who logged in and not have it mix up other users? I know I could do it by using a static hashtable of userids and ipaddresses but I feel like this is probably a more complicated solution than it needs to be. I know this is probably a pretty common question, and I'm sorry if its been asked before. Any response would be helpful though. Thanks,

    ASP.NET question csharp asp-net

  • Installation System
    K Ken Mazaika

    Hi, What Installation System do you recommend the most? Do you know of any side-by-side comparisons of the big ones out there (I searched for a while with no luck)? Currently my company uses InstallShield but we're looking into moving into an OpenSource installer (probably Inno or NSIS) and I was wondering if there were any clear cut advantages to one installer vs the other (No one here has any experience with either one). Thanks.

    C# visual-studio question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups