Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Interop.DAO.dll Help! testing today.

Status
Not open for further replies.

jcisco

Programmer
Sep 17, 2002
125
US
I'm having some Interop problems. I really need someone's help on this. i have a form with these ref's: Interop.DAO,
System,System.Data,System.Drawing,System.windows.forms,System.XML. All that's on this form is a button and when the button is clicked it opens up a fox pro database and gets the needed info. Now this works just fine on my development PC. no errors. But when i move it over to my win NT 4x machine it throws this err.
File or assmbley name Interop.DAO was not found.

Background: I have created a installer for this project and it did put that Interop.DAO dll in the project folder on the target machine. I'm trying to upgrade a old program from VB 6 to .NET and I learned about this Interop.DAO from that VB 6 upgrade wizard that changes everything to .NET. I used Interop.DAO dll from that project in this testing project. *****IF anything is confusing i will try and clean it up.


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try

' Loads the companies list information and stores it in the
' collection complist
Dim db As DAO.Database
Dim tbl As DAO.Recordset
Dim tmpServer As String
Dim tmpRemoteSite As Boolean
Dim DAODBEngine_definst As New DAO.DBEngine()


'Set db = OpenDatabase("\\serverc\c\datasys\", False, False, "FoxPro 2.5;")
db = DAODBEngine_definst.OpenDatabase("C:\Complist\", False, False, "FoxPro 2.5;")
tbl = db.OpenRecordset("COMPLIST", DAO.RecordsetTypeEnum.dbOpenSnapshot)
tbl.MoveLast()
tbl.MoveFirst()

Dim clsComplist As New CompanyList()

While Not tbl.EOF
If Trim(tbl.Fields(&quot;ID&quot;).Value & &quot;&quot;) <> &quot;&quot; Then
tmpServer = tbl.Fields(&quot;Server&quot;).Value & &quot;&quot;
tmpRemoteSite = CBool(tbl.Fields(&quot;RemoteSite&quot;).Value & &quot;&quot;)
If tmpServer = &quot;&quot; Then tmpServer = &quot;A&quot;
clsComplist.GetCompanies.Add(tbl.Fields(&quot;ID&quot;).Value, tbl.Fields(&quot;Billcode&quot;).Value & &quot;&quot;, tmpServer, CShort(tbl.Fields(&quot;RemoteType&quot;).Value & &quot;&quot;), tmpRemoteSite)
tmpServer = &quot;&quot;
End If
tbl.MoveNext()
End While
MsgBox(&quot;done&quot;)
Catch
MsgBox(Err.Number & &quot; &quot; & Err.Description)
End Try
End Sub

cheers.

--------------
:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top