Ask a Question related to ASP.NET General, Design and Development.
-
jib #1
Webservices and OLE object
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.AppSett ings[ "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.Leng th
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
jib Guest
-
Dynamically loading user control into Placeholder gives Object reference not set to an instance of an object
I've created user controls that contain listboxes that are dynamically populated from the database. In the html view of the user control... -
Custom Control Problem :: Object reference not set to an instance of an object
Hi All! I have the following Custom Control file... '########### WebUserControl1.ascx ############# <%@ Control Language="vb"... -
[WebMethod] System.NullReferenceException: Object reference not set to an instance of an object.
Um, this isn't going to work, generally. Web services, as any web app (especially on Windows server 2003) are heavily sandboxed. The method you... -
Cannot serialize object of type System.Object[,]. Multidimensional arrays are not supported
Hi, I get this on server when trying to retun a 2 dim array. I apprecaite that they are not supported as per... -
HELP! Error Loading ASPX : Object Reference not set to an instance object
Hello, When i run my aspx i get this weird error: System.NullReferenceException: Object reference not set to an instance of an object. at...



Reply With Quote

