Hi Carl,
I think you should post your article in this newsgroup:
microsoft.public.dotnet.framework.aspnet
In there, our engineer will help you indeep.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
| Content-Class: urn:content-classes:message
| From: "Carl" <
[email protected]>
| Sender: "Carl" <
[email protected]>
| References: <
[email protected]>
<
[email protected]>
<
[email protected]>
<
[email protected]>
<
[email protected]>
| Subject: RE: Array of obj
| Date: Wed, 27 Aug 2003 09:14:53 -0700
| Lines: 134
| Message-ID: <
[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcNstlk5Cc/ZX/tjRSy8zlBKCXixmQ==
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:179890
| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hi Jeffrey,
|
| Thanks for the answers I get a little further, I also
| notice another mistake from my part, the OleDbType should
| also be SqlDbType for SQL.
|
| Right now I do have the following errors reported,
|
| -------------------------------
| An unhandled exception of
| type 'System.Web.Services.Protocols.SoapException'
| occurred in system.web.services.dll
|
| Additional information:
| System.Web.Services.Protocols.SoapException: Server was
| unable to process request. --->
| System.Data.SqlClient.SqlException: Line 1: Incorrect
| syntax near 'client'.
| at System.Data.SqlClient.SqlCommand.ExecuteReader
| (CommandBehavior cmdBehavior, RunBehavior runBehavior,
| Boolean returnStream)
| at System.Data.SqlClient.SqlCommand.ExecuteReader
| (CommandBehavior behavior)
| at
| System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.Ex
| ecuteReader(CommandBehavior behavior)
| at System.Data.Common.DbDataAdapter.FillFromCommand
| (Object data, Int32 startRecord, Int32 maxRecords, String
| srcTable, IDbCommand command, CommandBehavior behavior)
| at System.Data.Common.DbDataAdapter.Fill(DataSet
| dataSet, Int32 startRecord, Int32 maxRecords, String
| srcTable, IDbCommand command, CommandBehavior behavior)
| at System.Data.Common.DbDataAdapter.Fill(DataSet
| dataSet, String srcTable)
| at WS_PME.DB.SqlGenericDataSet(String sqlquery, String
| tablename, String ConfigConnectionKey, String fonction,
| Object[,] aParameter) in f:\structure\projets\vs2003
| \pme\ws_pme\components\db_dataset.cs:line 101
| at WS_PME.DB.GetFacturesClientListeDS(String clientID)
| in f:\structure\projets\vs2003
| \pme\ws_pme\components\db_dataset.cs:line 125
| at WS_PME.WSPME.FacturesClientListeDS(String client)
| in f:\structure\projets\vs2003
| \pme\ws_pme\pme.asmx.cs:line 63
| --- End of inner exception stack trace ---
| ------------------------------------
|
| From the function SqlGenericDataSet, in line
| GenericDA.Fill(GenericDS, tablename);
| -------------------------------------
|
| public DataSet SqlGenericDataSet(string sqlquery,string
| tablename,string ConfigConnectionKey, string fonction,
| Object[,] aParameter)
| {
| SqlConnection GenericConnection = new
| System.Data.SqlClient.SqlConnection
| (ConfigurationSettings.AppSettings[ConfigConnectionKey]);
| GenericConnection.Open();
| SqlCommand GenericCommand = new
| System.Data.SqlClient.SqlCommand(sqlquery,
| GenericConnection);
|
| for (int a = 0;a<aParameter.GetLength(0);a++)
| {
| GenericCommand.Parameters.Add((string)aParameter.GetValue
| (a,0),(SqlDbType)aParameter.GetValue(a,1),(int)
| aParameter.GetValue(a,2));
| GenericCommand.Parameters[(string)aParameter.GetValue
| (a,0)].Value = (string)aParameter.GetValue(a,3);
| }
|
| GenericCommand.CommandTimeout = 30;
| SqlDataAdapter GenericDA = new SqlDataAdapter();
| GenericDA.SelectCommand = GenericCommand;
| DataSet GenericDS = new DataSet();
| GenericDA.Fill(GenericDS, tablename);
| GenericConnection.Close();
| return GenericDS;
| }
| -----------------------------------------------
|
| Here is the function calling SqlGenericDataSet.
| ------------------------------------------------
| public virtual DataSet GetFacturesClientListeDS
| (string clientID)
| {
| Object[,] parametre = new object
| [,] {{"client",SqlDbType.Char,60,clientID}}; //use 2-
| dimension array
| string select = "SELECT distinct
| details.d_nfacture,project.p_name FROM project,details
| where project.p_client = ? and project.p_refno =
| details.d_refno and !empty(details.d_nfacture) ORDER BY
| d_nfacture";
| DataSet myDS = SqlGenericDataSet
| (select,"client","SQLPME","AUCUNE",parametre);
| return myDS;
| ------------------------------------------
|
| This error message occurs in the Reference.cs of the web
| service, at the following line,
| -------------------------------------------
| object[] results = this.Invoke
| ("FacturesClientListeDS", new object[] {
| client});
| --------------------------------------------
| from the following function,
| --------------------------------------------
| [System.Web.Services.Protocols.SoapDocumentMethodAttribute
| ("
http://tempuri.org/FacturesClientListeDS",
| RequestNamespace="
http://tempuri.org/",
| ResponseNamespace="
http://tempuri.org/",
| Use=System.Web.Services.Description.SoapBindingUse.Literal
| ,
| ParameterStyle=System.Web.Services.Protocols.SoapParameter
| Style.Wrapped)]
| public System.Data.DataSet FacturesClientListeDS
| (string client) {
| object[] results = this.Invoke
| ("FacturesClientListeDS", new object[] {
| client});
| return ((System.Data.DataSet)(results[0]));
| }
| -------------------------------------------------------
|
| I can see that the variable client contains the good
| string value from the debugger.
|
|
| Again, thanks for your time....
|
| Carl,
|
|