Showing posts with label net. Show all posts
Showing posts with label net. Show all posts

Thursday, March 29, 2012

about accessing SQL Server2005 database file from a remote computer

hi every one. i am a new user of asp.net 2.0 using C# code and i am facing a problem in accessing a SQL Server2005 database file in the remote computer. i have connected two pc with peer to peer connection and trying to add a databse using the "Add connection" option from the visual studio 2005. in the add connection dialog box it is showing me the remote server and it was supposed to show all the database in that SQL Server when i select one. but when i am choosing the server name it was not showing me anything. by the way i have configuered the surface area for "both TCP/IP and named pipes" and both the pc's server browser is turned on. is it the right way to access a database file from a remote pc or not?? please send me a good solution to do this things and try to explain the codes with example. waiting for response...plz send me the solution.. as soon as possible

Hi,

Try the following KB article, it may be helpful to you.

http://support.microsoft.com/kb/316649

Thanks.

|||

Hi,

SQL Server 2005 is not allowing remote connections by default. You have to configure the SQL Server 2005 for remote connections using SQL Server Surface Area Configuration tool.

If you refer to article athttp://www.kodyaz.com/content/SQLServerdoesnotallowremoteconnections.aspx , you may see how you can use this tool for allowing remote connections for a sql server instance.

Eralper

sql

Sunday, March 25, 2012

A weird problem of Reporting Service

My company is using SQL 2000, Reporting Service SP2, Server 2003, .NET framework 1.1.

We have an ASP.NET application, working properly on one of our test machine, but when we test on another test machine, it would have the following problem:

When we want to view the PDF or EXCEL report generated by Reporting Services, we get prompted to download an ASPX file. If we choose [Open], it will use Visual Studio.NET to open it. But if we choose [Save], and change the extenstion name, it's actually the correct report file.

That means, the report is generated correctly, but we can't open it.

We have added the Content-Disposition to indicate a correct extension name, but that machine still have this weird problem. Frustrately, it works perfectly on our another machine, even without Content-Disposition.

So, we are thinking probably it's related some file system security configuration. Could anyone give me a little hint about it?

Thank you very much!

Hi, we have the same problem. Did you get anywhere with this?|||are u still looking for answer of it?

that's because the server turns on the http compression, stupid IE doesn't understand it.

one thing to work it around is, turn off the compression for aspx, it might affect too much. If that's a concern, change your report generator file from ASPX to another extension, then that extension file won't have compression on. And you can enable asp.net to handle that new extension, which is only used to generate report.

this just works fine for us

A weird problem of Reporting Service

My company is using SQL 2000, Reporting Service SP2, Server 2003, .NET framework 1.1.

We have an ASP.NET application, working properly on one of our test machine, but when we test on another test machine, it would have the following problem:

When we want to view the PDF or EXCEL report generated by Reporting Services, we get prompted to download an ASPX file. If we choose [Open], it will use Visual Studio.NET to open it. But if we choose [Save], and change the extenstion name, it's actually the correct report file.

That means, the report is generated correctly, but we can't open it.

We have added the Content-Disposition to indicate a correct extension name, but that machine still have this weird problem. Frustrately, it works perfectly on our another machine, even without Content-Disposition.

So, we are thinking probably it's related some file system security configuration. Could anyone give me a little hint about it?

Thank you very much!

Hi, we have the same problem. Did you get anywhere with this?|||are u still looking for answer of it?

that's because the server turns on the http compression, stupid IE doesn't understand it.

one thing to work it around is, turn off the compression for aspx, it might affect too much. If that's a concern, change your report generator file from ASPX to another extension, then that extension file won't have compression on. And you can enable asp.net to handle that new extension, which is only used to generate report.

this just works fine for us

A weird problem of Reporting Service

My company is using SQL 2000, Reporting Service SP2, Server 2003, .NET framework 1.1.

We have an ASP.NET application, working properly on one of our test machine, but when we test on another test machine, it would have the following problem:

When we want to view the PDF or EXCEL report generated by Reporting Services, we get prompted to download an ASPX file. If we choose [Open], it will use Visual Studio.NET to open it. But if we choose [Save], and change the extenstion name, it's actually the correct report file.

That means, the report is generated correctly, but we can't open it.

We have added the Content-Disposition to indicate a correct extension name, but that machine still have this weird problem. Frustrately, it works perfectly on our another machine, even without Content-Disposition.

So, we are thinking probably it's related some file system security configuration. Could anyone give me a little hint about it?

Thank you very much!

Hi, we have the same problem. Did you get anywhere with this?|||are u still looking for answer of it?

that's because the server turns on the http compression, stupid IE doesn't understand it.

one thing to work it around is, turn off the compression for aspx, it might affect too much. If that's a concern, change your report generator file from ASPX to another extension, then that extension file won't have compression on. And you can enable asp.net to handle that new extension, which is only used to generate report.

this just works fine for us
sql

Thursday, March 22, 2012

A way to get Table shema as xml ?

Dear all,
Is there a way to get from SQL table and XML shema file (XSD) that can be
read afterwards from a .NEt application ?
I know that I could read frommy ASP.NET code the whole table structure but
having the local xsd file would be faster for reading
regards
serge
Hello serge,

