Hi
The following is my oledb version of catalog.
vb for chapter 3. when i use vbc to compile it. the box shows all "oledbXXXXXXs" and "commandbehavior" is not declared.
The command line i type in is like this:
>"c\windows\microsoft.net\framework\v1.1.4322\vbc. exe" /t:library catalog.
vb /r:system.web.dll /r:system.dll
Maybe i should reference more assembly?
Any help will be great apperciated
<code>
Imports System
imports system.data.oledb
imports system.configuration
Namespace MyNS
Public Class catalog
Public Function GetDepartmets() as OLEDBReader
Dim NewStrConn as new OLEDBConnection(connectionstring)
Dim cmd as new OLEDBCommand("getdepartmets",newstrconn)
cmd.commandtype=commandtype.storedprocedure
NewStrConn.open()
return cmd.executereader(CommandBehavior.closeconnection)
end Function
Private Readonly Property connectionstring () as string
Get
retrun ConfigurationSettings.AppSettings("connectionStrin g")
End Get
End Property
End Class
End Namespace
</code>