Ron

Ron

  • NA
  • 1
  • 0

ADODB

Jan 29 2008 1:08 PM

I'm really new to VB.Net, anyway I'm trying to read a SAS dataset into a recordset using ADO. I can get this to work using VB 6.0 but I'm not having any luck in .Net . Here is the code so far:

Private Sub btnRunJob_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRunJob.Click

Dim cnADOConnection As New ADODB.Connection

Dim rsRecs As New ADODB.Recordset

cnADOConnection.Provider = "SAS.LocalProvider.1"

cnADOConnection.Properties("Data source") = "C:\Documents and Settings\C18850\medlnamts"

cnADOConnection.Open()

rsRecs.Open("chk1", cnADOConnection, ADODB.OpenStatic, adLockReadOnly, ADODB.adCmdTableDirect)

End Sub

I know it has something to do with namespace. Just not sure how it all fits together properly, any help would be appreciated. Plus could somebody reccommend a good beginning reference book for VB.Net.

Thanks


Answers (1)