J
jib
Hi,
I am trying to send an Access database table containing a OLE field through
ASP.NET (web services) to a client (being a Word Macro). The table consists
of four columns with the first three being simple strings and the last one
my OLE object. The web service gets called by a Word macro - using the
debugger in Word, I can see the webservice returning with all info except
the fourth column. Whats going on?
Thanks for any info.
Jib
This is my c# web service:
[ WebMethod( Description = "Generates a specification type list" ) ]
public DataSet Get_Specifications()
{
string DbPath =
System.Configuration.ConfigurationSettings.AppSettings[ "pmsDb" ];
OleDbConnection DbConnection = new OleDbConnection(
"Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + DbPath );
OleDbDataAdapter DataAdapter = new OleDbDataAdapter( "SELECT * FROM
SpecTypes;", DbConnection );
DataSet Dset = new DataSet();
DataAdapter.Fill( Dset, "SpecTypes" );
return Dset;
}
This is my Word macro:
Sub Server_Get_Specifications()
Dim SoapClient, Results, i, ResultElements, ResultCount
Set SoapClient = CreateObject("MSSOAP.SoapClient30")
On Error Resume Next
SoapClient.mssoapinit (HttpServices$ + "SpecServices.asmx?WSDL")
If Err Then
MsgBox Err.Description
MsgBox "Faultstring =" + SoapClient.faultString
MsgBox "Faultactor =" + SoapClient.faultactor
MsgBox "Faultcode =" + SoapClient.faultcode
MsgBox "Detail =" + SoapClient.detail
End If
Set Results = SoapClient.Get_Specifications()
If Err Then
MsgBox Err.Description
MsgBox "Faultstring =" + SoapClient.faultString
MsgBox "Faultactor =" + SoapClient.faultactor
MsgBox "Faultcode =" + SoapClient.faultcode
MsgBox "Detail =" + SoapClient.detail
Else
For i = 0 To Results.Length - 1
If Results.Item(i).nodeName = "diffgr:diffgram" Then
NumberOfSpecs = Results.Item(i).childNodes.Item(0).childNodes.Length
ReDim Specifications__$(NumberOfSpecs)
ReDim SpecificationsTemplates$(NumberOfSpecs)
For j = 0 To NumberOfSpecs - 1
SpecNum =
Results.Item(i).childNodes.Item(0).childNodes.Item(j).childNodes.Item(0).nod
eTypedValue
Summary =
Results.Item(i).childNodes.Item(0).childNodes.Item(j).childNodes.Item(1).nod
eTypedValue
Descrip =
Results.Item(i).childNodes.Item(0).childNodes.Item(j).childNodes.Item(2).nod
eTypedValue
Specifications__$(j) = SpecNum + " " + Summary
SpecificationTemplates(j) =
Results.Item(i).childNodes.Item(0).childNodes.Item(j).childNodes.Item(3).nod
eTypedValue
Next
End If
Next
End If
End Sub
I am trying to send an Access database table containing a OLE field through
ASP.NET (web services) to a client (being a Word Macro). The table consists
of four columns with the first three being simple strings and the last one
my OLE object. The web service gets called by a Word macro - using the
debugger in Word, I can see the webservice returning with all info except
the fourth column. Whats going on?
Thanks for any info.
Jib
This is my c# web service:
[ WebMethod( Description = "Generates a specification type list" ) ]
public DataSet Get_Specifications()
{
string DbPath =
System.Configuration.ConfigurationSettings.AppSettings[ "pmsDb" ];
OleDbConnection DbConnection = new OleDbConnection(
"Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + DbPath );
OleDbDataAdapter DataAdapter = new OleDbDataAdapter( "SELECT * FROM
SpecTypes;", DbConnection );
DataSet Dset = new DataSet();
DataAdapter.Fill( Dset, "SpecTypes" );
return Dset;
}
This is my Word macro:
Sub Server_Get_Specifications()
Dim SoapClient, Results, i, ResultElements, ResultCount
Set SoapClient = CreateObject("MSSOAP.SoapClient30")
On Error Resume Next
SoapClient.mssoapinit (HttpServices$ + "SpecServices.asmx?WSDL")
If Err Then
MsgBox Err.Description
MsgBox "Faultstring =" + SoapClient.faultString
MsgBox "Faultactor =" + SoapClient.faultactor
MsgBox "Faultcode =" + SoapClient.faultcode
MsgBox "Detail =" + SoapClient.detail
End If
Set Results = SoapClient.Get_Specifications()
If Err Then
MsgBox Err.Description
MsgBox "Faultstring =" + SoapClient.faultString
MsgBox "Faultactor =" + SoapClient.faultactor
MsgBox "Faultcode =" + SoapClient.faultcode
MsgBox "Detail =" + SoapClient.detail
Else
For i = 0 To Results.Length - 1
If Results.Item(i).nodeName = "diffgr:diffgram" Then
NumberOfSpecs = Results.Item(i).childNodes.Item(0).childNodes.Length
ReDim Specifications__$(NumberOfSpecs)
ReDim SpecificationsTemplates$(NumberOfSpecs)
For j = 0 To NumberOfSpecs - 1
SpecNum =
Results.Item(i).childNodes.Item(0).childNodes.Item(j).childNodes.Item(0).nod
eTypedValue
Summary =
Results.Item(i).childNodes.Item(0).childNodes.Item(j).childNodes.Item(1).nod
eTypedValue
Descrip =
Results.Item(i).childNodes.Item(0).childNodes.Item(j).childNodes.Item(2).nod
eTypedValue
Specifications__$(j) = SpecNum + " " + Summary
SpecificationTemplates(j) =
Results.Item(i).childNodes.Item(0).childNodes.Item(j).childNodes.Item(3).nod
eTypedValue
Next
End If
Next
End If
End Sub