> Is there a way to get from SQL table and XML shema file (XSD) that can
> be read afterwards from a .NEt application ?
> I know that I could read frommy ASP.NET code the whole table structure
> but having the local xsd file would be faster for reading
AFAIK, not directly. One of the things I've done in the past is generate
information about the schema from the metadata. Something like this:
alter function dbo.GetColumnsForTable(@.TableObjectID int)
returns xml
as begin
declare @.rv xml
set @.rv = (select
c.column_id'@.position'
, c.name'name'
, y.name'dataType'
, c.max_length'maxLength'
, c.precision'precision'
, c.scale'scale'
, c.collation_name'collationName'
, c.is_nullable'nullable'
, c.is_rowguidcol'isRowGUID'
, c.is_identity'isIdentity'
, c.is_computed'isComputed'
, x.name
from sys.columns c
join sys.types y on c.system_type_id = y.system_type_id
left join sys.xml_schema_collections x on c.xml_collection_id = x.xml_collection_id
where c.object_id = @.TableObjectID
for xml path('column'),type)
return @.rv
end
go
select t.name'name',
dbo.GetColumnsForTable(t.object_id) as 'table/columns'
from sys.tables t
for xml path('table'),root('tables')
go
While its not a schema per se, you can get a lot of information doing this
kind of coding.
Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/

A way to get Table shema as xml ?

Dear all,
Is there a way to get from SQL table and XML shema file (XSD) that can be
read afterwards from a .NEt application ?
I know that I could read frommy ASP.NET code the whole table structure but
having the local xsd file would be faster for reading
regards
sergeHello serge,

> Is there a way to get from SQL table and XML shema file (XSD) that can
> be read afterwards from a .NEt application ?
> I know that I could read frommy ASP.NET code the whole table structure
> but having the local xsd file would be faster for reading
AFAIK, not directly. One of the things I've done in the past is generate
information about the schema from the metadata. Something like this:
alter function dbo.GetColumnsForTable(@.TableObjectID int)
returns xml
as begin
declare @.rv xml
set @.rv = (select
c.column_id '@.position'
, c.name 'name'
, y.name 'dataType'
, c.max_length 'maxLength'
, c.precision 'precision'
, c.scale 'scale'
, c.collation_name 'collationName'
, c.is_nullable 'nullable'
, c.is_rowguidcol 'isRowGUID'
, c.is_identity 'isIdentity'
, c.is_computed 'isComputed'
, x.name
from sys.columns c
join sys.types y on c.system_type_id = y.system_type_id
left join sys.xml_schema_collections x on c.xml_collection_id = x.xml_collec
tion_id
where c.object_id = @.TableObjectID
for xml path('column'),type)
return @.rv
end
go
select t.name 'name',
dbo.GetColumnsForTable(t.object_id) as 'table/columns'
from sys.tables t
for xml path('table'),root('tables')
go
While its not a schema per se, you can get a lot of information doing this
kind of coding.
Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/

A way to add .Net classes in a report?

I know that subject line might be a little confusing - -
I have a project with a .vb class, that, when accessing a web page, based on
the user's login, I grab their Employee ID. With that, I can conceivably
create a method to get a list of employees who report to that person
Is there a way to include a .vb class in a report project, and then, access
a particular method (in this case, getting the list of direct reports), in
the document map?Elmo,
I have done something similar. You should be able to create a reportviewer
in an aspx page and access your class in the aspx code...pass the subsequent
values to the report.
billN
--
Message posted via http://www.sqlmonster.com|||Will I be able to use the same report file (.rdl) that I designed in a
Report Server Project in BI?
I tried adding a .rdl file to a ReportViewer control one time, and it wasn't
recognized.
"wnichols via SQLMonster.com" <u3357@.uwe> wrote in message
news:7e587ee1771a4@.uwe...
> Elmo,
> I have done something similar. You should be able to create a
> reportviewer
> in an aspx page and access your class in the aspx code...pass the
> subsequent
> values to the report.
> billN
> --
> Message posted via http://www.sqlmonster.com
>

A very basic Q

This is probably a very silly question.I started learning ASP.net by following ASP.NET Unleashed. I am stuck where he wants me to open a connection to SQL Server database. I have just downloaded
MSDE. But I dont know where to type this code and how to run it..so as to connect to the database.

<%@. Import Namespace="System.Data.SqlClient" %
<Script Runat="Server"
Sub Page_Load
Dim conPubs As SqlConnection

conPubs = New SqlConnection( "server=localhost;uid=webuser;pwd=secret;database=pubs" )
conPubs.Open()
End Sub

</Script>


Connection Opened!

