Results 1 to 6 of 6

Thread: Connectionless strings in .Net

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612

    Connectionless strings in .Net

    In VB6 when I wanted to connect to my SQL server tables, this is what I did.

    Dim cn As New ADODB.Connection

    cn.ConnectionString = "provider=sqloledb.1;" _
    & "persist security info=false;" _
    & "UID=;PWD=;" _
    & "initial catalog=;" _
    & "data source=111.111.1.111"
    cn.Open

    Dim rs As New ADODB.Recordset

    rs.CursorLocation = adUseClient
    rs.CursorType = adOpenDynamic
    rs.ActiveConnection = cn
    rs.LockType = adLockOptimistic

    How do I do this same thing in .Net?

    Do I have to drop the tabels onto my form using the Server Explorer first?

    Do I have to have a dataset on my form before I can get data?
    David Wilhelm

  2. #2
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    See if this link helps you.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612

    Import command location?

    Thanks for your reply.

    Where do you place the following snipet of code in my program?

    Imports System.Data.SqlClient

    Thanks
    David Wilhelm

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612
    Nevermind, I got it. Thanks for your help.
    David Wilhelm

  5. #5
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    Not sure of the answer though, but you can take a look at http://aspnet.4guysfromrolla.com/ .

  6. #6
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    Oops. Didn't saw that you had already found an answer.

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