Do you mean the parameter:
"@OS_System",SqlDbType.Char,250,"OS_System");
Does the same problem occur if changing the size from 250 to 200?
Also, does the same problem occur in other fields such as OS_ServicePack
parameter?
Sincerely,
Kevin
Microsoft Support
This posting is provided "AS IS" with no warranties, and confers no rights.
Get Secure! -
www.microsoft.com/security
--------------------
| Content-Class: urn:content-classes:message
| From: "Sandie" <
[email protected]>
| Sender: "Sandie" <
[email protected]>
| References: <
[email protected]>
<#
[email protected]>
<
[email protected]>
<uc67yY#
[email protected]>
| Subject: Re: Stored Procedure
| Date: Mon, 11 Aug 2003 04:55:23 -0700
| Lines: 186
| 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: AcNf/3IiCjDjcwrsQ6aziARL8CBetA==
| Newsgroups: microsoft.public.dotnet.framework.adonet
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.adonet:57984
| NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
| X-Tomcat-NG: microsoft.public.dotnet.framework.adonet
|
| The web server is in production and I cant take it down in
| less its a last resort.
|
| I did create a new stored procedure and the same thing
| happens.
|
| This isnt an asp.net application its a windows application
| that uses a web service.
|
| From the windows application the data is inserted through
| the web service with this code:
|
| [WebMethod]
| public string SaveDevice(string Ori,string Device, string
| os, string osVrs, string diskSpace,
| string cpu, string memory, string resolution, string ip,
| string ieVrs, string ieServicePck)
| {
| string theDeviceReturnValue = "";
| try
| {
| SqlConnection conn = new SqlConnection
| (System.Configuration.ConfigurationSettings.AppSettings
| ["connectionString"]);
|
| conn.Open();
| SqlCommand cmd = new SqlCommand();
| cmd.CommandText = "st_SaveDevice";
| cmd.CommandType = CommandType.StoredProcedure;
| cmd.Parameters.Add
| ("@Agency_Ori",SqlDbType.Char,10,"Agency_Ori");
| cmd.Parameters.Add
| ("@Device_ID",SqlDbType.Char,5,"Device_ID");
| cmd.Parameters.Add
| ("@OS_System",SqlDbType.Char,250,"OS_System");
| cmd.Parameters.Add
| ("@OS_ServicePack",SqlDbType.Char,75,"OS_ServicePack");
| cmd.Parameters.Add
| ("@FreeDiskSpace",SqlDbType.Char,5,"FreeDiskSpace");
| cmd.Parameters.Add("@Cpu_MHZ",SqlDbType.Char,10,"Cpu_MHZ");
| cmd.Parameters.Add
| ("@Main_Memory",SqlDbType.Char,10,"Main_Memory");
| cmd.Parameters.Add
| ("@ScreenResolution",SqlDbType.Char,10,"ScreenResolution");
| cmd.Parameters.Add
| ("@IPAddress",SqlDbType.Char,15,"IPAddress");
| cmd.Parameters.Add("@IE_Vrs",SqlDbType.Char,10,"IE_Vrs");
| cmd.Parameters.Add
| ("@IE_ServicePackVrs",SqlDbType.Char,10,"IE_ServicePackVrs"
| );
| cmd.Parameters["@Agency_Ori"].Value = Ori;
| cmd.Parameters["@Device_ID"].Value = Device;
| cmd.Parameters["@OS_System"].Value = os;
| cmd.Parameters["@OS_ServicePack"].Value = osVrs;
| cmd.Parameters["@FreeDiskSpace"].Value = diskSpace;
| cmd.Parameters["@Cpu_MHZ"].Value = cpu;
| cmd.Parameters["@Main_Memory"].Value = memory;
| cmd.Parameters["@ScreenResolution"].Value = resolution;
| cmd.Parameters["@IPAddress"].Value = ip;
| cmd.Parameters["@IE_Vrs"].Value = ieVrs;
| cmd.Parameters["@IE_ServicePackVrs"].Value = ieServicePck;
| cmd.Connection = conn;
| int num = cmd.ExecuteNonQuery();
| if(num != 0)
| theDeviceReturnValue = "Device Data Save Successful, Exit
| the Application" ;
| }
| catch(Exception e)
| {
| theDeviceReturnValue = e.Message;
| }
| return theDeviceReturnValue;
| }
|
|
| I'm posting here because I had a post in the sql group and
| we went through everything there and still no luck. Thanks
| >-----Original Message-----
| >1. Restart Web server after making modifications
| >
| >2. Create a new store procedure to test this problem.
| >
| >3. Add trace information in the .aspx file.
| >
| >4. How did you insert the data from the client side?
| >
| >
| >Sincerely,
| >
| >Kevin
| >Microsoft Support
| >
| >This posting is provided "AS IS" with no warranties, and
| confers no rights.
| >Get Secure! -
www.microsoft.com/security
| >
| >--------------------
| >| Content-Class: urn:content-classes:message
| >| From: "Sandie" <
[email protected]>
| >| Sender: "Sandie" <
[email protected]>
| >| References: <
[email protected]>
| ><#
[email protected]>
| >| Subject: Re: Stored Procedure
| >| Date: Thu, 7 Aug 2003 03:45:25 -0700
| >| Lines: 48
| >| 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: AcNc0QKXRvT7oG6sRAmzKTL6zWVq/w==
| >| Newsgroups: microsoft.public.dotnet.framework.adonet
| >| Path: cpmsftngxa06.phx.gbl
| >| Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.framework.adonet:57649
| >| NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
| >| X-Tomcat-NG: microsoft.public.dotnet.framework.adonet
| >|
| >| Im not sure where I would of done that at. If you
| talking
| >| about the wsdl no it isnt there either it has no max
| >| limit, the reference.cs we checked as well and its not
| >| there either.
| >|
| >| Can you tell me where I should look?
| >|
| >| >-----Original Message-----
| >| >How is your windows application declaring the
| parameter
| >| to the stored
| >| >procedure? Are you explicitly setting the size to 10?
| >| >
| >| >| >| >> I'm using a web service for a windows application
| and
| >| and
| >| >> in my webmethod I use a stored procedure to do the
| >| insert
| >| >> to a certain table. The field was set at char(10)
| which
| >| >> was to small for all the data I am collecting in the
| >| >> windows application the field collects the OS system
| >| from
| >| >> the clients computer so it reads in the application
| >| >> as "Microsoft Windows XP Professional 5.1.2600" but
| >| >> inserts as "Microsoft" I changed the field size both
| in
| >| >> the db and in the stored procedure and it doesnt
| matter
| >| it
| >| >> still doesnt work, if I do it from the web service
| page
| >| >> and invoke it from there it works just fine. It also
| >| >> works from a free standing web page, and I can run
| it
| >| from
| >| >> the query analyzer and it works there to, but when I
| run
| >| >> the profiler on it it only takes the first 10
| characters
| >| >> which would be the word Microsoft and a spave. I
| have
| >| >> recompiled the code lots of times and it doesnt seem
| to
| >| >> make a difference, if I run it will I run ethereal
| on
| >| the
| >| >> server it appears all the correct data is passing.
| So I
| >| >> am not really sure where it is losing it.
| >| >>
| >| >> Any ideas would be great because we are stumped!.
| >| >>
| >| >> Thanks in advance for your help!
| >| >>
| >| >
| >| >
| >| >.
| >| >
| >|
| >
| >.
| >
|