From: Daurer Wolfgang on
Hi,
I'm using CFront in my Visual Basic .net Application.
I'm accessing Navision on a Microsoft SQL 2000 Server
Dataaccess to normal Datafields work with no problem.

but I'm having Problems with the Calcfields. I tried almost every notation for the FieldNoArray and CalcFields Functions. I always get the same Exception:

Code:

===========================================================
System.Runtime.InteropServices.COMException (0x80020005): Typkonflikt.
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at CFRONTLib.CFRONTClass.FieldNoArray(Int32 hTable, Object& FieldNameArray)
at testCFRONT.Form1.Form1_Load(Object sender, EventArgs e) in D:\ProgrammierungVB\testCFRONT\testCFRONT\Form1.vb:line 78
===========================================================


what can be wrong?
please help

best Regards
Wolfgang Daurer


here is the Sample Code:
Code:


Dim cf As New CFRONTClass
cf.CFrontDllName = "cfrontsql"
cf.StopOnAllExceptions = False

cf.ConnectServerAndOpenDatabase("NDBCS", "testserver", "Named Pipes", "testdb", 0, False, False, "sa", "")
cf.OpenCompany("TestCompany")

Dim tableref As Integer
cf.OpenTable(tableref, cf.TableNo("Project"))
Dim hrec As Integer = cf.AllocRec(tableref)

If cf.FindRec(tableref, hrec, "-") Then
Do
'*** Project Number
Dim val As Object = cf.GetFieldData(tableref, hrec, 1)
Trace.Write(val.ToString + " ")

'*** Project Name
val = cf.GetFieldData(tableref, hrec, 2)
Trace.Write(val.ToString + " ")

'*** Customer Name from Calcfield
Dim FieldNameArray() As Object = {"Name"}
Dim array As Object = FieldNameArray


'*** the Following Line has the Error:
Dim SumFieldNoList As Object = cf.FieldNoArray(tableref, array)
cf.CalcFields(tableref, hrec, SumFieldNoList)

val = cf.GetFieldData(tableref, hrec, 58)
Trace.WriteLine("[" + val.ToString + "]")

Loop While cf.NextRec(tableref, hrec, 1) > 0

End If

cf.FreeRec(hrec)
cf.CloseTable(tableref)

cf.CloseCompany()
cf.CloseDatabase()
cf.DisconnectServer()


From: Lars-Bo Christensen [MSFT] on
What version of C/Front are you using?

Alternative try the .Net version of C/Front in 4.0 SP1, should be released about now?

Regards
Lars-Bo

--
This posting is provided "AS IS" with no warranties, and confers no rights.


"Daurer Wolfgang" <Wolfgang.Daurer(a)hereschwerke.ag> wrote in message news:e7M44c%23fFHA.572(a)TK2MSFTNGP15.phx.gbl...
Hi,
I'm using CFront in my Visual Basic .net Application.
I'm accessing Navision on a Microsoft SQL 2000 Server
Dataaccess to normal Datafields work with no problem.

but I'm having Problems with the Calcfields. I tried almost every notation for the FieldNoArray and CalcFields Functions. I always get the same Exception:

Code:

===========================================================
System.Runtime.InteropServices.COMException (0x80020005): Typkonflikt.
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at CFRONTLib.CFRONTClass.FieldNoArray(Int32 hTable, Object& FieldNameArray)
at testCFRONT.Form1.Form1_Load(Object sender, EventArgs e) in D:\ProgrammierungVB\testCFRONT\testCFRONT\Form1.vb:line 78
===========================================================


what can be wrong?
please help

best Regards
Wolfgang Daurer


here is the Sample Code:
Code:


Dim cf As New CFRONTClass
cf.CFrontDllName = "cfrontsql"
cf.StopOnAllExceptions = False

cf.ConnectServerAndOpenDatabase("NDBCS", "testserver", "Named Pipes", "testdb", 0, False, False, "sa", "")
cf.OpenCompany("TestCompany")

