Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating System DSN in VB .NET

Status
Not open for further replies.

omarmtz

Programmer
Nov 22, 2002
75
MX
Someone knows how create an System DSN for a database of SQL Server...Programming with VB.NET...

Thanks..
 

are you looking for this !!!

Dim result As String

'Retrieve the NetBIOS name.
result = System.Environment.MachineName

'Display the results to the console window.
Console.WriteLine("NetBIOS Name = {0}", result)

'Retrieve the DNS name.
result = System.Net.Dns.GetHostByName("LocalHost").HostName

'Display the results to the console window.
Console.WriteLine("DNS Name = {0}", result)


Email: pankajmsm@yahoo.com
 
If you use the System.Data.SqlClient classes, there is no need to create a System DSN because the SqlClient data provider does not use ODBC, it has its own protocol. Just specify the a valid connection string and you should connect easily.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top