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

VB.NET Standard

P: n/a
Hello - I friend of mine just purchased VB.NET 2003 Standard Edition. He
needs to convert a VB 6 database application that accesses SQL Server 2000
to VB.NET. Can this edition of VB access a SQL Server database?

He tells me that it appears to only support MSDE -- but he doesn't know for
sure, as he doesn't know what he's doing. I told him that probably the
integrated database support within the IDE only works for MSDE, but he
should still be able to code for SQL Server without using the design type
controls, etc.

Can anyone confirm or deny this?

Can someone give me a simple connect string to run a query against the Pubs
database?

Thanks

--
....david
http://www.micro-mess.com
http://www.va-mustang.com
If you wish to reply to me personally, please remove
the "underline" from sc*********@cox.net. The is done to avoid SPAM!
Nov 20 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Yes, it can access SQL Server vX but not through the visual tools. If you
code a connection in your code, it'll work fine though.

HTH,

Bill
"DavidM" <sc*********@cox.net> wrote in message
news:N_IMb.38163$I06.252538@attbi_s01...
Hello - I friend of mine just purchased VB.NET 2003 Standard Edition. He
needs to convert a VB 6 database application that accesses SQL Server 2000
to VB.NET. Can this edition of VB access a SQL Server database?

He tells me that it appears to only support MSDE -- but he doesn't know for sure, as he doesn't know what he's doing. I told him that probably the
integrated database support within the IDE only works for MSDE, but he
should still be able to code for SQL Server without using the design type
controls, etc.

Can anyone confirm or deny this?

Can someone give me a simple connect string to run a query against the Pubs database?

Thanks

--
...david
http://www.micro-mess.com
http://www.va-mustang.com
If you wish to reply to me personally, please remove
the "underline" from sc*********@cox.net. The is done to avoid SPAM!

Nov 20 '05 #2

P: n/a
* "DavidM" <sc*********@cox.net> scripsit:
Hello - I friend of mine just purchased VB.NET 2003 Standard Edition. He
needs to convert a VB 6 database application that accesses SQL Server 2000
to VB.NET. Can this edition of VB access a SQL Server database?

He tells me that it appears to only support MSDE -- but he doesn't know for


Inside the IDE, you cannot work with SQL Server, but you can still
connect to SQL Server through code.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

P: n/a
Is it possible for someone to give me a simple example of how to open a
connection to a SQL Server. This way I can test it.
--
....david
http://www.micro-mess.com
http://www.va-mustang.com
If you wish to reply to me personally, please remove
the "underline" from sc*********@cox.net. The is done to avoid SPAM!

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bu************@ID-208219.news.uni-berlin.de...
* "DavidM" <sc*********@cox.net> scripsit:
Hello - I friend of mine just purchased VB.NET 2003 Standard Edition. He needs to convert a VB 6 database application that accesses SQL Server 2000 to VB.NET. Can this edition of VB access a SQL Server database?

He tells me that it appears to only support MSDE -- but he doesn't know
for
Inside the IDE, you cannot work with SQL Server, but you can still
connect to SQL Server through code.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #4

P: n/a
"DavidM" <sc*********@cox.net> schrieb
Is it possible for someone to give me a simple example of how to open
a connection to a SQL Server. This way I can test it.

ADO.NET is used for database access. The documentation is here:

<F1>
VS.NET
.NET Framework
Programming with .NET Framework
Accessing Data using ADO.NET

and
VB and C#
Integrating (or Accessing?) Data

--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #5

P: n/a
Cor
Hi David,

I was busy testing something here is the test program
It has everything you need for a dataset in it.

\\\\
Public Module Main
Public Sub main()
Dim Conn As New SqlClient.SqlConnection _
("Server=localhost;DataBase=northwind;Integrate d Security=SSPI")
Dim ds As New DataSet
Dim da As New SqlClient.SqlDataAdapter _
("Select EmployeeID, FirstName from Employees", Conn)
da.Fill(ds)
Dim cmb As New SqlClient.SqlCommandBuilder(da)
If ds.Tables(0).Rows(0)("FirstName").ToString <> "Nancy" Then
ds.Tables(0).Rows(0)("FirstName") = "Nancy"
Else
ds.Tables(0).Rows(0)("FirstName") = "Jay"
End If
If ds.HasChanges Then
da.Update(ds)
End If
Conn.Close()
End Sub
End Module
////
Nov 20 '05 #6

P: n/a
* "DavidM" <sc*********@cox.net> scripsit:
Is it possible for someone to give me a simple example of how to open a
connection to a SQL Server. This way I can test it.


<http://www.connectionstrings.com>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #7

P: n/a
Cor
Hi David,

I forgot to say basicly, there is by instance not any error handling in it.

Cor
I was busy testing something here is the test program
It has everything you need for a dataset in it.

\\\\
Public Module Main
Public Sub main()
Dim Conn As New SqlClient.SqlConnection _
("Server=localhost;DataBase=northwind;Integrate d Security=SSPI")
Dim ds As New DataSet
Dim da As New SqlClient.SqlDataAdapter _
("Select EmployeeID, FirstName from Employees", Conn)
da.Fill(ds)
Dim cmb As New SqlClient.SqlCommandBuilder(da)
If ds.Tables(0).Rows(0)("FirstName").ToString <> "Nancy" Then
ds.Tables(0).Rows(0)("FirstName") = "Nancy"
Else
ds.Tables(0).Rows(0)("FirstName") = "Jay"
End If
If ds.HasChanges Then
da.Update(ds)
End If
Conn.Close()
End Sub
End Module
////

Nov 20 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.