Dim tableref As Integer
cf.OpenTable(tableref, cf.TableNo("Project"))
Dim hrec As Integer = cf.AllocRec(tableref)

If cf.FindRec(tableref, hrec, "-") Then
Do
'*** Project Number
Dim val As Object = cf.GetFieldData(tableref, hrec, 1)
Trace.Write(val.ToString + " ")

'*** Project Name
val = cf.GetFieldData(tableref, hrec, 2)
Trace.Write(val.ToString + " ")

'*** Customer Name from Calcfield
Dim FieldNameArray() As Object = {"Name"}
Dim array As Object = FieldNameArray


'*** the Following Line has the Error:
Dim SumFieldNoList As Object = cf.FieldNoArray(tableref, array)
cf.CalcFields(tableref, hrec, SumFieldNoList)

val = cf.GetFieldData(tableref, hrec, 58)
Trace.WriteLine("[" + val.ToString + "]")

Loop While cf.NextRec(tableref, hrec, 1) > 0

End If

cf.FreeRec(hrec)
cf.CloseTable(tableref)

cf.CloseCompany()
cf.CloseDatabase()
cf.DisconnectServer()


From: Daurer Wolfgang on
Hi,
I´m Using C/Front 3.70.2.19516

where can I download the 4.0 SP1 Version?
I searched for this library, but could not find it anywhere.

best regards
Wolfgang Daurer


"Lars-Bo Christensen [MSFT]" <lbc(a)online.microsoft.com> schrieb im Newsbeitrag news:O$Up$4LgFHA.2548(a)TK2MSFTNGP10.phx.gbl...
What version of C/Front are you using?

Alternative try the .Net version of C/Front in 4.0 SP1, should be released about now?

Regards
Lars-Bo

--
This posting is provided "AS IS" with no warranties, and confers no rights.


"Daurer Wolfgang" <Wolfgang.Daurer(a)hereschwerke.ag> wrote in message news:e7M44c%23fFHA.572(a)TK2MSFTNGP15.phx.gbl...
Hi,
I'm using CFront in my Visual Basic .net Application.
I'm accessing Navision on a Microsoft SQL 2000 Server
Dataaccess to normal Datafields work with no problem.

but I'm having Problems with the Calcfields. I tried almost every notation for the FieldNoArray and CalcFields Functions. I always get the same Exception:

Code:

===========================================================
System.Runtime.InteropServices.COMException (0x80020005): Typkonflikt.
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at CFRONTLib.CFRONTClass.FieldNoArray(Int32 hTable, Object& FieldNameArray)
at testCFRONT.Form1.Form1_Load(Object sender, EventArgs e) in D:\ProgrammierungVB\testCFRONT\testCFRONT\Form1.vb:line 78
===========================================================


what can be wrong?
please help

best Regards
Wolfgang Daurer


here is the Sample Code:
Code:


Dim cf As New CFRONTClass
cf.CFrontDllName = "cfrontsql"
cf.StopOnAllExceptions = False

cf.ConnectServerAndOpenDatabase("NDBCS", "testserver", "Named Pipes", "testdb", 0, False, False, "sa", "")
cf.OpenCompany("TestCompany")

Dim tableref As Integer
cf.OpenTable(tableref, cf.TableNo("Project"))
Dim hrec As Integer = cf.AllocRec(tableref)

If cf.FindRec(tableref, hrec, "-") Then
Do
'*** Project Number
Dim val As Object = cf.GetFieldData(tableref, hrec, 1)
Trace.Write(val.ToString + " ")

'*** Project Name
val = cf.GetFieldData(tableref, hrec, 2)
Trace.Write(val.ToString + " ")

'*** Customer Name from Calcfield
Dim FieldNameArray() As Object = {"Name"}
Dim array As Object = FieldNameArray


'*** the Following Line has the Error:
Dim SumFieldNoList As Object = cf.FieldNoArray(tableref, array)
cf.CalcFields(tableref, hrec, SumFieldNoList)

