Hi Carl,
I think you should post your article in this newsgroup:
microsoft.publi c.dotnet.framew ork.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" <Ca**@cb-cinc.com>
| Sender: "Carl" <Ca**@cb-cinc.com>
| References: <07************ *************** *@phx.gbl>
<bR************ **@cpmsftngxa06 .phx.gbl>
<0d************ *************** *@phx.gbl>
<0f************ *************** *@phx.gbl>
<oE************ **@cpmsftngxa06 .phx.gbl>
| Subject: RE: Array of obj
| Date: Wed, 27 Aug 2003 09:14:53 -0700
| Lines: 134
| Message-ID: <09************ *************** *@phx.gbl>
| 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/tjRSy8zlBKCXixm Q==
| Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| Path: cpmsftngxa06.ph x.gbl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1798 90
| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.Ser vices.Protocols .SoapException'
| occurred in system.web.serv ices.dll
|
| Additional information:
| System.Web.Serv ices.Protocols. SoapException: Server was
| unable to process request. --->
| System.Data.Sql Client.SqlExcep tion: Line 1: Incorrect
| syntax near 'client'.
| at System.Data.Sql Client.SqlComma nd.ExecuteReade r
| (CommandBehavio r cmdBehavior, RunBehavior runBehavior,
| Boolean returnStream)
| at System.Data.Sql Client.SqlComma nd.ExecuteReade r
| (CommandBehavio r behavior)
| at
| System.Data.Sql Client.SqlComma nd.System.Data. IDbCommand.Ex
| ecuteReader(Com mandBehavior behavior)
| at System.Data.Com mon.DbDataAdapt er.FillFromComm and
| (Object data, Int32 startRecord, Int32 maxRecords, String
| srcTable, IDbCommand command, CommandBehavior behavior)
| at System.Data.Com mon.DbDataAdapt er.Fill(DataSet
| dataSet, Int32 startRecord, Int32 maxRecords, String
| srcTable, IDbCommand command, CommandBehavior behavior)
| at System.Data.Com mon.DbDataAdapt er.Fill(DataSet
| dataSet, String srcTable)
| at WS_PME.DB.SqlGe nericDataSet(St ring sqlquery, String
| tablename, String ConfigConnectio nKey, String fonction,
| Object[,] aParameter) in f:\structure\pr ojets\vs2003
| \pme\ws_pme\com ponents\db_data set.cs:line 101
| at WS_PME.DB.GetFa cturesClientLis teDS(String clientID)
| in f:\structure\pr ojets\vs2003
| \pme\ws_pme\com ponents\db_data set.cs:line 125
| at WS_PME.WSPME.Fa cturesClientLis teDS(String client)
| in f:\structure\pr ojets\vs2003
| \pme\ws_pme\pme .asmx.cs:line 63
| --- End of inner exception stack trace ---
| ------------------------------------
|
| From the function SqlGenericDataS et, in line
| GenericDA.Fill( GenericDS, tablename);
| -------------------------------------
|
| public DataSet SqlGenericDataS et(string sqlquery,string
| tablename,strin g ConfigConnectio nKey, string fonction,
| Object[,] aParameter)
| {
| SqlConnection GenericConnecti on = new
| System.Data.Sql Client.SqlConne ction
| (ConfigurationS ettings.AppSett ings[ConfigConnectio nKey]);
| GenericConnecti on.Open();
| SqlCommand GenericCommand = new
| System.Data.Sql Client.SqlComma nd(sqlquery,
| GenericConnecti on);
|
| for (int a = 0;a<aParameter. GetLength(0);a+ +)
| {
| GenericCommand. Parameters.Add( (string)aParame ter.GetValue
| (a,0),(SqlDbTyp e)aParameter.Ge tValue(a,1),(in t)
| aParameter.GetV alue(a,2));
| GenericCommand. Parameters[(string)aParame ter.GetValue
| (a,0)].Value = (string)aParame ter.GetValue(a, 3);
| }
|
| GenericCommand. CommandTimeout = 30;
| SqlDataAdapter GenericDA = new SqlDataAdapter( );
| GenericDA.Selec tCommand = GenericCommand;
| DataSet GenericDS = new DataSet();
| GenericDA.Fill( GenericDS, tablename);
| GenericConnecti on.Close();
| return GenericDS;
| }
| -----------------------------------------------
|
| Here is the function calling SqlGenericDataS et.
| ------------------------------------------------
| public virtual DataSet GetFacturesClie ntListeDS
| (string clientID)
| {
| Object[,] parametre = new object
| [,] {{"client",SqlD bType.Char,60,c lientID}}; //use 2-
| dimension array
| string select = "SELECT distinct
| details.d_nfact ure,project.p_n ame FROM project,details
| where project.p_clien t = ? and project.p_refno =
| details.d_refno and !empty(details. d_nfacture) ORDER BY
| d_nfacture";
| DataSet myDS = SqlGenericDataS et
| (select,"client ","SQLPME","AUC UNE",parametre) ;
| return myDS;
| ------------------------------------------
|
| This error message occurs in the Reference.cs of the web
| service, at the following line,
| -------------------------------------------
| object[] results = this.Invoke
| ("FacturesClien tListeDS", new object[] {
| client});
| --------------------------------------------
| from the following function,
| --------------------------------------------
| [System.Web.Serv ices.Protocols. SoapDocumentMet hodAttribute
| ("http://tempuri.org/FacturesClientL isteDS",
| RequestNamespac e="http://tempuri.org/",
| ResponseNamespa ce="http://tempuri.org/",
| Use=System.Web. Services.Descri ption.SoapBindi ngUse.Literal
| ,
| ParameterStyle= System.Web.Serv ices.Protocols. SoapParameter
| Style.Wrapped)]
| public System.Data.Dat aSet FacturesClientL isteDS
| (string client) {
| object[] results = this.Invoke
| ("FacturesClien tListeDS", new object[] {
| client});
| return ((System.Data.D ataSet)(results[0]));
| }
| -------------------------------------------------------
|
| I can see that the variable client contains the good
| string value from the debugger.
|
|
| Again, thanks for your time....
|
| Carl,
|
|