L
L.Peter
Dear Group,
I have the following code for vb.net
***
Dim objFaxServer As New FAXCOMEXLib.FaxServer
Dim collFaxIncomingJobs As FaxIncomingJobs
Dim objFaxIncomingJob As FaxIncomingJob
'Error handling
On Error GoTo Error_Handler
'Connect to the fax server
objFaxServer.Connect("")
'Get the collection of jobs in the incoming queue
collFaxIncomingJobs = objFaxServer.Folders.IncomingQueue.GetJobs()
'Display the number of jobs in the collection
MsgBox("There are " & collFaxIncomingJobs.Count & " jobs in the incoming
queue.")
Dim n As Long
'Get the job
n = InputBox("Input the item number for which you want information.")
objFaxIncomingJob = collFaxIncomingJobs.Item(n)
Exit Sub
Error_Handler:
'Implement error handling at the end of your subroutine. This implementation
is for demonstration purposes
MsgBox("Error number: " & Hex(Err.Number) & ", " & Err.Description)
***
here is what I come up with in CSharp
FAXCOMEXLib.FaxServer objFaxServer = new FAXCOMEXLib.FaxServer();
FaxIncomingJobs colIJs = objFaxServer.Folders.IncomingQueue.GetJobs();
objFaxServer.Connect("");
for (int i=1;i< colIJs.Count ; i++)
{
//csharp won't compile this line saying no definition for Item
FaxIncomingJob oIJ = colIJs.Item(i);
//do some process
}
What I want to do is loop through Jobs and record them to the database, it
seems like my conversion is not correct
Please help
TIA
L.Peter
I have the following code for vb.net
***
Dim objFaxServer As New FAXCOMEXLib.FaxServer
Dim collFaxIncomingJobs As FaxIncomingJobs
Dim objFaxIncomingJob As FaxIncomingJob
'Error handling
On Error GoTo Error_Handler
'Connect to the fax server
objFaxServer.Connect("")
'Get the collection of jobs in the incoming queue
collFaxIncomingJobs = objFaxServer.Folders.IncomingQueue.GetJobs()
'Display the number of jobs in the collection
MsgBox("There are " & collFaxIncomingJobs.Count & " jobs in the incoming
queue.")
Dim n As Long
'Get the job
n = InputBox("Input the item number for which you want information.")
objFaxIncomingJob = collFaxIncomingJobs.Item(n)
Exit Sub
Error_Handler:
'Implement error handling at the end of your subroutine. This implementation
is for demonstration purposes
MsgBox("Error number: " & Hex(Err.Number) & ", " & Err.Description)
***
here is what I come up with in CSharp
FAXCOMEXLib.FaxServer objFaxServer = new FAXCOMEXLib.FaxServer();
FaxIncomingJobs colIJs = objFaxServer.Folders.IncomingQueue.GetJobs();
objFaxServer.Connect("");
for (int i=1;i< colIJs.Count ; i++)
{
//csharp won't compile this line saying no definition for Item
FaxIncomingJob oIJ = colIJs.Item(i);
//do some process
}
What I want to do is loop through Jobs and record them to the database, it
seems like my conversion is not correct
Please help
TIA
L.Peter