VB.NET Standard

  • Thread starter Thread starter DavidM
  • Start date Start date
D

DavidM

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 (e-mail address removed). The is done to avoid SPAM!
 
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 said:
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.
 
DavidM said:
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
 
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;Integrated 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
////
 
Back
Top