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
A

Alexander Kojevnikov

@Alexander Kojevnikov
About
Posts
44
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Linking One Server To Another
    A Alexander Kojevnikov

    Yes it's possible: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/acdata/ac_8_qd_12_9ooj.asp[^] Alexandre Kojevnikov MCAD charter member Leuven, Belgium

    Database database sysadmin question

  • Detecting the Path. Please help!
    A Alexander Kojevnikov

    daljv wrote: You have learned twice Indeed :) Alexandre Kojevnikov MCAD charter member Leuven, Belgium

    C# question debugging help

  • Detecting the Path. Please help!
    A Alexander Kojevnikov

    Replace WindowsApplication7.Form1.resx with WindowsApplication7.Form1.resources. This should work. Alexandre Kojevnikov MCAD charter member Leuven, Belgium

    C# question debugging help

  • Detecting the Path. Please help!
    A Alexander Kojevnikov

    I probably misunderstood your question. You will need: System.Reflection and System.IO. Alexandre Kojevnikov MCAD charter member Leuven, Belgium

    C# question debugging help

  • Detecting the Path. Please help!
    A Alexander Kojevnikov

    daljv wrote: What namespace will i add for this? Whichever you find appropriate. Just don't forget to update the parameter of GetManifestResourceStream() to "Namespace.Of.Form1.resx". Alexandre Kojevnikov MCAD charter member Leuven, Belgium

    C# question debugging help

  • Detecting the Path. Please help!
    A Alexander Kojevnikov

    Form's .resx file is an embedded resource. This means you can access it as shown below:

    Assembly assembly = Assembly.GetEntryAssembly();
    Stream stream = assembly.GetManifestResourceStream(
    "WindowsApplication1.Form1.resx");

    Alexandre Kojevnikov MCAD charter member Leuven, Belgium

    C# question debugging help

  • Encoding user input
    A Alexander Kojevnikov

    You should avoid encoding user input into your SQL queries. This is a major security hole: SELECT MyColumn FROM MyTable WHERE MyOtherColumn={1} can become SELECT MyColumn FROM MyTable WHERE MyOtherColumn=0; DELETE FROM MyTable A better solution is to use stored procedures and pass user input as their parameters. Alexandre Kojevnikov MCAD charter member Leuven, Belgium

    Database csharp database question

  • howto search SQL Server
    A Alexander Kojevnikov

    You can also do this without SQL-DMO but in C++: http://sqldev.net/misc/ListSQLSvr.htm[^] Alexandre Kojevnikov MCAD charter member Leuven, Belgium

    C# csharp database sql-server sysadmin help

  • Hashtable problem
    A Alexander Kojevnikov

    MSDN - foreach: The foreach statement is used to iterate through the collection to get the desired information, but should not be used to change the contents of the collection to avoid unpredictable side effects. MSDN - Hashtable.Keys Property: The returned ICollection is not a static copy; instead, the ICollection refers back to the keys in the original Hashtable. Therefore, changes to the Hashtable continue to be reflected in the ICollection. An alternative approach could looke like this:

    Hashtable ht = new Hashtable();
    ht.Add("one", 1);
    ht.Add("two", 2);
    ht.Add("three", 3);
    ht.Add("four", 4);

    ICollection keys = ht.Keys;
    object[] copiedKeys = new object[keys.Count];
    keys.CopyTo(copiedKeys, 0);
    foreach(object key in copiedKeys)
    {
    ht[key] = "";
    }

    Alexandre Kojevnikov MCAD charter member Leuven, Belgium

    C# help

  • howto search SQL Server
    A Alexander Kojevnikov

    You can use SQL-DMO for this: Application.ListAvailableSQLServers() Alexandre Kojevnikov MCAD charter member Leuven, Belgium

    C# csharp database sql-server sysadmin help

  • Using a C++ library in C#
    A Alexander Kojevnikov

    Yes you can use C++ functions from C# as long as they are exported from your C++ DLL. The function prototype in C# will look like this:

    [DllImport("my.dll")]
    public static extern int MyFunction(string param1, int param2);

    You can check this MSDN arcticle for details: Consuming Unmanaged DLL Functions[^] Alexandre Kojevnikov MCAD charter member Leuven, Belgium

    C# csharp c++ question

  • get rows returned from data adapter
    A Alexander Kojevnikov

    Use ds.Tables["MyTable"].Rows.Count property to get the total number of rows in MyTable DataTable. Alexandre Kojevnikov MCAD charter member Leuven, Belgium

    C# database question css

  • com object, [out] params (pointers to values), C#
    A Alexander Kojevnikov

    The calling code should look like this:

    int myValue;
    myCOMObject.MyGetValue(out myValue);

    Alexandre Kojevnikov MCAD charter member Leuven, Belgium

    C# question csharp c++ com

  • com object, [out] params (pointers to values), C#
    A Alexander Kojevnikov

    After you add a reference to your COM dll you will see the IntelliSence info for its COM objects. Also, you could just go to the Object Browser and check how the syntax looks like. Your function will probably translate into this: void myfunction(ref string stringvalue, ref int intvalue); Alexandre Kojevnikov MCAD charter member Leuven, Belgium

    C# question csharp c++ com

  • About some syntax
    A Alexander Kojevnikov

    Aleon666 wrote: virtual void operator()(const char* string)=0; // call using operator This is an abstract virtual function. The class containing an abstract virtual function cannot be instantiated, and is intended to be a base class. Aleon666 wrote: template class TSpecificFunctor : public TFunctor I guess this should look like this: template<class TClass> class TSpecificFunctor : public TFunctor This is a declaration of a template class. I think you better read on templates in MSDN. Aleon666 wrote: TSpecificFunctor specFuncA(&objA, TClassA::Display); I again guess it should be: TSpecificFunctor<TClassA> specFuncA(&objA, TClassA::Display); This line creates an instance of TSpecificFunctor object, passing TClassA as a template argument, and (&objA, TClassA::Display) as constructor arguments. Aleon666 wrote: TFunctor** vTable = new TFunctor*[2]; This creates an array which contains two pointers to TFunctor objects. This array is then initialized with two created functors: specFuncA and specFuncB. HTH Alexandre Kojevnikov MCAD charter member Leuven, Belgium

    C# tutorial data-structures

  • About some syntax
    A Alexander Kojevnikov

    It's C++, not C#. You can read about functors here: http://www.codeproject.com/vcpp/stl/functor.asp[^] Alexandre Kojevnikov MCAD charter member Leuven, Belgium

    C# tutorial data-structures

  • How to get the columns except one
    A Alexander Kojevnikov

    Philip Patrick wrote: you will still need to change your code Exactly. But if you don't use SELECT * you will get errors in your SQL query and will have one more possibility to think about consequences of column renaming and adapt the client code appropriately. With SELECT * you might forget about adapting the client code. And in many cases you won't even see compile-time errors. If you are just reordering columns, you won't have to change anything. Performance is also an important issue of course. Alexandre Kojevnikov MCAD charter member Leuven, Belgium

    Database question tutorial

  • Fishy += opperator
    A Alexander Kojevnikov

    eggie5 wrote: I don't understand what you want me to do with .... this.timer2.Tick += new System.EventHandler(this.timer2_Tick); Move it to the constructor, just after InitializeComponent(); Alexandre Kojevnikov MCAD charter member Leuven, Belgium

    C# question help

  • How to get the columns except one
    A Alexander Kojevnikov

    Mike Dimmick wrote: How can I get the data of all columns except for ID column? Just want to add that it's a bad practice to use SELECT *. Think what will happen with your code if you rename some of your table columns or reorder them. Alexandre Kojevnikov MCAD charter member Leuven, Belgium

    Database question tutorial

  • What's wrong with Query String;
    A Alexander Kojevnikov

    Bo Hunter wrote: Will the IN operator work in Access? Yep, it will. Bo Hunter wrote: Does that also have to be exscaped in OleDbParameter Probably it has to be escaped. This won't hurt anyway ;) Alexandre Kojevnikov MCAD charter member Leuven, Belgium

    Database database 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