Results 1 to 4 of 4

Thread: Connect to Microsoft SQL Server

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2003
    Location
    The Future - Skynet
    Posts
    1,157

    Connect to Microsoft SQL Server

    Can someone give me an example of how to simply connect to a database - insert, update, delete, select

    Thank You
    I'll Be Back!

    T-1000

    Microsoft .Net 2005
    Microsoft Visual Basic 6
    Prefer using API

  2. #2
    Hyperactive Member
    Join Date
    Mar 2004
    Location
    Prato - Tuscany - Italy
    Posts
    461
    I'm writing for a T1000, I suppose

    This is an example to open connection:

    Public CnnGIN As New ADODB.Connection


    StrConn = "Integrated Security=SSPI;Provider=Microsoft OLE DB Provider for SQL Server;Data Source=NBOOKALEX\GINMSDE;Initial Catalog=GinNetSQL;Workstation ID=NBOOKALEX"

    GIN.CnnGIN.Open(StrConn)


    Then I have to know if you think to use ADO and ADODB Recordset, or not. I use them and all my example and experience are based on that. If you plain to use ADO.NET, DATASET, DATAADAPTER, ecc....I'm the wrong person!
    Live long and prosper (Mr. Spock)

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2003
    Location
    The Future - Skynet
    Posts
    1,157

    T1000

    Thanks Alex, but I am just looking for the correct method to access the database in .Net.

    I know how to use ADO 2.6 but want to know about the sql adapter and ado.net.
    I'll Be Back!

    T-1000

    Microsoft .Net 2005
    Microsoft Visual Basic 6
    Prefer using API

  4. #4
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    There's great examples in MSDN - just search for what you want in your IDE.

Posting Permissions

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



Click Here to Expand Forum to Full Width