i am using vb.net to retrieve data from .mdb and display it into drop down list when startup the form. but now i have a problem to display the data.
hope someone to advice.
My Coding is shown as below.
Dim strConnection As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\eLeave.mdb"
Dim cn As OleDbConnection = New OleDbConnection(strConnection)
Dim strGetData As String
Dim str As Object
strGetData = "SELECT Name " & _
" FROM tblStaffÅ & _
" WHERE Designation = 'Manager'"
Dim strCommandRead As New OleDbCommand(strGetData, cn)
cn.Open()
str = strCommandRead.ExecuteReader()
thisXDocument.DOM.selectSingleNode("//myFields:field1").text = str
cn.Close()
Error message
The _Startup or _shutdown method in this form's code contains one or more calls to members of the microsoft.office.interop.infopath.semitrust namespace. calls to this namespace from these methods are not allowed.