+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17

Thread: cegonsoft private limited | Sub Procedures in VB .NET

  1. #1

    Default cegonsoft private limited | Sub Procedures in VB .NET

    Sub Procedure

    A sub procedure is a method that does not return any values. A sub procedure in VB.Net is defined using the Sub keyword. A sub procedure may or may not accept parameters. A method that does not take any parameters is called a parameterless method. For example, the following is a parameterless sub procedure

    Sub ShowCurrentTime()
    Console.WriteLine("The current time is: " & DateTime.Now)
    End Sub

    The above sub procedure takes no parameters and returns nothing. It does nothing more than print the Current Date and Time on console using the DateTime Class from the System namespace.
    A sub procedure may accept parameters as in the following example

    Sub ShowName(ByVal myName As String)
    Console.WriteLine("My name is: " & myName)
    End Sub

    Above, the ShowName() sub procedure takes a String parameter 'myName' and prints this string using the Console.WriteLine() method. The keyword 'ByVal' with the myName parameter represents that the String myName will be passed to the method by value (i.e.,by making a copy of the original string).

    Visit: Cegonsoft

  2. #2

    Default

    Build VB.NET stored procedure calls
    auto-magically
    Before we get started, let's define what our utility will do:

    Create a wizard to generate a database connection string
    Pull in all stored procedures from our database
    Generate VB.NET code to call our stored procedure

    Step 1 - Building the connection string wizard
    Dim MSDAC As New MSDASC.DataLinks()
    Dim adoconn As New ADODB.Connection()
    Try
    adoconn = MSDAC.PromptNew()
    If Not adoconn Is Nothing Then txtDBConn.Text = adoconn.ConnectionString
    Finally
    'this is COM, make sure you clean up your mess.
    Adoconn = nothing
    MSDAC = Nothing
    End Try
    Step 2 - Getting a list of Stored Procedures
    Dim cn As New OleDbConnection()

    cn.ConnectionString = txtDBConn.Text
    cn.Open()

    'This should be wrapped in a Try..Catch block, removed to simply example
    Dim tb As DataTable
    tb = cn.GetOleDbSchemaTable(OleDbSchemaGuid.Procedures, Nothing)
    cbStoredProcedures.DisplayMember = "PROCEDURE_NAME"
    cbStoredProcedures.DataSource = tb
    cn.Close()

    Step 3- Building our store procedure VB.NET code
    Dim cn As New OleDbConnection()
    Dim SPClean As String
    Dim drv As DataRowView

    cn.ConnectionString = txtDBConn.Text
    cn.Open()
    drv = cbStoredProcedures.SelectedItem

    SPClean = drv.Row("PROCEDURE_NAME")

    Dim tb As DataTable

    tb = cn.GetOleDbSchemaTable(OleDbSchemaGuid.Procedure_P arameters, _
    New Object() {Nothing, Nothing, SPClean, Nothing})
    cegonsoft is the best center to learn all new concepts

  3. #3

    Default

    Virtual and abstract

    ABSTACT classes or methods are the one which is declared as template but there is no implementation. As such it will not work.
    Suppose In the cases, when you create some class as template. But there is no real implementation in that. You want the user who uses this class to write the implementation. In such cases declare the functions as ABSTRACT.

    public abstract class BoxObject {
    /* declare fields */
    /* declare non-abstract methods */
    abstract void paint();
    }

    VIRTUAL classes or methods are the one which is declared with default implementation. If the user of the class who derives this want to add some implementation, he can add it.

    using System;
    namespace Virtual_Sample
    {
    class Base
    {
    public virtual void Printval(){Console.WriteLine("Base Value");}
    }
    class Derived : Base
    {
    public virtual void Printval(){Console.WriteLine("Derived");}
    }
    class Test
    {
    static void Main(string[] args)
    {
    Base b;
    Derived d;
    b = new Base();
    d = new Derived();
    b.Printval(); // output --> “Base Value”
    d.Printval(); // output --> "Derived"
    b = new Derived();
    b.Printval(); // output --> "Derived"
    }
    }
    }


    Cegonsoft

  4. #4

    Default

    Software testing is for the checkin the detect faults.
    Through the software testing establish confidence in software and evaluate properties of software
    Reliability
    Performance
    Memory Usage
    Security
    Usability

    So the software testing is the very important one work in the project development.
    Through which only we provide the very good quality product to clients and satisfies the client needs.

    In cegonsoft they provide very good training for the software testing.They provide the training in all the advance tools.
    So which the students get the good opportunity in the industry to get placement.

    Cegonsoft

  5. #5

    Default

    ThreadPool type in the VB.NET programming language.

    Using ThreadPool, you can create many threads and the ThreadPool will manage when they run for optimum performance, accounting for multiple cores and processors. As shown in this article, the ThreadPool is useful for when you have a lot of processing to accomplish.

    QueueUserWorkItem example

    First, this example demonstrates the QueueUserWorkItem subroutine on the ThreadPool type. The QueueUserWorkItem method receives two parameters: a WaitCallback instance, which is assigned to a subroutine address, and an argument of type Object. Please use the AddressOf operator and specify the method name as the first argument. You can pass anything as the second argument: it will be casted to an Object, which you can then recast in the specified method.

    Program that uses ThreadPool.QueueUserWorkItem

    Imports System.Threading

    Module Module1
    Sub Main()
    ' Use this argument to the thread.
    Dim t As String = "test"
    ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf Process), t)
    ' Wait a while.
    Thread.Sleep(50)
    End Sub

    Sub Process(ByVal arg As Object)
    ' Cast the argument and display its length.
    Dim t As String = arg
    Console.WriteLine(t.Length)
    End Sub
    End Module

    cegonsoft

  6. #6
    Emerald Star member madhusundar is on a distinguished road
    Join Date
    Sep 2011
    Posts
    104

    Default .NET Training in CEGONSOFT

    The .NET framework created by Microsoft is a software development platform that focuses on
    rapid application development, platform independence and network transparency.

    .NET is Microsoft's strategic initiative for server and desktop development for the next decade.
    According to Microsoft, .NET includes many technologies that are designed to facilitate rapid development of Internet and Intranet applications.

    .NET-connected solutions aim to enable businesses integrate their systems more rapidly and in a more agile manner and help them realize the promise of information anytime, anywhere, on any device.



    ASP.NET is a server side scripting technology that enables scripts (embedded in web pages) to be executed by an Internet server.

    ASP.NET is a Microsoft Technology
    ASP stands for Active Server Pages
    ASP.NET is a program that runs inside IIS
    IIS (Internet Information Services) is Microsoft's Internet server
    IIS comes as a free component with Windows servers
    IIS is also a part of Windows 2000 and XP Professional


    The .NET Framework is the infrastructure for the Microsoft .NET platform.

    The .NET Framework is an environment for building, deploying, and running Web applications and Web Services.


    Cegonsoft
    Last edited by madhusundar; 10-01-2011 at 10:31 AM.

  7. #7

    Default

    Hi,
    There are countless capabilities in the new Visual Studio .NET, but how do we even begin to understand the impact they will have on our windows and web applications is a huge challenge.

    Cegonsoft is the best IT training center providing training on lots of technologies.Dot Net is one of them. They are providing training as per industry standards and requirements.They also place their students in reputed companies and multinationals right after completion of course.

    Cegonsoft

  8. #8

    Default

    It's a useful console program..
    Cegonsoft

  9. #9

    Default

    Sub procedures: They are blocks of useful code that can contain code intended to point to make programming easier. Unlike functions, sub procedures and do not return values, but these features, you can pass values ​​in Sub procedures in the argument list.

    You declare Sub procedures with the Sub statement:

    [ <attrlist> ] [{ Overloads | Overrides | Overridable | NotOverridable |
    MustOverride | Shadows | Shared }]
    [{ Public | Protected | Friend | Protected Friend | Private }]
    Sub name [(arglist)]
    [ statements ]
    [ Exit Sub ]
    [ statements ]
    End Sub



    cegonsoft
    Last edited by mithunshalom; 10-04-2011 at 09:33 AM.

  10. #10

    Default

    DateTimePicker can really make time.

    Just change the Format property for the time and ShowUpDown True.

    In both cases, the supplier or the code
    dateTimePicker1.Format = Time
    dateTimePicker1.ShowUpDown = True

    cegonsoft

+ Reply to Thread
Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts