473,323 Members | 1,589 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

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

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
10 1676
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
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Blake | last post by:
I have created an Access2K front end application that connects to a SQLServer2K backend. I use this vba code to create the connection from the Access app: Dim strConnect As String 'make sure...
3
by: nzanella | last post by:
Hello, I have MS SQL Server running on a server computer. I am trying to connect to it via ASP from a .asp file created in a virtual directory. I am using IIS as the web server. I am connecting...
1
by: ehendrikd | last post by:
hi all im very new to using db2 so please excuse any obvious newbie questions :) my situation is this... we have a v7.1 db2 database running on redhat 9 and i am trying to use enterprise...
2
by: Matt Theule | last post by:
I need to be able to allow users to drag files to a list box on a web page. To this end, I created a Windows Control and hosted it in a WebForm. When the file is dropped onto the listbox, the...
12
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed...
9
by: Nathan Sokalski | last post by:
I am trying to connect to a Microsoft Access Database from my ASP.NET Application. I use the following code to create my connection string: cmdSelect.Connection = New...
3
by: Vinod R.Shenoy | last post by:
Hi All, Came across a post wherin you had helped somebody with a similar problem and was wondering if you could help us out with it. Our problem is , We have a development SQL Server 2000...
1
by: =?Utf-8?B?SmVmZnJleQ==?= | last post by:
After running DataGrid control and Binding control with an Access database successfully, I tried to run a Windows application on another Access database. This WinForm did show up; however, the...
2
by: orandov | last post by:
Hi, I am having a problem connecting my .net applications from the application server to the database server. When I run the application from my windows xp (sp2) box it works fine. When I try to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.