Now do i have to change the uid to SA ? (i had to assign one when i downloaded and installed MSDE?

Thanks for the help.when you installed your instance of msde- did you use the username SA or did you use the username webuser?

if you used the username webuser- then you have done just fine...

Monday, March 19, 2012

A temporary database

Hi !

I use Sql 2000 Server as a database and an ASP.NET application with VB.NET language.

Now I am working with three pages with one form in every page that allows to register a user. To accomplish the registration the user needs to fill all the three pages, but now I am sending the data to the database in every page, so if a user leaves the process before reaching the third page it will have an invalid user entry into the database that I don t want. To avoid this I was recommended to store the in a temporary database file. I have been searching information about this but I have not found it.

Somebody can help me finding the necessary documentation to achieve it please?

ThanksOriginally posted by cesark29
Hi !

I use Sql 2000 Server as a database and an ASP.NET application with VB.NET language.

Now I am working with three pages with one form in every page that allows to register a user. To accomplish the registration the user needs to fill all the three pages, but now I am sending the data to the database in every page, so if a user leaves the process before reaching the third page it will have an invalid user entry into the database that I don t want. To avoid this I was recommended to store the in a temporary database file. I have been searching information about this but I have not found it.

Somebody can help me finding the necessary documentation to achieve it please?

Thanks

I have not worked on asp or any other front ends but what i feel is, u should hold all the data in these previous pages in some hidden variables or something and pass it when the user completes the whole registration process.|||I know that passing the data from one page to another is an option, but I think that is better to pass the minimum data as you can between pages. Anyway if you think that is a good option explain me in which cases a temporary database is used.

Thanks !|||Originally posted by cesark29
I know that passing the data from one page to another is an option, but I think that is better to pass the minimum data as you can between pages. Anyway if you think that is a good option explain me in which cases a temporary database is used.

Thanks !
using database for storing these values will make the page slower since it will have to go to the database three times.Instead, it is very common to use sessions for such scenarios.
Regarding temperory databases, they are used internally to hold temperory tables and temperory stored procedures.they are used to store any work tables or temperory tables used while processing
to know more about the temp database check out BOL under System databases and data.|||Good harshal, thank you very much.

a strange problem with RDA

Hello,

I have written a program for WinCE with .NET. In one of the forms, program gets data from the sql server with RDA. It works fine..the users get data.one two three.....but at 16th or 17th or 18th try an error occurs:

"SQL Mobile encounteres some problems..."

What does it mean? It gets data 15 times but after that it gets error....What is the problem with that?

I'm really confused...

Thanks in advance.

I tried to free the resources like RDA object and other SQL CE objects and it worked...

Thursday, March 8, 2012

A severe error occurred on the current command. The results, if any, should be discarded.

Hi,

I am hosting my ASP.NET application on a Host and after some time I get this error
(Don't get it on my development machine):

A severe error occurred on the current command. The results, if any, should be discarded.

And then it says this on the same page:

Exception Details: System.Data.SqlClient.SqlException: A severe error occurred on the current command. The results, if any, should be discarded.

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

[SqlException: A severe error occurred on the current command. The results, if any, should be discarded.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +643
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +9
ASPNetPortal.PortalSettings..ctor(Int32 tabIndex, Int32 tabId)
ASPNetPortal.Global.Application_BeginRequest(Object sender, EventArgs e)
System.Web.SyncEventExecutionStep.Execute() +60
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

I thought this is a problem with max pool size and I did it max pool size = 5000, now application runs ok for some time and then produces this error but some times this comes very soon.

As a solution, I have to copy my dll in bin directory again and application restarts and works properly but then after some time this happenes again.

Please let me know whats the problem.
I checked all of my SqlDataReaders and SqlConnections are closed properly.

Any help would be appreciated.

Thanks.

Rahul.Rahul,

Getting a similar problem. I've narrowed it down to 3 stored procedures I wrote, others work fine. In the win2k server event view you should see a message

Error: 17805, Severity: 18, State: 3
2002-09-05 10:39:41.68 ods Invalid buffer received from client.

I've noticed that the StroProc often hangs when using the 'run stored procedure' function in the Explorer window in the V NET IDE. However the data still gets added. This would suggest the StorProc isn't returning a result to the code in time.

Like you our test server is fine. This runs SQL Server 2000 Developer Edition (SP1)

The production server runs SQL Server 7.0 (SP4)

Do your StroProcs use char or varchar types with a 50+ size or have a large number of parameters?

Regards

Richard|||Hi Richard,

Thanks a lot for your support.
Well! Certainly I am using varchar for 50+ size.

But I think I figured out the problem (still not sure) because since last two days I didn't get this error message, for this success I made some changes to my code.

If you think to discuss these changes would be worth then please let me know.

Thanks a lot again.

Rahul.|||So, did anyone ever figure the answer to this problem? I'm having the same issue, development server works fine (SQL2K), production server craps out (SQL7) with errors "Invalid Buffer received from client"|||If anyone's tracking this thread, here's an update: I moved the database to another production server running SQL2000, and it runs flawlessly. So the root cause is something in the way SQL7 handles SP's from .Net. More updates to come as I find them...|||We are having the same problem (with tables in our .NET Forums database) and found this info on a microsoft newsgroup)
Unfortunately the stricter datatype processing is a side effect of the 031
patch. We're working on a KB article to explain the behavior and scope.
Here is a draft of our work in progress:

KB 827366 – “Error 17805: Invalid Buffer Received from Client? Error
Message in SQL”

-----------------------
--

The information in this article applies to:

- Microsoft .NET Framework 1.0 (Version: 1.0)

- Microsoft .NET Framework 1.1

-----------------------
--

SYMPTOMS

========

When you use the SqlClient .NET Framework classes, the following error
messages may appear in the SQL Server 2000 error log:

Error: 17805, Severity: 20, State: 3

Invalid buffer received from client.

The following corresponding errors may appear in the client .NET
application:

System.Data.SqlClient.SqlException: A severe error occurred on
the current command. The results, if any, should be discarded

-or-

System.Data.SqlClient.SqlException: Procedure or function
spXXXX has too many arguments specified.

Note If you are using the .NET Framework 1.1 you only see the last error
message.

CAUSE

=====

There are three causes for these errors:

- You use SqlClient classes in a Finalize method or C# destructor. Do not
use any managed classes in a Finalize method or C# destructor.

- You do not specify an explicit SQLDbType for the parameters. In this
case, the SqlClient .NET provider tries to select the correct SQLDbType
based on the data that is passed and it will fail.

- If the size of the parameter that is specified explicitly in the .NET
code is more than the maximum allowable size for the data type in the SQL
Server.

- For example: According to SQL Server Books Online, nvarchar is a
Variable-length Unicode character data of n characters. n must be a value
from 1 through 4,000 If you specify a size that is more than 4000 for an
nvarchar parameter, then you will receive the error message that the
"Symptoms" section describes.

The following code also demonstrates how these errors can occur:

Stored Procedure

--------

PROCEDURE spParameterBug @.myText Text AS

Insert Into ParameterBugTable (TextField) Values
(@.myText)

Code

---

static void Main(string[] args)

{

string dummyText=string.Empty;

for (int n=0; n < /*80*/ 3277; n++) // change this to
80 to get the second error above

{

dummyText += "0123456789";

}

// TO DO: Change data source to match your SQL Server:

SqlConnection con= new SqlConnection("data
source=myserver;Initial Catalog=mydb;Integrated Security=SSPI;persist
security info=True;packet size=16384");

SqlCommand cmd = new SqlCommand("SpParameterBug", con);

// Correct invocation:

SqlParameter param =new SqlParameter("@.myText",
SqlDbType.Text);

param.Value = dummyText;

cmd.CommandType = CommandType.StoredProcedure;

cmd.Parameters.Add(param);

con.Open();

try

{

cmd.ExecuteNonQuery();

}

catch (Exception err)

{

Console.WriteLine(err.ToString());

}

// Causes error 17805:

SqlParameter param2 =new SqlParameter("@.myText",
dummyText);

cmd.CommandType = CommandType.StoredProcedure;

cmd.Parameters.Add(param2);

try

{

cmd.ExecuteNonQuery();

}

catch (Exception err)

{

Console.WriteLine(err.ToString());

}

Console.ReadLine();

}

RESOLUTION

==========

To resolve these errors, make sure that you do the following:

1. Do not use SqlClient classes in a Finalize method or a C# destructor.

2. Specify the SqlDbType for the SqlParameter so that there is no inferred
type.

3. Specify a parameter size that is within the allowable limits of the data
type.

REFERENCES

==========

For more information about the maximum size for different data types, see
these sections of SQL Books Online:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_
na-nop_9msy.asp: nchar and nvarchar

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_
da-db_7msw.asp: Data Types

Shawn Aebi
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.|||Actually here is a link to the thread...
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=IsYbP1AdDHA.2408%40cpmsftngxa06.phx.gbl&rnum=1&prev=/groups%3Fq%3Dsql%2Bserver%2B17805%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26scoring%3Dd%26selm%3DIsYbP1AdDHA.2408%2540cpmsftngxa06.phx.gbl%26rnum%3D1|||i faced the same error, but found that i was executing "return" in the middle of the transaction and thus the bug was fixed by completing the transaction.

Tuesday, March 6, 2012

a search module.

okay so pretty much I am using the asp.net 2.0 membership/roles.

i wanna make a search box that users can type in a name and it will search the database. most likely in the table "aspnet_Users"

so when users search i want it to be like this:

cmd = select * from [table] WHERE username = textbox1.text (ofcourse with parameters instead of concatenation).

but i want it to have a "like" in there

so if the users type in "fenix" they should get results matching CLOSE to fenix. so

masfenix, fenix, fenxi, and you know related names. that are similar.

should I use LIKE? and if so HOW do i use that?

is it just gonna be

cmd = select * from [table] where Username LIKE @.username

@.username = textbox1.text

?

thanks

Hello my friend,

The LIKE clause uses the % wild character. Here are some examples: -

-- get countries beginning with c
select * from tblcountry where countryname like 'c%'

-- get countries ending with land
select * from tblcountry where countryname like '%land'

-- get countries containing the word 'land' or 'stan'
select * from tblcountry where countryname like '%land%' or countryname like '%stan%'

Kind regards

Scotty

|||

hi thanks for the answer

i knew about that before just thoguht there would be more solutions

|||

Hi,

Maybe the following link is helpful to you.

http://forums.asp.net/thread/1677621.aspx

Thanks.

A script to delete views

Hi,

I need a script that I can run from ASP .Net that will delete all
views that start with "Search". My site creates them on the fly and
they tend to accumulate as more users visit the site. Is there a good
SQL help web site that I can refer to that will be me started?

Thanks,

Bill
Cincinnati, OH USAI need a script that I can run from ASP .Net that will delete all

Quote:

Originally Posted by

views that start with "Search". My site creates them on the fly and
they tend to accumulate as more users visit the site. Is there a good
SQL help web site that I can refer to that will be me started?


The script below will delete all dbo-owned views that begin with 'Search'.
However, creating/deleting objects from normal application code is not
secure and often an indication of an application design flaw.

SET NOCOUNT ON

DECLARE @.DropStatement nvarchar(4000)
DECLARE @.LastError int

DECLARE DropStatements
CURSOR LOCAL FAST_FORWARD READ_ONLY FOR
--views
SELECT
N'DROP VIEW ' +
QUOTENAME(TABLE_SCHEMA) +
N'.' +
QUOTENAME(TABLE_NAME) AS DropStatement
FROM
INFORMATION_SCHEMA.TABLES
WHERE
TABLE_TYPE = N'VIEW'
AND OBJECTPROPERTY(
OBJECT_ID(QUOTENAME(TABLE_SCHEMA) +
N'.' +
QUOTENAME(TABLE_NAME)),
'IsMSShipped') = 0
AND TABLE_SCHEMA = N'dbo'
AND TABLE_NAME LIKE N'Search%'

OPEN DropStatements
WHILE 1 = 1
BEGIN
FETCH NEXT FROM DropStatements INTO @.DropStatement
IF @.@.FETCH_STATUS = -1 BREAK
BEGIN
EXECUTE sp_ExecuteSQL @.DropStatement
SET @.LastError = @.@.ERROR
IF @.LastError 0
BEGIN
BREAK
END
END
END
CLOSE DropStatements
DEALLOCATE DropStatements

--
Hope this helps.

Dan Guzman
SQL Server MVP

<namewitheldbyrequest@.gmail.comwrote in message
news:1159647523.344352.188610@.c28g2000cwb.googlegr oups.com...

Quote:

Originally Posted by

Hi,
>
I need a script that I can run from ASP .Net that will delete all
views that start with "Search". My site creates them on the fly and
they tend to accumulate as more users visit the site. Is there a good
SQL help web site that I can refer to that will be me started?
>
Thanks,
>
Bill
Cincinnati, OH USA
>

A request to send data to the computer running IIS has failed

Hi,

I Have an application for Pocket PC 2003 developed in Visual Studio 2003(VB.Net , Smart Device App). I Use Sql Server CE as the database which Synchronizes with Sql Server 2000, SP4. The IIS and the Sql Server 2000 are in different Machines. I Have Installed the proper Sqlserver Ce in the IIS machine and created virtual directory with Basic authentication.I connect my device through Active Sync 3.7. I could browse the sscesa20.dll from Pocket IE and get the ' SQL Server CE Server Agent ' message. The PC to which my pocket PC is connected is under a Proxy.

When I tried the RDA.Pull() , the function fails and returns the error
" Error Code: 80072EE7
A request to send data to the computer running IIS has failed. For more information see HRESULT. [,,,,,]
Minor Error : 28037
Source: Sql Server 2000 Windows CE Edition. "

The same application works in other network which is not under a proxy.

Any clues ?

Thanks,
Jibu
eSystem Software

What happens if you try to use InternetProxy, InternetProxyLogin, ...etc.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Everywhere, Microsoft Corporation

|||

Hi Laxmi Narsimha Rao,

Yes. That was exactly the problem, which I had rectified sometimes back. Any way thanks for the reply.

Thanks,

Jibu

|||

Glad to hear that things are working fine from your end.

Thanks

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Everywhere, Microsoft Corporation

|||

I am attempting to run (on the emulator) a starterkit application for Pocket PC 2003 SE that I downloaded which uses replication/merge. I received the following error:

" Error Code: 80072EE7
A request to send data to the computer running IIS has failed. For more information see HRESULT.
Minor Error : 28037

Source: Microsoft SQL Server 2005 Mobile Edition. "

You recommended to use InternetProxy, InternetProxyLogin, etc.

What do you mean by that?

|||

Hi,

i have created publication on server.and when i try to create sql server mobile subscription on my machine, i get following error:

TITLE: Microsoft SQL Server Management Studio

A request to send data to the computer running IIS has failed. For more information, see HRESULT.
HRESULT 0x80072EE2 (28037)


BUTTONS:

OK

my machine and server are on different.

i am able to get "SQL Server Mobile Server Agent 3.0" message when i run /sqlcesa30.dll" href="http://links.10026.com/?link=http://_253cserver_name_253e/_253Cvirtual_dir_253Esqlcesa30.dll" target=_blank>http://<server_name>/<virtual_dir>sqlcesa30.dll through Internet explorer
what should i do now.please help me.

|||

This is a solution which I found online and it works for me.

1.

Click Start, click Run, type firewall.cpl, and then click OK.

2.

In the Windows Firewall dialog box, click the Advanced tab.

3.

In the Network Connection Settings box, click the connection that your computer uses, and then click Settings.

4.

In the Advanced Settings dialog box, click Web Server (HTTP), and then click Secure Web Server (HTTPS).

Note For additional information about when you must allow users to access the Secure Web Server (HTTPS) on your computer, see the "More Information" section.

5.

Click OK.

6.

In the Windows Firewall dialog box, click OK.

|||

Hi,

I am getting following error

"A request to send data to the computer running IIS has failed. For more information, see HRESULT."

I have SSL on Proxy Server which redirect the request to web server. Communication between Client and Proxy use SSL but the communication between PROXY and Web Server is normal (without SSL). I installed Sql Server Mobile Tool on Web Server and configured virtual directory without SSL and Basic Authentication. When client hit this URL from out side of the world, it must go through SSL on Proxy. When I directly go to URL (https://website/test/sqlcesa30.dll) on web browser, it's working fine. But when i use it in my .Net code i am getting error as above.

Same code is working without SSL on proxy.

Can you please tell me what could be the problem?

Thanks & Regards,

D

A request to send data to the computer running IIS has failed

Hi,

I Have an application for Pocket PC 2003 developed in Visual Studio 2003(VB.Net , Smart Device App). I Use Sql Server CE as the database which Synchronizes with Sql Server 2000, SP4. The IIS and the Sql Server 2000 are in different Machines. I Have Installed the proper Sqlserver Ce in the IIS machine and created virtual directory with Basic authentication.I connect my device through Active Sync 3.7. I could browse the sscesa20.dll from Pocket IE and get the ' SQL Server CE Server Agent ' message. The PC to which my pocket PC is connected is under a Proxy.

When I tried the RDA.Pull() , the function fails and returns the error
" Error Code: 80072EE7
A request to send data to the computer running IIS has failed. For more information see HRESULT. [,,,,,]
Minor Error : 28037
Source: Sql Server 2000 Windows CE Edition. "

The same application works in other network which is not under a proxy.

Any clues ?

Thanks,
Jibu
eSystem Software

What happens if you try to use InternetProxy, InternetProxyLogin, ...etc.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Everywhere, Microsoft Corporation

|||

Hi Laxmi Narsimha Rao,

Yes. That was exactly the problem, which I had rectified sometimes back. Any way thanks for the reply.

Thanks,

Jibu

|||

Glad to hear that things are working fine from your end.

Thanks

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Everywhere, Microsoft Corporation

|||

I am attempting to run (on the emulator) a starterkit application for Pocket PC 2003 SE that I downloaded which uses replication/merge. I received the following error:

" Error Code: 80072EE7
A request to send data to the computer running IIS has failed. For more information see HRESULT.
Minor Error : 28037

Source: Microsoft SQL Server 2005 Mobile Edition. "

You recommended to use InternetProxy, InternetProxyLogin, etc.

What do you mean by that?

|||

Hi,

i have created publication on server.and when i try to create sql server mobile subscription on my machine, i get following error:

TITLE: Microsoft SQL Server Management Studio

A request to send data to the computer running IIS has failed. For more information, see HRESULT.
HRESULT 0x80072EE2 (28037)


BUTTONS:

OK

my machine and server are on different.

i am able to get "SQL Server Mobile Server Agent 3.0" message when i run /sqlcesa30.dll" href="http://links.10026.com/?link=http://%3cserver_name%3e/%3Cvirtual_dir%3Esqlcesa30.dll" target=_blank>http://<server_name>/<virtual_dir>sqlcesa30.dll through Internet explorer
what should i do now.please help me.

|||

This is a solution which I found online and it works for me.

1. Click Start, click Run, type firewall.cpl, and then click OK. 2. In the Windows Firewall dialog box, click the Advanced tab. 3. In the Network Connection Settings box, click the connection that your computer uses, and then click Settings. 4. In the Advanced Settings dialog box, click Web Server (HTTP), and then click Secure Web Server (HTTPS).

Note For additional information about when you must allow users to access the Secure Web Server (HTTPS) on your computer, see the "More Information" section. 5. Click OK. 6. In the Windows Firewall dialog box, click OK.

|||

Hi,

I am getting following error

"A request to send data to the computer running IIS has failed. For more information, see HRESULT."

I have SSL on Proxy Server which redirect the request to web server. Communication between Client and Proxy use SSL but the communication between PROXY and Web Server is normal (without SSL). I installed Sql Server Mobile Tool on Web Server and configured virtual directory without SSL and Basic Authentication. When client hit this URL from out side of the world, it must go through SSL on Proxy. When I directly go to URL (https://website/test/sqlcesa30.dll) on web browser, it's working fine. But when i use it in my .Net code i am getting error as above.

Same code is working without SSL on proxy.

Can you please tell me what could be the problem?

Thanks & Regards,

D

A request to send data to the computer running IIS has failed

Hi,

I Have an application for Pocket PC 2003 developed in Visual Studio 2003(VB.Net , Smart Device App). I Use Sql Server CE as the database which Synchronizes with Sql Server 2000, SP4. The IIS and the Sql Server 2000 are in different Machines. I Have Installed the proper Sqlserver Ce in the IIS machine and created virtual directory with Basic authentication.I connect my device through Active Sync 3.7. I could browse the sscesa20.dll from Pocket IE and get the ' SQL Server CE Server Agent ' message. The PC to which my pocket PC is connected is under a Proxy.

When I tried the RDA.Pull() , the function fails and returns the error
" Error Code: 80072EE7
A request to send data to the computer running IIS has failed. For more information see HRESULT. [,,,,,]
Minor Error : 28037
Source: Sql Server 2000 Windows CE Edition. "

The same application works in other network which is not under a proxy.

Any clues ?

Thanks,
Jibu
eSystem Software

What happens if you try to use InternetProxy, InternetProxyLogin, ...etc.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Everywhere, Microsoft Corporation

|||

Hi Laxmi Narsimha Rao,

Yes. That was exactly the problem, which I had rectified sometimes back. Any way thanks for the reply.

Thanks,

Jibu

|||

Glad to hear that things are working fine from your end.

Thanks

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Everywhere, Microsoft Corporation

|||

I am attempting to run (on the emulator) a starterkit application for Pocket PC 2003 SE that I downloaded which uses replication/merge. I received the following error:

" Error Code: 80072EE7
A request to send data to the computer running IIS has failed. For more information see HRESULT.
Minor Error : 28037

Source: Microsoft SQL Server 2005 Mobile Edition. "

You recommended to use InternetProxy, InternetProxyLogin, etc.

What do you mean by that?

|||

Hi,

i have created publication on server.and when i try to create sql server mobile subscription on my machine, i get following error:

TITLE: Microsoft SQL Server Management Studio

A request to send data to the computer running IIS has failed. For more information, see HRESULT.
HRESULT 0x80072EE2 (28037)


BUTTONS:

OK

my machine and server are on different.

i am able to get "SQL Server Mobile Server Agent 3.0" message when i run /sqlcesa30.dll" href="http://links.10026.com/?link=http://%3cserver_name%3e/%3Cvirtual_dir%3Esqlcesa30.dll" target=_blank>http://<server_name>/<virtual_dir>sqlcesa30.dll through Internet explorer
what should i do now.please help me.

|||

This is a solution which I found online and it works for me.

1. Click Start, click Run, type firewall.cpl, and then click OK. 2. In the Windows Firewall dialog box, click the Advanced tab. 3. In the Network Connection Settings box, click the connection that your computer uses, and then click Settings. 4. In the Advanced Settings dialog box, click Web Server (HTTP), and then click Secure Web Server (HTTPS).

Note For additional information about when you must allow users to access the Secure Web Server (HTTPS) on your computer, see the "More Information" section. 5. Click OK. 6. In the Windows Firewall dialog box, click OK.

|||

Hi,

I am getting following error

"A request to send data to the computer running IIS has failed. For more information, see HRESULT."

I have SSL on Proxy Server which redirect the request to web server. Communication between Client and Proxy use SSL but the communication between PROXY and Web Server is normal (without SSL). I installed Sql Server Mobile Tool on Web Server and configured virtual directory without SSL and Basic Authentication. When client hit this URL from out side of the world, it must go through SSL on Proxy. When I directly go to URL (https://website/test/sqlcesa30.dll) on web browser, it's working fine. But when i use it in my .Net code i am getting error as above.

Same code is working without SSL on proxy.

Can you please tell me what could be the problem?

Thanks & Regards,

D

A request to send data to the computer running IIS has failed

Hi,

I Have an application for Pocket PC 2003 developed in Visual Studio 2003(VB.Net , Smart Device App). I Use Sql Server CE as the database which Synchronizes with Sql Server 2000, SP4. The IIS and the Sql Server 2000 are in different Machines. I Have Installed the proper Sqlserver Ce in the IIS machine and created virtual directory with Basic authentication.I connect my device through Active Sync 3.7. I could browse the sscesa20.dll from Pocket IE and get the ' SQL Server CE Server Agent ' message. The PC to which my pocket PC is connected is under a Proxy.

When I tried the RDA.Pull() , the function fails and returns the error
" Error Code: 80072EE7
A request to send data to the computer running IIS has failed. For more information see HRESULT. [,,,,,]
Minor Error : 28037
Source: Sql Server 2000 Windows CE Edition. "

The same application works in other network which is not under a proxy.

Any clues ?

Thanks,
Jibu
eSystem Software

What happens if you try to use InternetProxy, InternetProxyLogin, ...etc.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Everywhere, Microsoft Corporation

|||

Hi Laxmi Narsimha Rao,

Yes. That was exactly the problem, which I had rectified sometimes back. Any way thanks for the reply.

Thanks,

Jibu

|||

Glad to hear that things are working fine from your end.

Thanks

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Everywhere, Microsoft Corporation

|||

I am attempting to run (on the emulator) a starterkit application for Pocket PC 2003 SE that I downloaded which uses replication/merge. I received the following error:

" Error Code: 80072EE7
A request to send data to the computer running IIS has failed. For more information see HRESULT.
Minor Error : 28037

Source: Microsoft SQL Server 2005 Mobile Edition. "

You recommended to use InternetProxy, InternetProxyLogin, etc.

What do you mean by that?

|||

Hi,

i have created publication on server.and when i try to create sql server mobile subscription on my machine, i get following error:

TITLE: Microsoft SQL Server Management Studio

A request to send data to the computer running IIS has failed. For more information, see HRESULT.
HRESULT 0x80072EE2 (28037)


BUTTONS:

OK

my machine and server are on different.

i am able to get "SQL Server Mobile Server Agent 3.0" message when i run /sqlcesa30.dll" href="http://links.10026.com/?link=http://%3cserver_name%3e/%3Cvirtual_dir%3Esqlcesa30.dll" target=_blank>http://<server_name>/<virtual_dir>sqlcesa30.dll through Internet explorer
what should i do now.please help me.

|||

This is a solution which I found online and it works for me.

1. Click Start, click Run, type firewall.cpl, and then click OK. 2. In the Windows Firewall dialog box, click the Advanced tab. 3. In the Network Connection Settings box, click the connection that your computer uses, and then click Settings. 4. In the Advanced Settings dialog box, click Web Server (HTTP), and then click Secure Web Server (HTTPS).

Note For additional information about when you must allow users to access the Secure Web Server (HTTPS) on your computer, see the "More Information" section. 5. Click OK. 6. In the Windows Firewall dialog box, click OK.

|||

Hi,

I am getting following error

"A request to send data to the computer running IIS has failed. For more information, see HRESULT."

I have SSL on Proxy Server which redirect the request to web server. Communication between Client and Proxy use SSL but the communication between PROXY and Web Server is normal (without SSL). I installed Sql Server Mobile Tool on Web Server and configured virtual directory without SSL and Basic Authentication. When client hit this URL from out side of the world, it must go through SSL on Proxy. When I directly go to URL (https://website/test/sqlcesa30.dll) on web browser, it's working fine. But when i use it in my .Net code i am getting error as above.

Same code is working without SSL on proxy.

Can you please tell me what could be the problem?

Thanks & Regards,

D

Saturday, February 25, 2012

A question about sqlxml

Who use sqlxml .net?

How can I write code like this:

select count(1) as count from Orders for xml auto

That's error.

And what is the correct sqlxml code?

Tks.

Hi,

the code works fine with SQL2005 but fails on SQL2K

Eralper

http://www.kodyaz.com

|||

You could write it like below for SQL Server 2000:

select count from (select count(1) as count from Orders) as Orders for xml auto

Friday, February 24, 2012

A question about looping

Hi All,

I would like to know the best way to approach the following requirement:

I have an ASP.net 2 web site which gets its data from SQL 2005.

I am trying to run a series of 'rules' which are SQL where statements stored in a table, against rows stored in another table. I open the 'Rules' table looping through all records. I copy each rule to a string and put it on the end of the SQL statement so that the rule will only be appended if it passes the rule... this may be a little confusing.

The rules process will fire when the details have been submitted to the database.

Table containg rules would contain something like:

ID, RuleSQL

1, (ClientAge >18)

2, (ClientIncome>10000)

3 Etc...

This a very simplified version of the table but gives the general idea.

I currently use ASP.NET 2 and sqlconnections/datareaders to do this. I would like to know if there is a way of doing the same thing server side using Transact SQL because that would (I believe) speed up the time taken to perform all the tests as i wouldn't need to rely on ASP to open all recordsets and append the data.

If the ASP route would be the standard way of doing it and is not likely to have a detremental effect on performance then i am fine to stick with it because i know it works.

any comments or suggestions would be welcomed.

Thanks,

Ian

Yes, you can definitely do what you are describing in the database!

FYI, if you need to embed single quotation marks in the sql statement string (that is surrounded by sinqle quotes, as in 'set status = 'done'', you have to use two sinqle quotes in a row to get one single quote in the sql statement output: 'set status = ''done'''. You keep the sinqle quotes on the outside of the string, and all single quotes inside the string need to be double single quotes. Don't use a single double quote. :)

declare @.sql_statement varchar(max)
declare @.table_name varchar(256)
declare @.rule_where_clause varchar(max)

declare rule_csr cursor FAST_FORWARD for
select table_name, rule_where_clause
from the_rules
order by table_name, rule_where_clause
for read only

open rule_csr

fetch nextfrom rule_csrinto @.table_name, @.rule_where_clause

while(@.@.fetch_status<>-1)
begin

set @.sql_statement = 'Update ' + @.table_name + ' set status = -1 where ' + @.rule_where_clause

exec (@.sql_statement)

fetch nextfrom rule_csrinto @.table_name, @.rule_where_clause

end

close rule_csr
deallocate rule_csr

|||

Forgot to add this warning.

When possible, avoid using cursors because they are relatively slow compared with re-structuring your sql commands to make proper use of set-based data manipulation (as opposed to row-based data manipulation). In this case, you are probably stuck with using a cursor.

A query runs 1 times slower from a .NET application the from Query

Just a guess.
It might be the delay in creating and opening the connection.
Why don't you log the current time just before calling the SP and after it
and find the time difference. That can narrow down on what the issue is.
--
-Omnibuzz (The SQL GC)
http://omnibuzz-sql.blogspot.com/
"Boaz Ben-Porat" wrote:

> Computer: 3.4 Ghz CPU, 1 GB RAM, 2003 Server
> database : MS SqlServer 2000 Enterprise. ~ 10 GB database file. Largest
> table in the database contains 11,000,000 records.
> Framework: .NET 2.0
> I try to run a query against the database, selecting aggregated data from
> views based on the large table.
> When executed from the Query Analizer, it takes 13 seconds.
> When executed from a .NET application, it takes 140 seconds.
> The database is well tuned (or else the query analizer would go slowly), s
o
> I can't find the reason for this difference.
> Any suggestion ?
> TIA
> Boaz Ben-Porat
> Milestone Systems
>
>Thanks for a quick answer.
The time I refer to is after the connection is opened.
the relevant code:
DbDataReader dr = null;
try
{
// This method opens a connection, if not allready opened
Connect();
// dbCommand is an input parameter of type DbCommand. It contains the SQL
statement
dbCommand.Connection = _connection;
DateTime t1 = DateTime.Now;
dr = dbCommand.ExecuteReader();
DateTime t2 = DateTime.Now;
TimeSpan ts = t2 - t1;
int milli = (int)ts.TotalMilliseconds; // milli contains the execution time
of dbCommand.ExecuteReader();
Boaz Ben-Porat
"Omnibuzz" <Omnibuzz@.discussions.microsoft.com> wrote in message
news:49A213DD-227B-4602-81ED-5ADF4E32687E@.microsoft.com...
> Just a guess.
> It might be the delay in creating and opening the connection.
> Why don't you log the current time just before calling the SP and after it
> and find the time difference. That can narrow down on what the issue is.
> --
> -Omnibuzz (The SQL GC)
> http://omnibuzz-sql.blogspot.com/
>
> "Boaz Ben-Porat" wrote:
>