RE: Newly getting started in C#

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?UGFua2Fq?=

    RE: Newly getting started in C#

    Please go to http://www.a2zdotnet.com/Default.aspx
    for step by step tutorials for beginers in ADO.Net sections.

    --
    regards,
    Pankaj
    最近2019好看的中文字幕_在线天堂中文WWW官网_制服丝袜日韩中文字幕在线_色综合久久中文综合网_中文字幕无码无码专区_亚洲中文字幕无码永久在线_中文字幕你懂的



    "George" wrote:
    hi all,
    >
    I am trying to make the jump from VB6 to C#. While I do have a couple of
    books, the best way I can learn something is to write something I know. So
    please forgive me in advance if this question sounds a bit off in the C#
    terminology.
    >
    I am taking a simple thing like opening a MS Access database and filling a
    listbox with names from 1 of the tables in the database.
    >
    I am using Visual Studio 2005 and I created a new project with 1 mdi form.
    >
    In VB I would create the connection to the database and connect to it in the
    startup module (sub main). Then when needed in the program I would pass the
    sql statement to a public subroutine to open the recordset, retrieve the
    records and close the recordset.
    >
    While I believe I have the correct coding to connect to the database, open a
    table, retrieve the needed field/column and then close the table for C#, I
    cannot figure out where the best places are for the routines to go. Would I
    put the connection routine in the program.cs module? I see that this has
    been created in the program.cs module:
    static void Main()
    {
    Application.Ena bleVisualStyles ();
    Application.Set CompatibleTextR enderingDefault (false);
    Application.Run (new MDIMain());
    }
    >
    so I was guessing that I could do a:
    static void Main()
    {
    Application.Ena bleVisualStyles ();
    Application.Set CompatibleTextR enderingDefault (false);
    Application.Run (new MDIMain());
    ConnectToDataba se():
    }
    >
    for my initial connection and have the routine ConnectToDataba se() in the
    program.cs module.
    >
    The next question would be where do I put a "ExtractRecords " routine so that
    all of the forms in the program could access the routine and extract from the
    database? Would that go in the program.cs module as well?
    >
    Thank you for your support,
    >
    George
Working...