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
Karan14 pointsPosted Jan 29, 2008, 9:25 AM EST
hi ron
u should import namespaces
imports System.Data
imports System.Data.SqlClient
and choose new dataset from choose item through solution explorer
and best book is of WROX publication. u must readt it