User Profile

Collapse

Profile Sidebar

Collapse
mironline
mironline
Last Activity: Jul 24 '09, 08:41 AM
Joined: May 20 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • mironline
    started a topic Using parametrized "IN"

    Using parametrized "IN"

    dear friends


    I have a problem with using "WHERE * IN ( ...... )" in sqlcommand ;

    for exp;

    Code:
    select * from users where id in (1,2) 
    // return 2 rows

    but occur error when pass the "1,2" with parameters

    Code:
    declare @id nvarchar(3)
    set @id = '1,2'
    select * from users where id in (@id)

    please help me to...
    See more | Go to post

  • mironline
    started a topic generic collection with anonymous types

    generic collection with anonymous types

    dear friends

    I have a problem with generic collection with anonymous types;

    my code is :

    Code:
     public class [B]BASE[/B]
        {
        public List<[B]????[/B]> CreateCollection(){
            List<????> x = new List<????>;
            object o = Activator.CreateInstance(GetType());
                    o = Convert.ChangeType(o, GetType());
            x.Add((????) o);
        return
    ...
    See more | Go to post

  • mironline
    replied to OledbConnection question !?
    dear Plater

    for exp :

    Code:
    SELECT content FROM [Files] WHERE id=1
    the executescalar return an object ( excel file in binary format )

    now I have this object in memory . is it possible to create a connection string for this object ?


    thanks
    See more | Go to post

    Leave a comment:


  • mironline
    started a topic OledbConnection question !?

    OledbConnection question !?

    dear friends;

    I have Files Table in sql server.:
    id -> bigint
    content ->binary

    I want to insert the excel file in binary to database.

    is it possible to create a connection string for selected content (excel file) and connect to it in run time ?! ( without saving file in hard disk)

    thank you
    .A.mz
    See more | Go to post
    Last edited by mironline; Jun 10 '09, 03:04 PM. Reason: chaning the title .

  • mironline
    started a topic overriding DataSource Property

    overriding DataSource Property

    Dear friends

    I have a problem with overriding the DataSource Property of DataGridView.

    I wonder if anyone can help me to find good solution for this issue .

    Code:
    public class  myGrid : DataGridView 
    {
      // how can I override the DataSource Property
    
    }
    Thank you .
    See more | Go to post

  • Dear rski

    I think that page talk about software requirements.
    I did not find any hardware-related paragraph .

    thank you.
    See more | Go to post

    Leave a comment:


  • Minimum System Requirement fro PostgreSQL 8.x

    Dar Friends ,

    what is the exact Minimum System Requirement (hardware and software ) of PostgreSQL 8.x [windows ver.] ?


    thanks.
    Ali
    See more | Go to post

  • mironline
    started a topic create a new instance of Object ?!

    create a new instance of Object ?!

    dear friends
    I want to Create new instance of object with using Type with this code;


    Code:
    class Myclass(){}
    
    class OtherClass()
    {
    
    Myclass mc =  CreateNewInstance(typeof(MyClass));
    
    public ???? CreateNewInstance(Type e)
    {
     return // how can i create a new instance of Myclass here ? 
    }
    }

    is it possible to use this method o I...
    See more | Go to post

  • Dear tlhintoq

    Thank you for spelling suggestion.
    I think you did not get a picture.

    please check this code :

    Code:
    foo f = new foo();
    f.number  = 13;
    test(f.number);
    
    void test(int _number)
    {
       Console.WriteLine (_number.ToString()); // result : 13
    }

    BUT I am looking for code like this :

    ...
    See more | Go to post

    Leave a comment:


  • mironline
    started a topic Pass Class Property to method as parameter

    Pass Class Property to method as parameter

    dear friends ,

    Is it possible to pass the class property to method as parameter ?
    for e.g

    Code:
    class foo {
    int x;
    
    public int number {
    set { set x = value;}
    get { return x;}
    }
    
    }
    
    public class _foo 
    {
    foo f = new foo();
    test(f.numer);
    
    void test( ? ) {
    // get the property name here 
    }
    ...
    See more | Go to post

  • mironline
    replied to Cast Question.
    dear ChBinder
    thank you for your replay.

    my problem is : who to access the object's datasource on slectedIndexCha nged
    event.

    your solution is the good way to get the 'mynewName' value , but how could I get the combination of "mynewName" and "address" ?
    See more | Go to post

    Leave a comment:


  • mironline
    started a topic Cast Question.

    Cast Question.

    Dear Friend .
    I have a question about casting in C# . I would highly appreciate if someone could help me.

    Code:
    var t = (from o in baseContext.Myuser[B]s[/B]
    where o.name == "name"
    select o);
    
    object.datasource = t;
    in object selectedindexch ange event :

    Code:
    var address = (object.selecteditem as [B]Myuser)[/B].address;

    ...
    See more | Go to post

  • mironline
    replied to Protecting .net dll's in Sql Server
    dear ck9663
    thank you for your replay,

    my application will install on client servers.
    your solution just support "IsEqual" method , and I can do it in application like this :

    Code:
    select * from [table] where password [B]=[/B] 'ckmbniwyr872tasdbcu34'
    but I am looking for code like this

    Code:
    select * from [table] where dbo.decodeMethod.contain(firstname,'lwjdf3982acxkjh') = true
    thank you....
    See more | Go to post

    Leave a comment:


  • mironline
    started a topic Protecting .net dll's in Sql Server

    Protecting .net dll's in Sql Server

    dear friends

    optimistically I'll suicide this weekend or my eyes going blind with sql exception's RED color;

    my problem is :
    I want to encrypt some of my columns in database and use "decryption.dll" to decrypt them.
    the important point is I have to obfuscate the "hash key" string;

    my problemS:
    1.the CLR dose not support obfuscated dlls;

    2.I tried to use assembly...
    See more | Go to post
    Last edited by Atli; Jan 24 '09, 10:06 PM. Reason: Moved from the MySQL forum to the Microsoft SQL Server forum.

  • mironline
    replied to Add Remove Item sIn ComboBox !!!
    thank you amigo

    belive it or not you saved my life ;)
    See more | Go to post

    Leave a comment:


  • mironline
    replied to Add Remove Item sIn ComboBox !!!
    I just have one combobox in my page with one keydown event

    Code:
    private void comboBox1_KeyDown(object sender, KeyEventArgs e)
            {
    
                ComboBox c = sender as ComboBox;
                if (c == null) return;
                if (c.Text == "") return;
                if (e.KeyCode == Keys.Delete)
                {
                    c.Items.Clear();
                }
    ...
    See more | Go to post

    Leave a comment:


  • mironline
    replied to Add Remove Item sIn ComboBox !!!
    Dear nukefusion
    I Guess the problem is so much stranger than we think .
    check this code :

    Code:
    private void comboBox1_KeyDown(object sender, KeyEventArgs e)
            {
    
                ComboBox c = sender as ComboBox;
                if (c == null) return;
                if (c.Text == "") return;
                if (e.KeyCode == Keys.Delete)
                {
    [B]               [/]
    ...
    See more | Go to post

    Leave a comment:


  • mironline
    started a topic Add Remove Item sIn ComboBox !!!

    Add Remove Item sIn ComboBox !!!

    dear friends
    I want to add and remove items with this simple code :
    Code:
    private void comboBox1_KeyDown(object sender, KeyEventArgs e)
            {
    
                ComboBox c = sender as ComboBox;
                if (c == null) return;
                if (c.Text == "") return;
                if (e.KeyCode == Keys.Delete)
                {
                    c.Items.RemoveAt(c.FindStringExact(c.Text));
    ...
    See more | Go to post

  • mironline
    started a topic Invoking Method of Other Applications
    in .NET

    Invoking Method of Other Applications

    Dear Friends

    We have 2 console appllication

    console 1
    method 1 : open console 2
    method 2 : save data


    console 2 :
    is it possible to invoke method2 of console 1 from here ?!


    Thank you
    Wo!w
    See more | Go to post

  • mironline
    replied to EventHandler in C#
    in .NET
    solution:
    Code:
    class test
    {
        public event EventHandler RequestStart;
        public event EventHandler RequestFailed;
    
    [B] protected virtual void OnRequestStart(...........)
            {
                if (RequestStart != null) RequestStart(........);
            }[/B]
        public void Start(){
          [B][U]On[/U]RequestStart("string" , new EventArgs());[/B]
          return ; 
        }
    ...
    See more | Go to post
    Last edited by Plater; Sep 3 '08, 08:52 PM. Reason: this is a workable solution yes?

    Leave a comment:

No activity results to display
Show More
Working...