I'm having problems with assignfield in vb.net (Connection is fine). On every field a get the following error..
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
Additional information: Type mismatch.
Dim conn As New CFRONTLib.CFRONTClass
Dim intrec, inttable As Integer
conn.ConnectServerAndOpenDatabase("NDBCS", "ServerName", "NAMED PIPES", "Database", 0, False, False, "sa", "")
conn.OpenCompany("CompanyName")
conn.OpenTable(inttable, 210)
intrec = conn.AllocRec(inttable)
conn.BWT()
conn.InitRec(inttable, intrec)
conn.AssignField(inttable, intrec, 1, "JOB")
conn.AssignField(inttable, intrec, 3, "300")
conn.AssignField(inttable, intrec, 6, "Resource")
conn.AssignField(inttable, intrec, 8, "894")
conn.AssignField(inttable, intrec, 9, "Test Entry")
conn.AssignField(inttable, intrec, 10, 7.5)
conn.AssignField(inttable, intrec, 73, "DEFAULT")
conn.AssignField(inttable, intrec, 33, 203)
conn.InsertRec(inttable, intrec)
conn.EWT()
conn.FreeRec(intrec)
conn.CloseTable(inttable)
conn.CloseCompany()
conn.CloseDatabase()
conn.BWT()
0
Comments
See especially here:
http://www.mibuso.com/forum/viewtopic.php?t=1491
and here:
http://www.mibuso.com/forum/viewtopic.php?t=1785