val = cf.GetFieldData(tableref, hrec, 58)
Trace.WriteLine("[" + val.ToString + "]")

Loop While cf.NextRec(tableref, hrec, 1) > 0

End If

cf.FreeRec(hrec)
cf.CloseTable(tableref)

cf.CloseCompany()
cf.CloseDatabase()
cf.DisconnectServer()


From: Lars-Bo Christensen [MSFT] on
You need to ask your local MBS country office for download information and release date og Navision 4.0 SP1.

Regards
Lars-Bo Christensen

--
This posting is provided "AS IS" with no warranties, and confers no rights.


"Daurer Wolfgang" <Wolfgang.Daurer(a)hereschwerke.ag> wrote in message news:OfLjS%23rgFHA.1248(a)TK2MSFTNGP12.phx.gbl...
Hi,
I´m Using C/Front 3.70.2.19516

where can I download the 4.0 SP1 Version?
I searched for this library, but could not find it anywhere.

best regards
Wolfgang Daurer


"Lars-Bo Christensen [MSFT]" <lbc(a)online.microsoft.com> schrieb im Newsbeitrag news:O$Up$4LgFHA.2548(a)TK2MSFTNGP10.phx.gbl...
What version of C/Front are you using?

Alternative try the .Net version of C/Front in 4.0 SP1, should be released about now?

Regards
Lars-Bo

--
This posting is provided "AS IS" with no warranties, and confers no rights.


"Daurer Wolfgang" <Wolfgang.Daurer(a)hereschwerke.ag> wrote in message news:e7M44c%23fFHA.572(a)TK2MSFTNGP15.phx.gbl...
Hi,
I'm using CFront in my Visual Basic .net Application.
I'm accessing Navision on a Microsoft SQL 2000 Server
Dataaccess to normal Datafields work with no problem.

but I'm having Problems with the Calcfields. I tried almost every notation for the FieldNoArray and CalcFields Functions. I always get the same Exception:

Code:

===========================================================
System.Runtime.InteropServices.COMException (0x80020005): Typkonflikt.
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at CFRONTLib.CFRONTClass.FieldNoArray(Int32 hTable, Object& FieldNameArray)
at testCFRONT.Form1.Form1_Load(Object sender, EventArgs e) in D:\ProgrammierungVB\testCFRONT\testCFRONT\Form1.vb:line 78
===========================================================


what can be wrong?
please help

best Regards
Wolfgang Daurer


here is the Sample Code:
Code:


Dim cf As New CFRONTClass
cf.CFrontDllName = "cfrontsql"
cf.StopOnAllExceptions = False

cf.ConnectServerAndOpenDatabase("NDBCS", "testserver", "Named Pipes", "testdb", 0, False, False, "sa", "")
cf.OpenCompany("TestCompany")

Dim tableref As Integer
cf.OpenTable(tableref, cf.TableNo("Project"))
Dim hrec As Integer = cf.AllocRec(tableref)

If cf.FindRec(tableref, hrec, "-") Then
Do
'*** Project Number
Dim val As Object = cf.GetFieldData(tableref, hrec, 1)
Trace.Write(val.ToString + " ")

'*** Project Name
val = cf.GetFieldData(tableref, hrec, 2)
Trace.Write(val.ToString + " ")

'*** Customer Name from Calcfield
Dim FieldNameArray() As Object = {"Name"}
Dim array As Object = FieldNameArray


'*** the Following Line has the Error:
Dim SumFieldNoList As Object = cf.FieldNoArray(tableref, array)
cf.CalcFields(tableref, hrec, SumFieldNoList)

val = cf.GetFieldData(tableref, hrec, 58)
Trace.WriteLine("[" + val.ToString + "]")

Loop While cf.NextRec(tableref, hrec, 1) > 0

End If

cf.FreeRec(hrec)
cf.CloseTable(tableref)

cf.CloseCompany()
cf.CloseDatabase()
cf.DisconnectServer()


