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("ID"
.Value & ""
<> "" Then
tmpServer = tbl.Fields("Server"
.Value & ""
tmpRemoteSite = CBool(tbl.Fields("RemoteSite"
.Value & ""
If tmpServer = "" Then tmpServer = "A"
clsComplist.GetCompanies.Add(tbl.Fields("ID"
.Value, tbl.Fields("Billcode"
.Value & "", tmpServer, CShort(tbl.Fields("RemoteType"
.Value & ""
, tmpRemoteSite)
tmpServer = ""
End If
tbl.MoveNext()
End While
MsgBox("done"
Catch
MsgBox(Err.Number & " " & Err.Description)
End Try
End Sub
cheers.
--------------

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("ID"
tmpServer = tbl.Fields("Server"
tmpRemoteSite = CBool(tbl.Fields("RemoteSite"
If tmpServer = "" Then tmpServer = "A"
clsComplist.GetCompanies.Add(tbl.Fields("ID"
tmpServer = ""
End If
tbl.MoveNext()
End While
MsgBox("done"
Catch
MsgBox(Err.Number & " " & Err.Description)
End Try
End Sub
cheers.
--------------