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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. [Help] Data two tables with c#

[Help] Data two tables with c#

Scheduled Pinned Locked Moved C#
helpcsharp
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 9987049
    wrote on last edited by
    #1

    problem solved

    D 1 Reply Last reply
    0
    • U User 9987049

      problem solved

      D Offline
      D Offline
      DamithSL
      wrote on last edited by
      #2

      where you set @Name_Directo parameter value? and also in your MappingDB2OO method you need "Id" column but I can't see in your query a column name with "Id"

      U 1 Reply Last reply
      0
      • D DamithSL

        where you set @Name_Directo parameter value? and also in your MappingDB2OO method you need "Id" column but I can't see in your query a column name with "Id"

        U Offline
        U Offline
        User 9987049
        wrote on last edited by
        #3

        @Name_Director is to get the value of the textbox.

        But i think is impossible because a need construtor director. I don't know if you are understanding my problem. About mapping, is wrong ..but the problem isn't there.

        R 1 Reply Last reply
        0
        • U User 9987049

          @Name_Director is to get the value of the textbox.

          But i think is impossible because a need construtor director. I don't know if you are understanding my problem. About mapping, is wrong ..but the problem isn't there.

          R Offline
          R Offline
          roya irani
          wrote on last edited by
          #4

          using the following code you write.

          using Microsoft.SqlServer.Management.Smo;
          using Microsoft.SqlServer.Management.Common;
          using System.Data.SqlClient;

          DataTable dataset = new DataTable();

          dataset = Ds.DataTab("select M.*,P.Name,P.Id From Pay P Mem M where M.Id = " + Ds.TrueInt(Member.Text));

          dataset = Ds.DataTab("select * from Pay where Member =" + Ds.TrueInt(Member.Text + ""));

          dataset = Ds.DataTab(string.Format("select (Name+' ' + FName) as fullName from Mem where Id = '{0}'", Convert.ToInt32(Member.Text)));
          NameFName.Text = dataset.Rows[0].Field<string>("fullName");

          With this command you can use the SQL table at your disposal form (C #)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

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