From: Daurer Wolfgang on
Hi,
they told me, that this library will be available in 3-4 month.
is there any other Way to solve this Problem?
I need a solution in the next 3 Weeks.
best regards
Wolfgang Daurer
"Lars-Bo Christensen [MSFT]" <lbc(a)online.microsoft.com> schrieb im Newsbeitrag news:Oy2UfTThFHA.576(a)tk2msftngp13.phx.gbl...
You need to ask your local MBS country office for download information and release date og Navision 4.0 SP1.

Regards
Lars-Bo Christensen

--
This posting is provided "AS IS" with no warranties, and confers no rights.


"Daurer Wolfgang" <Wolfgang.Daurer(a)hereschwerke.ag> wrote in message news:OfLjS%23rgFHA.1248(a)TK2MSFTNGP12.phx.gbl...
Hi,
I´m Using C/Front 3.70.2.19516

where can I download the 4.0 SP1 Version?
I searched for this library, but could not find it anywhere.

best regards
Wolfgang Daurer


"Lars-Bo Christensen [MSFT]" <lbc(a)online.microsoft.com> schrieb im Newsbeitrag news:O$Up$4LgFHA.2548(a)TK2MSFTNGP10.phx.gbl...
What version of C/Front are you using?

Alternative try the .Net version of C/Front in 4.0 SP1, should be released about now?

Regards
Lars-Bo

--
This posting is provided "AS IS" with no warranties, and confers no rights.


"Daurer Wolfgang" <Wolfgang.Daurer(a)hereschwerke.ag> wrote in message news:e7M44c%23fFHA.572(a)TK2MSFTNGP15.phx.gbl...
Hi,
I'm using CFront in my Visual Basic .net Application.
I'm accessing Navision on a Microsoft SQL 2000 Server
Dataaccess to normal Datafields work with no problem.

but I'm having Problems with the Calcfields. I tried almost every notation for the FieldNoArray and CalcFields Functions. I always get the same Exception:

Code:

===========================================================
System.Runtime.InteropServices.COMException (0x80020005): Typkonflikt.
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at CFRONTLib.CFRONTClass.FieldNoArray(Int32 hTable, Object& FieldNameArray)
at testCFRONT.Form1.Form1_Load(Object sender, EventArgs e) in D:\ProgrammierungVB\testCFRONT\testCFRONT\Form1.vb:line 78
===========================================================


what can be wrong?
please help

best Regards
Wolfgang Daurer


here is the Sample Code:
Code:


Dim cf As New CFRONTClass
cf.CFrontDllName = "cfrontsql"
cf.StopOnAllExceptions = False

cf.ConnectServerAndOpenDatabase("NDBCS", "testserver", "Named Pipes", "testdb", 0, False, False, "sa", "")
cf.OpenCompany("TestCompany")

Dim tableref As Integer
cf.OpenTable(tableref, cf.TableNo("Project"))
Dim hrec As Integer = cf.AllocRec(tableref)

If cf.FindRec(tableref, hrec, "-") Then
Do
'*** Project Number
Dim val As Object = cf.GetFieldData(tableref, hrec, 1)
Trace.Write(val.ToString + " ")

'*** Project Name
val = cf.GetFieldData(tableref, hrec, 2)
Trace.Write(val.ToString + " ")

'*** Customer Name from Calcfield
Dim FieldNameArray() As Object = {"Name"}
Dim array As Object = FieldNameArray


'*** the Following Line has the Error:
Dim SumFieldNoList As Object = cf.FieldNoArray(tableref, array)
cf.CalcFields(tableref, hrec, SumFieldNoList)

val = cf.GetFieldData(tableref, hrec, 58)
Trace.WriteLine("[" + val.ToString + "]")

Loop While cf.NextRec(tableref, hrec, 1) > 0

End If

cf.FreeRec(hrec)
cf.CloseTable(tableref)

cf.CloseCompany()
cf.CloseDatabase()
cf.DisconnectServer()