|
-
Nov 14th, 2002, 02:14 PM
#1
Thread Starter
Fanatic Member
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?
-
Nov 14th, 2002, 02:23 PM
#2
PowerPoster
See if this link helps you.
-
Nov 14th, 2002, 02:37 PM
#3
Thread Starter
Fanatic Member
Import command location?
Thanks for your reply.
Where do you place the following snipet of code in my program?
Imports System.Data.SqlClient
Thanks
-
Nov 14th, 2002, 02:46 PM
#4
Thread Starter
Fanatic Member
Nevermind, I got it. Thanks for your help.
-
Nov 14th, 2002, 02:49 PM
#5
PowerPoster
Not sure of the answer though, but you can take a look at http://aspnet.4guysfromrolla.com/ .
-
Nov 14th, 2002, 02:51 PM
#6
PowerPoster
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|