By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,143 Members | 865 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,143 IT Pros & Developers. It's quick & easy.

Connecting to Database from Windows Control running in ASP.Net webform

P: n/a
HI all

I am having a windows Control running on ASP.Net webform. From this windows control I am trying to connect to database to do some database operations.

Now I am facing problem while connecting to Database from client systems which is having only .net framework without SQL Client Installed. It works fine on client systems having .Net Installed with SQL Client

What could be the problem. How Can I resolve this problem?

I am sure you will be asking yourself why I am going for Windows control!!!. I could not do it without using windows user control since I am using Webbrowser Control

Thanks in advance. Appreciate early response

Thanks
EJ
Nov 18 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
Hi EJ,

From your description, you put some data manipulation code( for SQLServer)
in a winform control which is used in webform page. And you find it works
on some client machine with both .net framwork and sqlclient , but not work
on some others which only have .net framework but without sqlclient
installed?

I'm not sure what the "SqlClient" do you mean? Is it the components under
the System.Data.SqlClient namespace? If so, as far as I know, they're
installed together with the .net framework and is not separately
distributed. Or if the SqlClient is other things ,would you please provide
some detailed info on it? Also, it there error message when the winform
control not work. The following kb has mentioned using IEHOST log to debug
embeded IE host objects

#HOW TO: Use the IEHost Log to Debug .NET Object Hosting in Internet
Explorer
http://support.microsoft.com/?id=313892

If you have any questions or new findings, please feel free to post here.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #2

P: n/a
HI Steven

Oh, You are back! thank

In my previous post, i was refering to SQL server client tool

Now I have found that, you about the application I am developing. As you know you have solved many of our problem using where we faced in usiing webbrowser control in ASP.Net webform. In the same webbrowser control after clicking on document elements, I am trying to save the data I am reading from Iframe to database where our webapplication is running.

I tested this application, it runs fine in intranet zone and connents to SQL server on the web server and saves the data, if .Net Framework with MDAC 2.7 is installed on the system wherever the application is run.

Now when we are trying to access the same webapplication on internet we are facing problem in connecting to Database on the webserver. It is unable to connect to the database from webbrowser control which is running on client machine. How can we reslove this problem

One more thing I observed is I am able to connect to the database which is on the webserver only if the server name is given as the machine name where SQL server Database resides in the connection string. We are unable to connect to the database if the IP address of the SQL server Database is given in the connection String

Hope you can understand my problem. Help me in resolving this critical problem. Eary response is appreciated

Thanks
E
Nov 18 '05 #3

P: n/a
Hi EJ,

From your further description, the problem seems also likely cause by the
connection to the DataBase server from client in internet based scenario.
And sometimes when the Server is behind a firewall, the client may fail to
connect the server. Here is a kb article discussing the problem.

#INF: TCP Ports Needed for Communication to SQL Server Through a Firewall
http://support.microsoft.com/?id=287932

Also, the MDAC is auto intalled on the XP or 2k machine, so generally ,this
won't be the problem.
But I think you can still perform some further tests to see whether the
problem is caused by the problem on connecting to the ServerMachine or is
due to the MDAC component installed on client.
Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #4

P: n/a
HI Steven

I am facing one more problem with respect to Windows Control contaning Webbrowser control which is running on client system in webapplication. The element click is not working on Win 98 system. What could be the reason? How can I resolve this problem?

Any other updates/patches are required on win 98 system to run this windows control contaning webbrowser control properly

Please reply as soon as possible

Thanks
EJ
Nov 18 '05 #5

P: n/a
Hi EJ,

Thanks for your followup and the further information you provided. Yes,
maybe this is the cause. But can you confirm what the cause of the issue
is? What about the firewall for connect remote sqlserver in internet
scenario I mentioned in the last reply? As for the WIN98 machine, what is
the IE version on it, I suspect whether the problem that the element click
not work is caused by the IE's version too low. Also, I think you can
first use a winform applicaiton rather than in IE host enviroment to
confirm the accurate cause since there're not only one problem there. Do
you think so? Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #6

P: n/a
HI Steven

Thanks for the early reply

We have IE 6.0 on Win 98 system with all the latest Windows Update on the win 98 system.

Let me check with windows application first

Thanks
E
Nov 18 '05 #7

P: n/a
Hi EJ,

What about the test on using a WinForm client app? Does it have the same
problem connecting the remote database? If there is any new findings,
please feel free to post here. Thanks.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #8

P: n/a
hi Steven,

Sorry for not getting back for quite sometime.

We are able to connect to SQL server from the Windows Control embeded in a webfrom running on a client sysytem, if and only if the 1433 port is opened up (SQL server Port). But since this is going to be a security issue, is there any other method to connect to the Database from the Windows Control embeded in a webfrom running on a client sysytem? Please can you help in regard at the earliest.

Also I have one more query, regarding how to know what version of MDAC is there in client system? or MDAC is installed or not on the system?

looking forward for the quick reply.

Thanks,
Vani

"Steven Cheng[MSFT]" wrote:
Hi EJ,

What about the test on using a WinForm client app? Does it have the same
problem connecting the remote database? If there is any new findings,
please feel free to post here. Thanks.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #9

P: n/a
Hi EJ,

Thanks for your followup. As for first problem, generally the means that we
connect to a SQLServer server is configurable via the SQLServer's Network
Utility tool. There are serveral other Server Protocals we can use other
than the default tcp/ip protocal. You may have a look and here is the
reference on Network Utility tool in msdn:

#SQL Server Network Utility
http://msdn.microsoft.com/library/en...epl.asp?frame=
true

Also, as for how to check the MDAC component's version on a client machine.
Here is a kb article disscussing this and provide two means(1 use check
tool or manuall check the registry).

#HOW TO: Check for MDAC Version
http://support.microsoft.com/?id=301202

Hope also helps. Thanks.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #10

P: n/a
Thanks Steven

"Steven Cheng[MSFT]" wrote:
Hi EJ,

Thanks for your followup. As for first problem, generally the means that we
connect to a SQLServer server is configurable via the SQLServer's Network
Utility tool. There are serveral other Server Protocals we can use other
than the default tcp/ip protocal. You may have a look and here is the
reference on Network Utility tool in msdn:

#SQL Server Network Utility
http://msdn.microsoft.com/library/en...epl.asp?frame=
true

Also, as for how to check the MDAC component's version on a client machine.
Here is a kb article disscussing this and provide two means(1 use check
tool or manuall check the registry).

#HOW TO: Check for MDAC Version
http://support.microsoft.com/?id=301202

Hope also helps. Thanks.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.