Results 1 to 2 of 2

Thread: SqlConnection Class

  1. #1
    WilsonMartin is offline Senior Member
    Join Date
    Dec 2009
    Posts
    319
    Rep Power
    3

    Default SqlConnection Class

    Use of SqlConnection Class

    I would like to know about the 'SqlConnection' class. Why we use “SqlConnection class"? I think it may be related to the SQL database connection, but I am not sure on this. please give me some details about "SqlConnection class".

  2. #2
    AndersonDiaz is offline Senior Member
    Join Date
    Dec 2009
    Posts
    311
    Rep Power
    3

    Default

    The SqlConnection class gives all the properties and methods requisite to make a connection to a SQL database.

    Properties and Methods of the SqlConnection Class

    Item Description Properties

    • ConnectionString: Contains the database connection string

    • ConnectionTimeout :Contains the timeout for the connection in seconds

    • Database: Contains the name of the database to connect to

    • DataSource: Contains the name of the connected server

    • PacketSize: Contains the size of packets used to communicate with the server

    • ServerVersion: Contains the version of SQL that the server is running State Contains
    the state of the connection

    • WorkstationId :Contains the NetBIOS identifier of the machine hosting the Web form Methods

    • BeginTransaction(): Places the connection into a transaction and returns the newly
    created SqlTransaction object

    • ChangeDatabase(): Enables the developer to change to a different database programmatically

    • Close(): Closes the connection to the current database

    • CreateCommand(): Returns a new command object

    • Open():Opens the connection to the database
    Last edited by nitesh14; 02-06-2010 at 04:06 PM.

Similar Threads

  1. Object Vs class
    By CollinsBrown in forum Programming
    Replies: 2
    Last Post: 06-24-2010, 10:58 AM
  2. TextComponent class in java
    By AllenBrown in forum Programming
    Replies: 2
    Last Post: 03-08-2010, 01:59 PM
  3. Use of Graphics class
    By Isaac Johnson in forum Programming
    Replies: 2
    Last Post: 02-26-2010, 10:36 AM
  4. What is the use of pack class?
    By BrooksGray in forum Programming
    Replies: 2
    Last Post: 02-22-2010, 03:50 PM
  5. JSlider class
    By Brownchris in forum Programming
    Replies: 2
    Last Post: 02-17-2010, 01:13 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48