Tuesday, March 27, 2012
connecting to SQL Server 2000 from a VB.net app using ADO.net
I can connect from my app to sql server on the local lan, but I can't connect over the
Internet. I can't create a remote connection in Enterprise Manager. However, I can
ping the IP address of the server just fine.
The app uses the following connect string:
Provider=SQLOLEDB;User
ID=******;Password=******;Server=******;Database=* *****;Network Address=******
Where 'Network Address' = the IP address of the machine where SQL Server is
installed.
This connect string works great from any machine connected to the same lan as the
SQL Server machine. However, whenever I try to connect across the Internet (from my
home machine, using the exact same software and connect string), I take the
following error:
Client unable to establish connection ConnectionOpen(CreateFile()
Question 1: Does anybody have any suggestions as to why I can connect over the LAN
but not over the Internet? I suspect some networking thing, like a firewall on the
lan where I am trying to connect, but I am not a networking expert.
Question 2: Does anyone have any opinion about whether this is a valid DBIO
technique? Most databases that are accessed over the Internet have thin-client
interfaces implemented in front of them. I have never tried to do this from a Windows
fat-client, and I suspect very poor performance and excess resource utilization on
the server
Any help or article will be appriciated
In terms of connectivity issues over the Internet, firewall
issues would be my first guess. You may want to take a look
at the following article:
INF: TCP Ports Needed for Communication to SQL Server
Through a Firewall
http://support.microsoft.com/?id=287932
In terms of the application issues, it depends on the app.
The resource problems on the database server are most often
due to coding issues, not really what type of client is
used. Either can perform well or perform poorly depending on
how they are coded.
-Sue
On Thu, 15 Apr 2004 09:56:07 -0700, "Lisa Jones"
<anonymous@.discussions.microsoft.com> wrote:
>Hi
>I can connect from my app to sql server on the local lan, but I can't connect over the
>Internet. I can't create a remote connection in Enterprise Manager. However, I can
>ping the IP address of the server just fine.
>The app uses the following connect string:
>Provider=SQLOLEDB;User
>ID=******;Password=******;Server=******;Database= ******;Network Address=******
>Where 'Network Address' = the IP address of the machine where SQL Server is
>installed.
>This connect string works great from any machine connected to the same lan as the
>SQL Server machine. However, whenever I try to connect across the Internet (from my
>home machine, using the exact same software and connect string), I take the
>following error:
>Client unable to establish connection ConnectionOpen(CreateFile()
>Question 1: Does anybody have any suggestions as to why I can connect over the LAN
>but not over the Internet? I suspect some networking thing, like a firewall on the
>lan where I am trying to connect, but I am not a networking expert.
>Question 2: Does anyone have any opinion about whether this is a valid DBIO
>technique? Most databases that are accessed over the Internet have thin-client
>interfaces implemented in front of them. I have never tried to do this from a Windows
>fat-client, and I suspect very poor performance and excess resource utilization on
>the server
>Any help or article will be appriciated
sqlsql
connecting to SQL Server 2000 from a VB.net app using ADO.net
I can connect from my app to sql server on the local lan, but I can't connec
t over the
Internet. I can't create a remote connection in Enterprise Manager. However,
I can
ping the IP address of the server just fine.
The app uses the following connect string:
Provider=SQLOLEDB;User
ID=******;Password=******;Server=******;
Database=******;Network Address=****
**
Where 'Network Address' = the IP address of the machine where SQL Server is
installed.
This connect string works great from any machine connected to the same lan a
s the
SQL Server machine. However, whenever I try to connect across the Internet (
from my
home machine, using the exact same software and connect string), I take the
following error:
Client unable to establish connection ConnectionOpen(CreateFile()
Question 1: Does anybody have any suggestions as to why I can connect over t
he LAN
but not over the Internet? I suspect some networking thing, like a firewall
on the
lan where I am trying to connect, but I am not a networking expert.
Question 2: Does anyone have any opinion about whether this is a valid DBIO
technique? Most databases that are accessed over the Internet have thin-clie
nt
interfaces implemented in front of them. I have never tried to do this from
a Windows
fat-client, and I suspect very poor performance and excess resource utilizat
ion on
the server
Any help or article will be appriciatedIn terms of connectivity issues over the Internet, firewall
issues would be my first guess. You may want to take a look
at the following article:
INF: TCP Ports Needed for Communication to SQL Server
Through a Firewall
http://support.microsoft.com/?id=287932
In terms of the application issues, it depends on the app.
The resource problems on the database server are most often
due to coding issues, not really what type of client is
used. Either can perform well or perform poorly depending on
how they are coded.
-Sue
On Thu, 15 Apr 2004 09:56:07 -0700, "Lisa Jones"
<anonymous@.discussions.microsoft.com> wrote:
>Hi
>I can connect from my app to sql server on the local lan, but I can't conne
ct over the
>Internet. I can't create a remote connection in Enterprise Manager. However
, I can
>ping the IP address of the server just fine.
>The app uses the following connect string:
>Provider=SQLOLEDB;User
> ID=******;Password=******;Server=******;
Database=******;Network Address=***
***
>Where 'Network Address' = the IP address of the machine where SQL Server is
>installed.
>This connect string works great from any machine connected to the same lan
as the
>SQL Server machine. However, whenever I try to connect across the Internet
(from my
>home machine, using the exact same software and connect string), I take the
>following error:
>Client unable to establish connection ConnectionOpen(CreateFile()
>Question 1: Does anybody have any suggestions as to why I can connect over
the LAN
>but not over the Internet? I suspect some networking thing, like a firewall
on the
>lan where I am trying to connect, but I am not a networking expert.
>Question 2: Does anyone have any opinion about whether this is a valid DBIO
>technique? Most databases that are accessed over the Internet have thin-cli
ent
>interfaces implemented in front of them. I have never tried to do this from
a Windows
>fat-client, and I suspect very poor performance and excess resource utiliza
tion on
>the server
>Any help or article will be appriciated
Sunday, March 25, 2012
Connecting to SQL 6.5 with VB.NET
I am trying to connect to a SQL 6.5 database with VB.NET.
Is this possible, and if so, what kind of connection string is used and what mode of data access (OleDB, ODBC, etc.)
I have had several problems doing this and I am starting to wonder if there is anything special that needs to be done or if it is even possible. Thanks in advance!OleDB. Check out http://www.connectionstrings.com/|||Alright, I tried creating an OleDB Connection using Visual Studio. I set up the connection and it connects fine. I can view the tables and it says that it connects to the datasource. But when I try to use the connection in the page I get this error:
System.ArgumentException: The .Net Framework Data Provider for OLEDB (System.Data.OleDb) does not support the Microsoft OLE DB Provider for ODBC Drivers (MSDASQL). Use the .Net Framework Data Provider for ODBC (System.Data.Odbc). at System.Data.OleDb.OleDbConnectionString.ValidateNotMSDASQL(String progid) at System.Data.OleDb.OleDbConnectionString.ValidateParse() at System.Data.Common.DBConnectionString..ctor(String connectionString, UdlSupport checkForUdl) at System.Data.OleDb.OleDbConnectionString.ParseString(String connectionString) at System.Data.OleDb.OleDbConnection.set_ConnectionString(String value) at ask.testconn.Page_Load(Object sender, EventArgs e) in \\cnsrfdiis01\intranet\ask\testconn.aspx.vb:line 31
Why would it be able to connect in the VS.NET Server Exlporer, but not in a page. I am just trying to open the database and close it. Here is the connection string I am using:
Provider=SQLOLEDB;Persist Security Info=False;User ID=crystal;Initial Catalog=lmsprod;Data Source=10.1.121.22;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=AROCAPTEST;Use Encryption for Data=False;Tag with column collation when possible=False
Thanks in advance!|||Ok, I was wrong. I went and checked, and you should be using the ODBC driver. Sorry. Try that and see if you still have the error.
Friday, February 10, 2012
Connect to SQL Server 2000 with VB.NET for Beginners
I just started to learn Visual Basic 2005.NET. I have experience with VBA in Access and SQL Server.
I now want to build applications (client/server) with VB & SQL Server. Does anyone have a simple example with which I can start learning?
Thank you in advance!
There are many samples at the Microsoft download center. They are based either on Access or SQL Server and either on C# or VB.NET.HTH, Jens Suessmeyer
http://www.sqlserver2005.de
|||
hi
Are your programming a windows based application or an ASP (web based) application?
joey
|||Hi Joey,not an ASP, just a client/server application.
let's keep it simple. I'm just starting......