I'm using MS Visual Web Developer 2010 Express to build a website that connects to a SQL server 2000 database. Is it possible to connect to SQL 2000 using providerName="System.Data.SqlClient"? I'm guessing not.
Or am I limited to using providerName="System.Data.OleDb" ? And seems both connections are under this ADO.NET umbrella. Please confirm one way or the other ... I'm a bit confused.
So I believe I need to use OleDbCommand calls. I've seen many examples to do gridview select/edit/delete using SqlClient but not OleDb calls in VB code. Links to sample code would be great.
Hi , i am not fimiliar to Sql 2000 and VWD 2010 working together or neither i ever tryed it , but why not upgrade to SSMStudio 2008 http://www.microsoft.com/express/database/ ??
Then you can just import your old database to SSMS 2008 i hope .
So, what exactly have you found - can you use SqlClient with SQL Server 2000 or not?
Note to moderators - please don't delete my reply, I found this thread doing a Google Search on that topic and I don't understand the policy of not allowing new questions posted to the older threads if the question is very related. It is allowed in MSDN
threads.
Beware of bugs in the above code; I have only proved it correct, not tried it. (Donald Knuth)
ricetwo
Member
4 Points
7 Posts
how connect VWD 2010 Express to SQL server 2000
Oct 12, 2010 01:14 AM|LINK
Hello,
I'm using MS Visual Web Developer 2010 Express to build a website that connects to a SQL server 2000 database. Is it possible to connect to SQL 2000 using providerName="System.Data.SqlClient"? I'm guessing not.
Or am I limited to using providerName="System.Data.OleDb" ? And seems both connections are under this ADO.NET umbrella. Please confirm one way or the other ... I'm a bit confused.
From web.config:
<connectionStrings>
<add name="SubscrTypeConnectionString" connectionString="Provider=SQLOLEDB;Data Source=my-server-host;Persist Security Info=True;Password=123abcde;User ID=test;Initial Catalog=Apps"
providerName="System.Data.OleDb" />
</connectionStrings>
So I believe I need to use OleDbCommand calls. I've seen many examples to do gridview select/edit/delete using SqlClient but not OleDb calls in VB code. Links to sample code would be great.
Thank you!
sql serverver 2000 connect asp.net 4.0
ricetwo
Member
4 Points
7 Posts
Re: how connect VWD 2010 Express to SQL server 2000
Oct 12, 2010 03:26 AM|LINK
These 2 MS websites below state that the System.Data.SqlClient can be used for Microsoft SQL Server 7.0 or a later.
However, in VWD 2010 design view on default.aspx, when I do :
I get a pop-up box stating
'This server version is not supported. You must have MS SQL server 2005 or later.'
In this first website with ADO.NET code example, i don't see the Provider.
http://msdn.microsoft.com/en-us/library/dw70f090.aspx
SqlClient
The code in this example assumes that you can connect to the Northwind sample database on Microsoft SQL Server 7.0 or a later version.
http://msdn.microsoft.com/en-us/library/a6cd7c08.aspx
.NET Framework Data Provider for SQL Server (SqlClient)
To use the .NET Framework Data Provider for SQL Server, you must have access to SQL Server 7.0 or later versions.
Any assistance would be appreciated!
magic mushro...
Participant
925 Points
648 Posts
Re: how connect VWD 2010 Express to SQL server 2000
Oct 12, 2010 11:16 AM|LINK
Hi , i am not fimiliar to Sql 2000 and VWD 2010 working together or neither i ever tryed it , but why not upgrade to SSMStudio 2008 http://www.microsoft.com/express/database/ ??
Then you can just import your old database to SSMS 2008 i hope .
Here is connections string for Sqlserver 2000
http://www.connectionstrings.com/sql-server http://www.connectionstrings.com/sql-server
in C# codebehing add this
using System.Data.SqlClient;
protected void Page_Load(object sender, EventArgs e)
{
using (SqlConnection cnn = new SqlConnection("Persist Security Info=True;Data Source=datasource;database=; User ID=userid;password=password"))
{
cnn.Open();
using (SqlCommand cmd = new SqlCommand(" SELECT [name] FROM sys.Tables ", cnn))
}
if you want it in VB.net code then use this program
http://www.developerfusion.com/tools/convert/csharp-to-vb/
Hope this helps
Naom
All-Star
36004 Points
7901 Posts
Re: how connect VWD 2010 Express to SQL server 2000
Dec 12, 2012 12:52 AM|LINK
So, what exactly have you found - can you use SqlClient with SQL Server 2000 or not?
Note to moderators - please don't delete my reply, I found this thread doing a Google Search on that topic and I don't understand the policy of not allowing new questions posted to the older threads if the question is very related. It is allowed in MSDN threads.
(Donald Knuth)
Visit my blog
Microsoft Community Contributor 2011-12